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

Bootstrap 5 #2205

Merged
merged 66 commits into from Oct 30, 2021
Merged

Bootstrap 5 #2205

merged 66 commits into from Oct 30, 2021

Conversation

SchrodingersGat
Copy link
Member

@SchrodingersGat SchrodingersGat commented Oct 26, 2021

This PR upgrades bootstrap to v5.1.3

As the original bootstrap integration was kinda hacked-in, this implementation will be a lot more methodical and conformant to the bootstrap "standards".

(Read: Previously I had no idea what I was doing...)

Note: This will most likely be a long-running PR as there will be a lot of changes required...

Closes #2111

TODO

  • Navbar
  • Search input
  • main drop-down menus
  • Refactor sidebars (remove dependency)
  • Refactor API forms (client side)
  • Refactor modal forms (server side)
  • Fix dropdown-toggles for menus
  • Fix button callbacks (e.g. "cancel" button in forms)
  • Fix hover actions for thumbnail images
  • Table CSS fixes
  • Fix panels
  • Refactor "card" display for part table
  • Refactor "label" classes (very different in v5)
  • Refactor "detail" panel for major screens to be more "bootstrappy"
  • Enforce "breadcrumb" view for each page (and standardize)
  • Search results page
  • Index page
  • Settings page
  • Refactor "button group" instances - perhaps a html template here?
  • Refactor "table filters" UI (see comment below) (will leave for a separate PR)
  • Use CSS custom properties to allow for easier theming
  • Replace all instances of "data-toggle" with "data-bs-toggle"
  • Remove all instances of "action-buttons" class
  • Remove all instances of "btn-default"
  • Remove all references to "two_column.html" template
  • Replace "media" and "media-left" with "card"
  • Replace "panel" with "card"
  • Replace "label" width "badge" - https://getbootstrap.com/docs/5.0/components/badge/
  • Fix action buttons in "part category" and "stock location" display (see comment below)
  • Remove all instances of "{% block menubar %}"
  • Remove all instances of "enableNavbar" (replace with enableSidebar)
  • Remove all instances of "attachNavCallbacks"
  • Remove all instances of "sideNav"
  • Replace "tree view" for parts and stock
  • Refactor all existing "admin" buttons

@SchrodingersGat SchrodingersGat self-assigned this Oct 26, 2021
@SchrodingersGat SchrodingersGat added enhancement This is an suggested enhancement or new feature user interface User interface labels Oct 26, 2021
@matmair
Copy link
Member

matmair commented Oct 26, 2021

@SchrodingersGat I tried to do this and esp. bootstrap tables does some wired stuff with bootstrap 5. Also, we probably need js-tree or something similar for the nice trees on the side.

Testing this PR will be a challenge as there is a ton of js-code than ingests strings into the UI. Def something that is needed 👍 .

@SchrodingersGat
Copy link
Member Author

@matmair absolutely this will be a tough one to test. I think it is worth the transition, though!

- Update bootstrap classes and terminology
- Visual tweaks to modal form title block
@SchrodingersGat
Copy link
Member Author

Filter input boxes mess around with btn-group:

image

- Fix css classes
Copy link
Member

@matmair matmair left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that should make the mobile / tablet experience a lot nicer

@SchrodingersGat
Copy link
Member Author

Action buttons are weird, but only in "part category" and "stock location" views:

image

SchrodingersGat added a commit to inventree/inventree-docs that referenced this pull request Oct 30, 2021
@SchrodingersGat
Copy link
Member Author

@matmair @eeintech I'm pretty happy with this now, can you guys please pull this down and see if anything obvious stands out? It is a pretty major overhaul of the front-end visuals, so feedback is appreciated!

@matmair
Copy link
Member

matmair commented Oct 30, 2021

@matmair @eeintech I'm pretty happy with this now, can you guys please pull this down and see if anything obvious stands out? It is a pretty major overhaul of the front-end visuals, so feedback is appreciated!

Already have done that throughout the process, there seem to be some problems with wrapping on upright iPads - will submit a PR to fix that

@matmair
Copy link
Member

matmair commented Oct 30, 2021

Looks really nice by the way. Should we refactor the themes too?

@SchrodingersGat
Copy link
Member Author

there seem to be some problems with wrapping on upright iPads - will submit a PR to fix that

Should we refactor the themes too?

Yes, to both these things. Let's address these with separate PRs.

@matmair
Copy link
Member

matmair commented Oct 30, 2021

@SchrodingersGat is it intentional that the treeview for parts and stock locations is not there anymore? I found that feature very handy.

@SchrodingersGat
Copy link
Member Author

@matmair the "tree view" is now implemented in the subcategory and sublocation tables, like so:

image

You can toggle this view in the top-right of the table:

image

Does this meet your needs? The dedicated tree views could be added back in but I'd do it a different way now, the old method was very inefficient.

@matmair
Copy link
Member

matmair commented Oct 31, 2021

@SchrodingersGat we should document any major UI shifts in the release notes so nobody gets confused

@sintech
Copy link
Contributor

sintech commented Nov 3, 2021

Does this meet your needs? The dedicated tree views could be added back in but I'd do it a different way now, the old method was very inefficient.

@SchrodingersGat, sorry to intrude, but I also find this treeview very helpful for quick navigation. As a suggestion, what do you think about adding a drop-down list with part subcategories near the current breadcrumbs. In this way it will consume only one line of vertical screen space and you still be only one click away from any subcategory.

@SchrodingersGat
Copy link
Member Author

@sintech @matmair happy to add it back in, as it seems it was appreciated.

@sintech can you describe your idea further? Maybe an example diagram?

@matmair
Copy link
Member

matmair commented Nov 3, 2021

@SchrodingersGat I am happy with the current solution. Just needed to be pointed to the filter.

@sintech
Copy link
Contributor

sintech commented Nov 4, 2021

@SchrodingersGat, I have created new FR with mockups #2250.

@SchrodingersGat SchrodingersGat added this to the 0.6.0 milestone Feb 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This is an suggested enhancement or new feature user interface User interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FR] Current bootstrap version
3 participants