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

Added missing caret for BootstrapSelectFilter. Improved ColorBehaviors #1027

Conversation

namtar
Copy link
Contributor

@namtar namtar commented Jan 12, 2024

BoostrapSelectFilter

When using the BootstrapSelectFilter for example with a data table no caret is displayed for the DropDownChoice. This is because of a wrong css class set in the de/agilecoders/wicket/extensions/markup/html/bootstrap/table/filter/BootstrapSelectFilter.html markup file. Now a caret should be displayed.

ColorBehaviors

I did some colorBehavior changes and added the ability to set opacity to texts or backgrounds and gradients to backgrounds, too. I changed existing classes and added new ones. Also I renamed Color enums. For example ColorBehavior.Color is now TextColorBehavior.TextColor.
There is an enum BackgroundColor for a BackgroundColorBehavior and a TextAndBackgroundColor for a TextAndBackgroundColorBehavior. The latter one is a behavior for https://getbootstrap.com/docs/5.3/helpers/color-background/ which determines automatically a contrasting textColor for a given background color.

The color changes may lead to compile errors on projects that use wicket-bootstrap and require mostly adjustments of class imports or the change of a method name. If this is a problem then reject this pull request and I will do a new one only for the BootstrapSelectFilter and CodeBehavior.

CodeBehavior

I changed the initializerScript line in the CodeBehavior as proposed here (#711). Line numbers are shown again now, but since the google code-prettify project is archived perhaps it would be an idea to integrate the highlight.js library.

Backgroundcolor Behaviors. Little sample adjustments. Fixed CodeBehavior Line
Numbers.
@martin-g
Copy link
Owner

martin-g commented Jan 12, 2024 via email

@vrozkovec
Copy link
Contributor

vrozkovec commented Jan 13, 2024

It will also break all existing applications that use behaviors that were renamed, even though I like some names better, what's your approach in this case @martin-g?
I'd also perhaps keep behavior names so they match what Bootstrap has on their page ColorBehavior represents Utilities > Colors (renamed to TextColorBehavior), ColorAndBackgroundBehavior is for Helpers > Color & background (renamed to TextAndBackgroundColorBehavior ), but as there are links in the header of the behavior that link to corresponding section, is it desirable to have names aligned like that..?

@namtar
Copy link
Contributor Author

namtar commented Jan 13, 2024

Ok. No problem. I will split the pull request.

Is there a rule how the code formatting has to be done? I assumed that the .ediorconfig file is followed by Intellij IDEA and has the formatting rules that should be applied.

@vrozkovec I saw that Bootstrap has Utilities and Helpers sections and because of that I kept the matching behaviors in the corresponding packages. The word colors is very general though in this section (Utilities > Colors) they only add colors to text. Therefore I thought it would be a good idea to name the Enums and Behaviors as I have done in order to be more specific.
But because I have to split the PR anyway I can use the previous behavior names and only add gradients and opacity to the corresponding behaviors so that no existing application will break.

@namtar namtar closed this Jan 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants