Skip to content

[FW][FIX] web: dropdown in modal in RTL mode#39636

Closed
fw-bot wants to merge 2 commits intoodoo:masterfrom
odoo-dev:master-12.0-rtl-dropdown-lpe-3dKA-fw
Closed

[FW][FIX] web: dropdown in modal in RTL mode#39636
fw-bot wants to merge 2 commits intoodoo:masterfrom
odoo-dev:master-12.0-rtl-dropdown-lpe-3dKA-fw

Conversation

@fw-bot
Copy link
Contributor

@fw-bot fw-bot commented Oct 31, 2019

Be in Right to left

Open a m2o search more, to get onto the list modal
toggle the filters menu

Before this commit, the filters dropdown was almost invisble
and too much on the right anyway

This was because the RTL was not taken into account

After this commit, we anchor the dropdown on the right
(both as in good and as in side) side of its trigger button

Also, when modifying the dropdown, by developping the Custom Filter
we force the repositioning of the dropdown, to take those new elements
into account

Description of the issue/feature this PR addresses:

Current behavior before PR:

Desired behavior after PR is merged:

--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

Forward-Port-Of: #39620
Forward-Port-Of: #39353

Be in Right to left

Open a m2o search more, to get onto the list modal
toggle the filters menu

Before this commit, the filters dropdown was almost invisble
and too much on the right anyway

This was because the RTL was not taken into account

After this commit, we anchor the dropdown on the right
(both as in good and as in side) side of its trigger button

Also, when modifying the dropdown, by developping the Custom Filter
we force the repositioning of the dropdown, to take those new elements
into account

It is expected though that after this commit, in RTL, the
dropdown in a modal that has a scrollbar (which is on the left)
will be slightly pushed to the right. It is usable and visible though
Some kind of plumbing using $el.data('offset', fn) from popper.js
is possible, but has been deemed not robust enough

Docs
https://getbootstrap.com/docs/4.0/components/dropdowns/#methods

OPW 2088934

X-original-commit: 105b4af
Before this commit, when a dropdown overflew its container
i.e. in the case of a long filter menu in modal
The scrolling of that dropdown to get to Add custom Filter
was impossible

This was because dropdowns react pretty bad when contained in a
relative positioned container

twbs/bootstrap#26512
twbs/bootstrap#28513 !!

After this commit, the btn-group that adds the relative positioning
is forced into the default value

This commit corrects what was initially
corrected at odoo#37594
in v12.0.
The incriminating commit that retriggers the issue
is irrelevant because it is the refactoring of action manager
but here it is: 40dd121

closes odoo#39541

Original-signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
X-original-commit: 7f72b83
@fw-bot
Copy link
Contributor Author

fw-bot commented Oct 31, 2019

Ping @kebeclibre
This PR targets master and is the last of the forward-port chain.

To merge the full chain, say

@fw-bot r+

More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port

@robodoo robodoo added the forwardport This PR was created by @fw-bot label Oct 31, 2019
@kebeclibre
Copy link
Contributor

@fw-bot r+

@C3POdoo C3POdoo added the RD research & development, internal work label Oct 31, 2019
@robodoo robodoo added the CI 🤖 Robodoo has seen passing statuses label Oct 31, 2019
robodoo pushed a commit that referenced this pull request Oct 31, 2019
Before this commit, when a dropdown overflew its container
i.e. in the case of a long filter menu in modal
The scrolling of that dropdown to get to Add custom Filter
was impossible

This was because dropdowns react pretty bad when contained in a
relative positioned container

twbs/bootstrap#26512
twbs/bootstrap#28513 !!

After this commit, the btn-group that adds the relative positioning
is forced into the default value

This commit corrects what was initially
corrected at #37594
in v12.0.
The incriminating commit that retriggers the issue
is irrelevant because it is the refactoring of action manager
but here it is: 40dd121

closes #39541

closes #39636

Original-signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
X-original-commit: 7f72b83
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
@robodoo
Copy link
Contributor

robodoo commented Oct 31, 2019

Merged at c40e06f, thanks!

@robodoo robodoo closed this Oct 31, 2019
@fw-bot fw-bot deleted the master-12.0-rtl-dropdown-lpe-3dKA-fw branch November 14, 2019 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI 🤖 Robodoo has seen passing statuses forwardport This PR was created by @fw-bot RD research & development, internal work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants