Skip to content

Conversation

hokolomopo
Copy link
Contributor

@hokolomopo hokolomopo commented Sep 2, 2025

[IMP] carousels: add dropdown when too many tabs

This commit hide the carousel tabs to prevent them from overflowing
outside of the figure, and adds the hidden tabs in a dropdown menu.

[IMP] figures: add drag threshold

When clicking on a figure, a very small mouse movement between the
mousedown and mouseup events could trigger a drag and drop operation,
canceling the click event. This is particularly annoying when trying
to interact with carousels, as they have a lot of clickable areas.

Most applications use a drag threshold, allowing small mouse movements
to be ignored. This commit adds a drag threshold for figures.

Also fixed some test that checked for the o-dragging class on figure.
That class does not exist for figures.

[IMP] test: add expect.toHaveStyle jest matcher

This commit adds a custom jest matcher toHaveStyle to check if a DOM
element has a specific CSS style properties applied.

Task: 5059476

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 Sep 2, 2025

Pull request status dashboard

@hokolomopo hokolomopo force-pushed the master-carousel-tabs-adrm branch from 2cd0864 to f62ef6c Compare September 2, 2025 11:13
This commit adds a custom jest matcher `toHaveStyle` to check if a DOM
element has a specific CSS style properties applied.

Task: 5059476
@hokolomopo hokolomopo force-pushed the master-carousel-tabs-adrm branch from f62ef6c to acaac3d Compare September 10, 2025 07:01
When clicking on a figure, a very small mouse movement between the
mousedown and mouseup events could trigger a drag and drop operation,
canceling the click event. This is particularly annoying when trying
to interact with carousels, as they have a lot of clickable areas.

Most applications use a drag threshold, allowing small mouse movements
to be ignored. This commit adds a drag threshold for figures.

Also fixed some test that checked for the `o-dragging` class on figure.
That class does not exist for figures.

Task: 5059476
When there is a lot of carousel tabs, we want to hide some of them and
add the hidden tabs in a dropdown menu.

Task: 5059476
@hokolomopo hokolomopo force-pushed the master-carousel-tabs-adrm branch from acaac3d to 6fe2dc3 Compare September 10, 2025 13:45
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.

2 participants