Bootstrap 5 migration, collectstatic fixes, and project modernization#671
Merged
Bootstrap 5 migration, collectstatic fixes, and project modernization#671
Conversation
8009b26 to
faef177
Compare
Owner
Author
|
FYI: This is part of a project cleanup and modernisation effort with the help of AI .. next steps involve:
|
This commit completes the AdminLTE v4 & Bootstrap 5 migration and fixes multiple UI/UX issues across the admin interface. Bootstrap 5 Migration: - Fixed all deprecated Bootstrap 4 patterns in 28 templates - Removed input-group-append/prepend wrappers - Changed btn-block to d-grid/w-100 patterns - Updated float-right/left to float-end/start - Fixed close button markup (class="close" → btn-close) - Updated data attributes (data-dismiss → data-bs-dismiss, data-toggle → data-bs-toggle) CSS Cleanup (871 lines → ~460 lines): - Aggressively removed redundant framework overrides - Kept only Django-specific fixes and integrations - Used CSS custom properties for theme-aware styling - All styles now use Bootstrap 5 and AdminLTE v4 patterns UI Improvements (15 issues fixed): - Select2 dark theme support with proper contrast - User panel spacing aligned with sidebar items - Submit buttons proper flexbox layout with mobile responsiveness - Horizontal selectors (permissions) side-by-side layout - Changelist search inline layout - Form fields proper spacing on detail pages - One-to-many field selections visibility in dark theme - Inlines overflow handling in tabbed views - Checkbox column width optimization - Related widget wrapper links spacing - Select2 styling normalized with form-control - Add button moved to filters area for better UX - Detail page buttons responsive layout - Form elements AdminLTE v3 inspired styling New Features: - Added seed_data management command with configurable datasets - Added comprehensive Bootstrap 5 migration tests (443 test cases) - Added Makefile targets: seed_data, seed_small, seed_large - Added README_SEED_DATA.md documentation Updated Dependencies: - AdminLTE v4.0.0 (from v3) - Bootstrap 5.3.3 (from v4) - All Bootswatch themes updated to v5 All changes maintain backward compatibility with existing configurations and follow the "Over the Top" philosophy - leveraging framework defaults rather than fighting them with custom CSS. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Migrate remaining BS4 classes: mr-1→me-1, text-left→text-start, btn-xs→btn-sm - Use bootstrap.bundle.min.js (includes Popper.js) for dropdown support - Rewrite bootstrap-show-modal and related-modal.js for native BS5 Modal API - Fix Django 6.0 compat: mark_safe instead of format_html with no args, replace search_var with literal "q" in change_list.html - Reduce main.css to minimal Django-specific overrides: - Set --bs-body-font-size: 0.875rem to match AdminLTE v3 sizing - Style bare Django form widgets, calendar/clock popups, selectors - Fix related-widget-wrapper layout with flexbox - Add Select2 dark mode and border theming - Style #jazzy-actions panel and .user-panel alignment - Fix Select2 init: width 'element'→'100%' for proper BS5 sizing - Refresh all Bootswatch themes from v5, add brite theme, strip sourceMappingURL - Fix Makefile download_bootswatch_css shell syntax - Update submit_line.html for consistent button styling - Update tests for show_ui_builder=False and CSS size threshold
- Remove p-0 from changelist card-body to prevent AdminLTE first-column padding shift - Add btn-sm to all submit_line.html buttons for consistent sizing with object-tools - Add d-flex flex-wrap gap-2 to object-tools div for proper button spacing - Add mb-3 to dashboard cards for bottom margin between app cards
0c695db to
86ce0a3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
data-bs-theme attribute — any theme now works in both light and dark
sourceMappingURL=bootstrap.min.css.mapto be included in latest release? #651)Breaking Changes
equivalent behavior
(data-bs-toggle, ms-/me-, etc.)
Test plan