Skip to content

[18.0][IMP] web_chatter_position: add toggle button for chatter position#3453

Open
JoanSForgeFlow wants to merge 1 commit intoOCA:18.0from
ForgeFlow:18.0-imp-web_chatter_position
Open

[18.0][IMP] web_chatter_position: add toggle button for chatter position#3453
JoanSForgeFlow wants to merge 1 commit intoOCA:18.0from
ForgeFlow:18.0-imp-web_chatter_position

Conversation

@JoanSForgeFlow
Copy link
Contributor

No description provided.

@OCA-git-bot
Copy link
Contributor

Hi @trisdoan,
some modules you are maintaining are being modified, check this out!

Copy link

@AaronHForgeFlow AaronHForgeFlow left a comment

Choose a reason for hiding this comment

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

It works well, awesome feature. Nitpicking alert: I would add the button on the right part of the screen, having it next to the "New" button feels rare.

@JoanSForgeFlow JoanSForgeFlow force-pushed the 18.0-imp-web_chatter_position branch from 7fd3e88 to 05c6f39 Compare February 26, 2026 08:15
@JoanSForgeFlow
Copy link
Contributor Author

Hi @AaronHForgeFlow,

The button was there in previous versions, 15.0 and earlier.

Copy link

@AaronHForgeFlow AaronHForgeFlow left a comment

Choose a reason for hiding this comment

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

Ok! Thanks for the clarification! LGTM.

@arch-fan
Copy link
Contributor

This is now implemented at #3444

@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

Copy link
Contributor

@alexey-pelykh alexey-pelykh left a comment

Choose a reason for hiding this comment

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

Thanks for this, Joan -- a toggle button is a very welcome addition.

Code looks solid overall. A few observations:

  1. Compiler vs runtime interaction: The existing module positions the chatter at compile time via FormCompiler.compile(). This PR adds runtime repositioning via DOM manipulation in FormController. When the user preference is "auto" (compiler does nothing special), the toggle still appears and switches to "bottom" on first click, which works because _moveChatter handles the class/DOM changes. Worth noting this dual approach in case of future refactors to the compiler patch -- the two mechanisms need to stay in sync.

  2. Toggle state is ephemeral: The toggled position lives only in component state and resets on navigation. If that's intentional (per-session override), maybe worth a brief note in the README. If persistence is desired eventually, an RPC to update the user preference would be the way to go.

  3. Minor: moveChatter() is called from both onMounted and onPatched, which is correct to handle initial render and subsequent OWL re-renders. The resize listener for "bottom" is a nice touch for responsive behavior.

LGTM -- nice feature.

@JoanSForgeFlow
Copy link
Contributor Author

Hi @arch-fan,

From my point of view, this PR is not duplicating web_toggle_chatter.

The goal here is to restore the possibility of moving the chatter to the bottom, which existed in previous versions of web_chatter_position but was lost during the migrations. This PR simply reintroduces that functionality so it is not lost.

Also, the behavior is different: web_toggle_chatter temporarily collapses the chatter, while this module allows moving the chatter between the side and the bottom. Because of that, both features can actually be complementary.

If there are concerns about the visibility of the button or the UX, we could also make the button optional, for example by showing it only when enabled through a configuration option

Thank you

@arch-fan
Copy link
Contributor

arch-fan commented Mar 6, 2026

Ahh just for moving the chatter ATM. I thought it was just for collapsing. Ok sorry, great PR 🙏 GJ

@JoanSForgeFlow
Copy link
Contributor Author

Hi @etobella

Could you take a look when you get a chance?

It would be great if you could merge it if everything looks good to you.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants