-
Notifications
You must be signed in to change notification settings - Fork 218
Support binding appearance
and another attribute
#2479
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
appearance
and another attribute
This issue would cover other cases, like: xf|input[appearance ~= character-counter][fr|pdf-template = true] Note that #4370 calls for cumulative appearances support. |
appearance
and another attributeappearance
and another attribute
|
See also #6811. |
For Form Builder, trying to figure out the logic of appearances again. From the "Control Settings" dialog, we call:
How is this impacted, if at all, by adding support for binding to appearance + other attribute? At form compilation time, an element and its attributes, as well as the index of bindings, results in the selection of zero or one binding. This doesn't use the datatype, which is unknown. At Form Builder design time, we have the notion of "virtual name", which is the name associated with an element name in a CSS selector on the same binding, but taking the datatype into account. To compute the virtual name, we call
It seems that we should then pass, also, the other attributes. Right now, we don't. This should, in fact, work exactly as at compilation time, to identify the original binding, with the possible exception that at design-time, we only support matching appearances with
|
In
Trying to figure out what it means!
We take the information from the form definition:
Then we call Examples:
In the form definition, we therefore must have the direct binding. In theory we could also support:
but we don't. So the assumption is that the "most specific binding" is a direct binding, and if it isn't then we fallback. Now, how is this impacted by the addition of support for other attributes? Right now we have:
This lets Form Builder:
Now let's say we add:
The "most specific binding" will be:
Note that there are no datatypes involved here. I conclude that right now, the code is not ready to handle the migration from, say:
I'd suggest first, for Form Builder:
|
Trying to refine the logic of appearance selection.
Say we have the bindings:
Then:
|
From #2394:
The text was updated successfully, but these errors were encountered: