Repository navigation
[19.0][ADD] web_chatter_resizable - #3775
lucaorioli wants to merge 1 commit into
Conversation
|
Hello, this is quite interesting. Have you seen previous attempts at this in #2976, #3125, and #3668? I also made an attempt in #3703 (41de571) using odoo's native I would love to hear your opinion and arguments for the different approaches. I preferred reusing the odoo component in order to avoid duplicating logic as much as possible, but it came with its own complications. |
f26ee1c to
8cfea34
Compare
|
Hi @ljmnoonan, thanks for the pointers! I had looked at the 16.0 I also considered
On top of that, the width is stored per view type (forms vs. kanban with a side chatter). There is also an optional user preference to let the form sheet use the room freed by the chatter. The duplicated logic is small (~60 lines with pointer events, RTL and clamping). I agree reusing core components is preferable when they fit. If I also tested it together with the current If #3703 lands, one option would be for |
|
@lucaorioli you are right about the limitations on the behavior of I do not use enterprise, so I did not know about the side chatter without a form. I suppose the I do like the "return to default" behavior of this implementation, and in general it seems smoother. I do not believe the My changes to Lastly, it may be worth getting rid of because they limit the growth of the form renderer on ultra wide screens. This is fine when the chatter is a fixed width, but now we have the possibility to make the screen very wide and basically have the form and the chatter each take up the width of a regular size screen.
Again, thanks for your work on this. I think yours is the right approach |
8cfea34 to
5178373
Compare
|
Thanks a lot @ljmnoonan, both for the review and for planning to build on this module for 20.0! I agree with you on the user setting and removed it. The idea behind it was to let the form sheet use the room freed by a narrower chatter. In practice it only made a difference on very wide screens: with a side chatter, Odoo 19 already lets the sheet grow up to 2560px. And as you say, the handle is already the control. If the form gets too wide, the user can widen the chatter. So now, once the chatter has been resized, the form renderer and the sheet beside it lose their maximum width and fill all the room left by the chatter. For example, on a 3440px screen with the chatter at 300px, the sheet now grows to ~3100px instead of stopping at 2560px with an empty gap. I scoped this to forms whose chatter has been resized rather than to all form views. Until the handle is used, the layout stays exactly as in core (or as set by What do you think about this scoping? Would you rather lift the limits as soon as the chatter is beside the form, even before it is resized? |
|
I think it should not be scoped. Having this scope creates a jump when you resize for the first time or reset. 2026-10-30.08-26-08.mp4 |
5178373 to
3712218
Compare
|
Good point, thanks for the video. Done: the maximum widths of the form renderer and of the sheet are now lifted on every form with a side chatter, resized or not, so there is no jump on the first resize or on reset. Forms without a chatter, wizards and forms with the chatter below are left as in core. |
|
Hello, @lucaorioli, sorry for the long delay. I also took another look at using There are two points I think should be implemented here though: The resizable handle is too similar to a scrollbar. I wasn't sure what to recommend as a replacement, but then I found that odoo is already working on this here: odoo/odoo@bbca5b2. I think it would be best to just copy this behavior. The side chatter is not meant to get narrower than 530px. Doing so seems to cause some stuttering and it just does not look good. What do you think of setting this as a minimum, and then introducing a show/hide chatter button by the pagers just like enterprise has in documents and bank statements? |
3712218 to
37b82b1
Compare
|
Thanks @ljmnoonan, no worries about the delay, and thanks for the two branches! Done in the last push:
It's getting more complex than my initial design: very interesting! But I needed some help, so I'm adding an |
…edge Assisted-by: Claude Opus 5.5
37b82b1 to
8b3df0d
Compare


New module
web_chatter_resizable: the chatter shown beside a view can be resized by dragging its edge.What it does
ChatterwithisChatterAside): a thin line shows when the pointer rests on it; drag it to change the width, double-click it to restore the standard width.$o-mail-Chatter-minWidth, or below the standard width of chatters that are narrower by design (e.g. the Enterprise bank reconciliation, whoseBankRecChatterextendsChatter).localStorage), one value per kind of view.How
mail.Chattertemplate and class, plus the form controller for the show/hide button: noMutationObserver, nothing changes for chatters below the view.How to test
Hoot tests in
static/tests/, run throughtests/test_js.py.Assisted-by: Claude Opus 5.5