Skip to content

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

Closed
fw-bot wants to merge 2 commits intoodoo:13.0from
odoo-dev:13.0-12.0-rtl-dropdown-lpe-BF7D-fw
Closed

[FW][FIX] web: dropdown in modal in RTL mode#39620
fw-bot wants to merge 2 commits intoodoo:13.0from
odoo-dev:13.0-12.0-rtl-dropdown-lpe-BF7D-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: #39541
Forward-Port-Of: #39353

@fw-bot
Copy link
Contributor Author

fw-bot commented Oct 31, 2019

Ping @kebeclibre
Cherrypicking 30f02b9 of source #39353 failed

stderr:

error: could not apply 30f02b9f980... [FIX] web: dropdowns can't be in a relative-positioned element
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
Recorded preimage for 'addons/web/static/src/xml/base.xml'

Either perform the forward-port manually (and push to this branch, proceeding as usual) or close this PR (maybe?).

In the former case, you may want to edit this PR message as well.

@robodoo robodoo added conflict There was an error while creating this forward-port PR forwardport This PR was created by @fw-bot labels 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

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
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

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
@kebeclibre kebeclibre force-pushed the 13.0-12.0-rtl-dropdown-lpe-BF7D-fw branch from 1101b39 to 4899362 Compare October 31, 2019 08:52
@kebeclibre
Copy link
Contributor

robodoo rebase-ff
robodoo r+

@robodoo
Copy link
Contributor

robodoo commented Oct 31, 2019

Merge method set to rebase and fast-forward

@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 robodoo closed this in 7f72b83 Oct 31, 2019
@robodoo
Copy link
Contributor

robodoo commented Oct 31, 2019

Merged at 7f72b83, thanks!

@fw-bot fw-bot deleted the 13.0-12.0-rtl-dropdown-lpe-BF7D-fw branch November 14, 2019 11: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 conflict There was an error while creating this forward-port PR 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