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

[IMP] TopBar: Add responsiveness #5647

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

rrahir
Copy link
Collaborator

@rrahir rrahir commented Feb 6, 2025

Description:

description of this task, what is implemented and why it is implemented that way.

Task: TASK_ID

review checklist

  • feature is organized in plugin, or UI components
  • support of duplicate sheet (deep copy)
  • in model/core: ranges are Range object, and can be adapted (adaptRanges)
  • in model/UI: ranges are strings (to show the user)
  • undo-able commands (uses this.history.update)
  • multiuser-able commands (has inverse commands and transformations where needed)
  • new/updated/removed commands are documented
  • exportable in excel
  • translations (_t("qmsdf %s", abc))
  • unit tested
  • clean commented code
  • track breaking changes
  • doc is rebuild (npm run doc)
  • status is correct in Odoo

@robodoo
Copy link
Collaborator

robodoo commented Feb 6, 2025

Pull request status dashboard

@rrahir rrahir force-pushed the master-responsive-rar branch 2 times, most recently from e2ad9aa to 5fa420b Compare February 6, 2025 17:33
@rrahir rrahir changed the title Master responsive rar [IMP] TopBar: Responsiveness Feb 7, 2025
@rrahir rrahir force-pushed the master-responsive-rar branch 8 times, most recently from 7e3b1c9 to a746e32 Compare February 9, 2025 17:39
@rrahir rrahir changed the title [IMP] TopBar: Responsiveness [IMP] TopBar: Add responsiveness Feb 9, 2025
@rrahir rrahir force-pushed the master-responsive-rar branch from a746e32 to 24ead17 Compare February 9, 2025 17:48
@rrahir rrahir force-pushed the master-responsive-rar branch from 24ead17 to 53d8940 Compare February 17, 2025 10:44
The current top bar does not behave well on narrow screens, the top bar
composer will disappear and the whole layout will become scrollable
because of it. Past the composer, the toolbox is also quite large.

This revision adds some responsiveness by:
- pushing the top bar composer to the bottom of top bar when the latter
  is too narrow
- hiding some items from the toolbar in a popover when necessary

Task: 4562073
@rrahir rrahir force-pushed the master-responsive-rar branch from 53d8940 to bf95e66 Compare February 17, 2025 11:34
Copy link
Collaborator

@pro-odoo pro-odoo left a comment

Choose a reason for hiding this comment

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

Nice one 👍 It's easier to read the topbar template now, and we can add items from odoo !
I have one concern, if we add an item from odoo, it will break the display with the hardcoded threshold :/
Didn't read all the tests, my comments are mainly nitpick.
I added a screenshot in the pad.

@rrahir
Copy link
Collaborator Author

rrahir commented Feb 17, 2025

I have one concern, if we add an item from odoo, it will break the display with the hardcoded threshold :/

we could alternatively decide to set the section size in the registry itself, with a sequence. Otherwise we could decide to apply a rule by counting the number of items in each section and use it to define the thresholds. I don't know if we need it right now though

@rrahir rrahir force-pushed the master-responsive-rar branch from cbb9198 to 227940f Compare February 18, 2025 09:58
import { useToolBarDropdownStore } from "../../helpers/top_bar_tool_hook";
import { Menu } from "../../menu/menu";

formatNumberMenuItemSpec;
Copy link
Collaborator

Choose a reason for hiding this comment

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

👀

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.

4 participants