Skip to content

Fix: Replace Bootstrap 4 deprecated classes with Bootstrap 5 equivalents#1258

Open
radimvaculik wants to merge 2 commits intomasterfrom
fix/bootstrap5-deprecated-classes
Open

Fix: Replace Bootstrap 4 deprecated classes with Bootstrap 5 equivalents#1258
radimvaculik wants to merge 2 commits intomasterfrom
fix/bootstrap5-deprecated-classes

Conversation

@radimvaculik
Copy link
Member

Summary

  • Replace dropdown-menu-right with dropdown-menu-end
  • Replace control-label with form-label across all filter templates
  • Replace form-inline (removed in BS5) with d-flex
  • Replace input-group-addon with input-group-text
  • Fix typo: datagrid-col-filter-datte-range-delimiterdatagrid-col-filter-date-range-delimiter

Closes #1257

@radimvaculik radimvaculik force-pushed the fix/bootstrap5-deprecated-classes branch from 8076c5f to f8f92bf Compare February 24, 2026 07:09
- dropdown-menu-right -> dropdown-menu-end
- control-label -> form-label
- form-inline -> d-flex
- input-group-addon -> input-group-text
- Fix typo: datagrid-col-filter-datte-range-delimiter -> datagrid-col-filter-date-range-delimiter

Closes #1257
@radimvaculik radimvaculik force-pushed the fix/bootstrap5-deprecated-classes branch from f8f92bf to b14c18d Compare February 24, 2026 07:16
@foxycode
Copy link
Member

@radimvaculik There are some ramains of old class names:

$ grep -nr control-label vendor/ublaboo/datagrid
vendor/ublaboo/datagrid/assets/css/datagrid.css:608:	[data-datagrid-name] .datagrid-th-form-inline .control-label {

Otherwise looks good.

- Remove .bootstrap-select styles (not a project dependency)
- Remove .form-group, .radio, .checkbox styles (Bootstrap 3 remnants)
- Remove .control-label style (replaced by .form-label in BS5)
- Remove .input-group-text height hack (BS3/4 specific)
@radimvaculik
Copy link
Member Author

@foxycode Thanks. Fixed & removed also obsolete bootstrap-select selectors.

@foxycode
Copy link
Member

@radimvaculik Everything seems to work.

@AdamFiser
Copy link

Hello, does the button for showing/hiding columns work for you? I tried this version and the menu does not expand when clicked.
Bootstrap 5 in latest.

@foxycode
Copy link
Member

Looks like hideable columns really does not work. Ajax si called, but column stays displayed. Not sure if it's related to this commit. None of removed styles contains display or similar property.

@radimvaculik
Copy link
Member Author

@AdamFiser @foxycode Everything is working for me. Could you please provide more details or a reproduction example? You can use the datagrid-skeleton repo to demonstrate the issue.

@foxycode
Copy link
Member

foxycode commented Mar 1, 2026

@radimvaculik You simply allow hideable columns using $grid->setColumnsHideable();
https://contributte.org/packages/contributte/datagrid/columns.html#hideable-columns

Then try hide something. It won't work.

@AdamFiser
Copy link

Yes, the parameters $grid->setColumnsHideable(); are correct. In the previous version using Bootstrap 4, the application worked perfectly. I will need some time to identify the cause, which I don't have at the moment. So far, I have found when checking in the browser's dev console that it is not added after clicking the display button

  • div - btn-group **show**
  • ul dropdown menu **show**
  • does not change arial-expanded to true...

as if it did not know JavaScript, but it is loaded.

@radimvaculik
Copy link
Member Author

Guys, all good on my side :/

@AdamFiser
Copy link

Sorry, I found the cause, my mistake.
I confirm functionality.

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.

Remaining Bootstrap 4 deprecated classes in templates

3 participants