Conversation
@allella thoughts? |
|
@bogdankharchenko one of the motivators for an upgrade is we get a ton of deprecation errors now on deploy. It makes it rather difficult to catch other errors with pages of warnings. We could upgrade to a newer Bootstrap, which would likely be much easier, but the lean was heavy to adopting Tailwind in this thread from earlier conversations. We don't have anybody readily committing to a re-design, so I'd say we could go in the middle and upgrade to Tailwind and not be terribly concerned if the conversion or someone's preference causes the final result to not be 100% the same. If we have someone we think would commit to helping with a design refresh, then I'd think we'd want to bring them on board right away instead of losing momentum on this PR and David's work. |
Got it, OK! That's fine! |
|
Bogdan's questions do bring up the point if we can remove some of the custom classes and inherit more "stock" Tailwind in some areas. As long as things aren't getting crapped up in a notable way, we probably don't care about small margin / padding differences, style differences on corners and buttons and such. |
|
@allella @bogdankharchenko That's a great question, Bogdan. If we've been thinking about a design change anyway, then this would be a perfect opportunity to redo both the design and the CSS framework at the same time. It would take a substantial amount of time to just switch from Bootstrap to Tailwind while preserving the existing style exactly as it is. And you're right about the mobile display issues - I was only focused on desktop initially because I wanted to get some feedback first. If we didn't want to go with this approach, then there'd be no need to spend additional time making it look good on mobile. I actually like the one-shot redesign approach you suggested, Bogdan. I could potentially commit to helping with a redesign if we decide to go that route. If we did, do we still want to stay with the existing framework (Laravel, etc.)? We could also use this as an opportunity to switch to a pure JavaScript framework like React or Next.js, which would allow more new folks to contribute since many developers are familiar with JavaScript. Regarding Jim's suggestion about removing custom classes and inheriting more "stock" Tailwind - this would be challenging since Bootstrap provides pre-styled components (navbars, cards, grids) that look good out of the box, while Tailwind is utility-first with minimal default styling. Without explicitly adding Tailwind utility classes, elements would likely revert to basic HTML styling - navigation would break into vertical lists, grid layouts would collapse, and components would lose their styling. We'd essentially need to rebuild the visual design with Tailwind utilities to maintain the current look. What do you think? Should we pivot toward a full redesign, or continue with the incremental migration? |
|
I have no experience with Tailwind, but it sounds from the prior conversation that people were imaging we'd use Tailwind with a component library like daisyUI or Flowbit. If that isn't appealing to folks, then we could shift to the other idea of upgrading to the latest Bootstrap. As for a redesign or switching to a JS framework, I think those are bigger conversations that may be best for the next in-person HG Labs meeting. |
|
@beetz12 take a look at this branch locally: https://github.com/bogdankharchenko/hackgreenville-com/tree/laravel-inertia-tailwind-css Inertia + react -- we should discuss this design at some point! |
|
David has been traveling and busy on a project, but I would like to revisit this Tailwind migration when he frees up. The old version of Bootstrap, combined with our old server, is making for a lot of annoying deprecation warnings when we do deploys. |
|
Hi Jim, I will have some time at the end of this week. Besides resolving the current conflict, do you have any questions or concerns that you'd like to discuss? |
|
@beetz12 Having a solid front-end developer, like Zach, take a look would be nice. Perhaps we can find some more reviewers at HG Nights. I trust the regular contributors can figure it out, but as far as I know we're all more backend and not working with Tailwind every day. |
|
Yes, agreed. It would definitely be good get some additional frontend devs to review it. I wouldn't expect anything less for changes of this size. I do also want to mention that Code Rabbit code reports also provide a nice summary about the changes and it can identify many vulnerabilities. Not saying that this is a replacement for actual dev review, but it's an good additional safety check. You know what's strange, previously I thought CodeRabbit was integrated into this repo and provided a report, but I can't find it now. |
zach2825
left a comment
There was a problem hiding this comment.
I ran this command. There are only a few remaining bootstrap classes still used. Could you factor these out, too? Thank you for your work, it's looking very good so far.
The command I ran
grep -rn --include="*.blade.php" -E '\b(container|container-fluid|row|col-[a-z0-9-]+|btn|btn-[a-z-]+|navbar|navbar-[a-z-]+|nav-link|card|card-[a-z-]+|alert|alert-[a-z-]+|badge|form-control|form-group|form-label|modal|modal-[a-z-]+|dropdown|dropdown-[a-z-]+|table|table-[a-z-]+|pagination|breadcrumb|jumbotron|list-group|list-group-item|input-group|text-(center|right|left|muted|primary|success|danger|warning|info)|d-flex|justify-content-[a-z-]+|align-items-[a-z-]+|[mp][tblrxy]?-[0-9]|w-[0-9]+|h-[0-9]+)\b' resources/views/
It's a Linux command that searches through all blade files for a bootstrap class pattern. I used an AI to create the pattern, and it looks complete.
There are ~367 references, but it's all just search-and-replace.
Heres an example of the mapping I'm talking about
| Bootstrap Class | Purpose | Tailwind Equivalent(s) | Notes |
|---|---|---|---|
| container | Fixed-width responsive wrapper | max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 | Adjust max-w-* as needed |
| container-fluid | Full-width container | w-full px-4 sm:px-6 lg:px-8 | Full width with padding |
| row | Flex row wrapper | flex flex-wrap -mx-4 | Negative margins for columns |
| col-md-6 | 50% width on md+ screens | w-full md:w-1/2 px-4 | Responsive layout |
| col-md-4 | 33% width on md+ screens | w-full md:w-1/3 px-4 | Common grid pattern |
| col-md-3 | 25% width on md+ screens | w-full md:w-1/4 px-4 | Quarter width |
| card | Card container | bg-white rounded-lg shadow p-4 | Customize spacing as needed |
| card-body | Inner card content | p-4 | Often merged into card |
| card-header | Card header section | border-b pb-2 mb-2 font-semibold | Optional styling |
| btn | Base button | inline-flex items-center px-4 py-2 rounded | Base button style |
| btn-primary | Primary button | bg-blue-600 text-white hover:bg-blue-700 | Replace colors to suit theme |
| text-center | Center text | text-center | Same naming |
| d-flex | Display flex | flex | Direct mapping |
| justify-content-between | Space between items | justify-between | Direct mapping |
| align-items-center | Vertically center | items-center | Direct mapping |
| @@ -0,0 +1,4304 @@ | |||
| { | |||
There was a problem hiding this comment.
Remove the package-lock.json file. This project has been using yarn.. So if you could remove this file and run yarn upgrade, that should apply the same updates.
| "devDependencies": { | ||
| "@tailwindcss/postcss": "^4.1.11", | ||
| "autoprefixer": "^10.4.21", | ||
| "bootstrap": "^4.0.0", |
There was a problem hiding this comment.
Can you remove Bootstrap and all related packages such as bootstrap-switch and bootstrap-datepicker, and replace them with different packages compatible with Tailwind?
|
Closing this review due to a newer more complete tailwind migration #601 |
Summary
Begin incremental migration from Bootstrap 4 to Tailwind CSS by converting the navigation header component.
This establishes the foundation for coexistence between both frameworks while maintaining pixel-perfect
visual compatibility.
Approach
This PR implements an incremental migration strategy that allows Bootstrap and Tailwind to coexist safely:
Changes Made
Infrastructure Setup
Navbar Component Migration
Visual Refinements
Files Modified
Testing
Migration Guide for Other Components
For developers continuing this migration, follow this systematic approach:
Ensure latest changes are pulled
git pull origin develop
npm install
Recommended conversion order:
✅ Navbar (completed)
🔄 Footer components
🔄 Button components across pages
🔄 Form components
🔄 Card/panel layouts
🔄 Grid system usage
🔄 Modal dialogs
🔄 Typography utilities
Migration Process for Each Component
Step 1: Analyze Bootstrap Usage
Find Bootstrap classes in target component
grep -r "class.*(btn|card|form|modal)" resources/views/target-component/
Step 2: Create Tailwind Equivalents
Step 3: Update Template Files
Step 4: Build and Verify
npm run build
Test component thoroughly
Compare with Bootstrap version
CSS Specificity:
Responsive Design:
Component Dependencies:
Color Consistency:
Before marking component complete:
Once all components converted: