Skip to content
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

Provide standardized control layout #99

Merged
merged 3 commits into from
Oct 18, 2022

Conversation

nilmerg
Copy link
Member

@nilmerg nilmerg commented Oct 14, 2022

The goal of this change is to have the default list control layout readily available for use in other modules than Icinga DB Web where it originates from.

Some notes:

  • My first option was a mixin. That turned out to be not feasible as all rules were only usable at once. Any module not wanting to apply this to all instances of .controls wouldn't have made use of this mixin. The explicit usage of it was another negative, as it meant a hard dependency of ipl-web. (Which is bad for CSS)
  • The second option was to apply it to all instances of .controls by default and rely on the strict nature of the rules (> everywhere) that anyone not wanting them to apply could just wrap their custom controls in another container. (An opt-out version, effectively) Though, existing modules would have a problem with that, most notable the Director.
  • My final option is now an automatic one. I assume anyone adding either the PaginationControl, LimitControl, SortControl or SearchBar as control by using CompatController::addControl() to want the default control layout. Anyone not wanting this can either add controls by usage of $this->controls->add() or by removing the class default-layout afterwards. This has benefits of both previous options: It's opt-out, Existing modules having used them still have them, Existing modules not using them are still not affected, New modules wanting to use them can do so easily

@nilmerg nilmerg added the enhancement New feature or request label Oct 14, 2022
@nilmerg nilmerg added this to the v0.7.0 milestone Oct 14, 2022
@nilmerg nilmerg self-assigned this Oct 14, 2022
@cla-bot cla-bot bot added the cla/signed label Oct 14, 2022
@nilmerg nilmerg force-pushed the provide-standardized-control-layout branch 3 times, most recently from e0dccbc to 6c185bf Compare October 14, 2022 13:25
Such a container is nearly always required for a good looking
layout, so why shouldn't it be there by default?
They include all layout and a bit of style rules to
replicate the default control layout that is used
by Icinga DB Web and various other modules.
@nilmerg nilmerg force-pushed the provide-standardized-control-layout branch from 6c185bf to e58a61e Compare October 17, 2022 14:46
@nilmerg nilmerg merged commit 77e39b2 into master Oct 18, 2022
@nilmerg nilmerg deleted the provide-standardized-control-layout branch October 18, 2022 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla/signed enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant