Conversation
d0bf89b to
62e7e35
Compare
|
I’m not sure about the decorator name. Maybe |
|
TBD: Should we define standalone CSS for the spinner animation? Currently, this depends on IcingaWeb2. |
| /** | ||
| * Decorates the autosubmit elements with a spinner icon | ||
| */ | ||
| class AutosubmitDecorator implements FormElementDecoration, DecoratorOptionsInterface |
There was a problem hiding this comment.
I’m not sure about the decorator name. Maybe
AutosubmitSpinnerorAutosubmitIndicatorwould fit better.
I'd rather go with AutosubmitIndicationDecorator.
| ); | ||
| } | ||
|
|
||
| public function testDecoratorGeneratesIdWhenNoneIsSet(): void |
There was a problem hiding this comment.
This name states something else than what's tested. Or rather, what's tested isn't what this states? (aria-describedby is set irrelevant whether a custom id is passed or not.)
tl;dr, this test should cover that aria-describedby is set regardless of how the id is set. In this case when none is set, as the others cover the other cases. So the test is fine, but the name of it not… (tl;dr's are usually shorter… I suppose that's due to this being AI generated -.- (THE TEST! not my comment))
There was a problem hiding this comment.
I have renamed the tests and removed one redundant test (that checked whether an ID was generated if none was specified).
62e7e35 to
e261042
Compare
AutosubmitDecoratorAutosubmitIndicationDecorator
This PR introduces
AutosubmitIndicationDecorator, a decorator that adds an indicator to elements withautosubmitbehavior. The current implementation supports checkboxes only.Before:
After:
Before clicking the checkbox:


Processing after click:
resolves #344
requires Icinga/ipl-html#188
The test class is written using AI.