Skip to content

[FIX] side_panel: replace side panel instead of stacking it #6783

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

Open
wants to merge 1 commit into
base: saas-18.4
Choose a base branch
from

Conversation

rmbh-odoo
Copy link
Contributor

@rmbh-odoo rmbh-odoo commented Jul 10, 2025

Description:

Steps to reproduce:

  • Open the global filter side panel (list of all filters)
  • Pin the panel
  • Click on a specific filter to view/edit it

Current behavior before PR:

  • A second side panel was opened instead of replacing the current one
  • Clicking 'Cancel' on the new panel had no effect
  • Clicking 'Remove' caused a traceback

Desired behavior after PR is merged:

  • The new side panel replaces the current one (main or secondary)
  • The previous panel is restored correctly on 'Cancel' or 'Remove'
  • If the new panel is already open, we simply close the current one

Task: 4911603

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 Jul 10, 2025

Pull request status dashboard

Copy link
Contributor

@dhrp-odoo dhrp-odoo left a comment

Choose a reason for hiding this comment

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

👋

The spec in the pad about drilling down the main panel doesn’t seem to be working. I think it might need some refactoring. If that’s the case, it should be done in master.

@rmbh-odoo rmbh-odoo force-pushed the saas-18.4-fix-reopen-sidepanel-from-child-rmbh branch 2 times, most recently from 5520e2b to bb189c5 Compare July 15, 2025 09:58
@rmbh-odoo rmbh-odoo changed the title [FIX] side_panel: reopen active panel from sub panel closes sub panel [FIX] side_panel: fix open/close logic for nested navigation Jul 15, 2025
@rmbh-odoo rmbh-odoo force-pushed the saas-18.4-fix-reopen-sidepanel-from-child-rmbh branch from bb189c5 to db3faaa Compare July 15, 2025 11:46
Copy link
Contributor

@hokolomopo hokolomopo left a comment

Choose a reason for hiding this comment

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

👋

@rmbh-odoo rmbh-odoo force-pushed the saas-18.4-fix-reopen-sidepanel-from-child-rmbh branch 2 times, most recently from 988075d to ec38ef6 Compare July 22, 2025 11:04
@rmbh-odoo rmbh-odoo changed the title [FIX] side_panel: fix open/close logic for nested navigation [FIX] side_panel: replace side panel instead of stacking it Jul 22, 2025
@rmbh-odoo rmbh-odoo force-pushed the saas-18.4-fix-reopen-sidepanel-from-child-rmbh branch 2 times, most recently from e148dc3 to 0cf4351 Compare July 29, 2025 13:33
return;
}
const expandMainPanelIfCollapsed = () => {
if (this.mainPanel?.isCollapsed) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

why not expending it whatever happens?

Copy link
Contributor Author

@rmbh-odoo rmbh-odoo Jul 30, 2025

Choose a reason for hiding this comment

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

I considered the same, but found a case where just expanding isn’t enough.

If the user has resized the panel (without collapsing), we shouldn't override it.
So we check if the panel was resized; if not, apply the default size.
I think the current check is better than checking the panel size directly.
REF : sourceLink

What do you think 🤔

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think i's not that easy to follow what goes on in that panel :p

Indeed it looks necessary :)

Steps to reproduce:
- Open the global filter side panel (list of all filters)
- Pin the panel
- Click on a specific filter to view/edit it

Before this commit:
- A second side panel was opened instead of replacing the current one
- Clicking 'Cancel' on the new panel had no effect
- Clicking 'Remove' caused a traceback

After this commit:
- The new side panel replaces the current one (main or secondary)
- The previous panel is restored correctly on 'Cancel' or 'Remove'
- If the new panel is already open, we simply close the current one

Task: 4911603
@rmbh-odoo rmbh-odoo force-pushed the saas-18.4-fix-reopen-sidepanel-from-child-rmbh branch from 0cf4351 to 98b5144 Compare July 30, 2025 06:37
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.

5 participants