Closed bob2517 closed 2 years ago
After this, wrap up what's left on the other in-progress issues and push a release up, unless something else comes up of course...
A question is, do I add the defaults at config load time or evaluation time. Considering the extension and the fact that it should really work with what the developer typed, this indicates a more runtime approach. That would also not add any overhead to the initial config load.
Actually, there would be probably less overhead doing it at runtime as we can then just do a quick check when needed rather than checking the presence of parentheses on every appropriate conditional. If at runtime, there is an array of conditional names with defaults and just check if the conditional is in there with a default then we know it can be run with the default. Otherwise barf with the "custom conditional not found" error.
This is done and on the branch. The following conditionals now default to self and so either now don't need parentheses at all or just one.
if-completely-visible if-display if-exists if-focus-first if-focus-last if-form-changed if-inner-text if-max-height if-max-length if-max-width if-min-height if-min-length if-min-width if-visible
Removing if-focus-first and if-focus-last from this, as they don't fit the criteria needed for this.
Adding if-inner-html which was done but not documented here.
Adding if-empty and if-empty-trimmed. These will be on the branch shortly.
Closing in preparation for release.
Allow things like "if-empty" to work with parentheses and have "self" as a default.
This has proven itself to be an instinctual way to use the conditional, so it should be in the syntax.
There are probably other built-in conditionals that could suffer the same syntax improvement, so check those out.