Skip to content

[FIX] web: dropdown in modal in RTL mode#39353

Closed
kebeclibre wants to merge 1 commit intoodoo:12.0from
odoo-dev:12.0-rtl-dropdown-lpe
Closed

[FIX] web: dropdown in modal in RTL mode#39353
kebeclibre wants to merge 1 commit intoodoo:12.0from
odoo-dev:12.0-rtl-dropdown-lpe

Conversation

@kebeclibre
Copy link
Contributor

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

@kebeclibre kebeclibre force-pushed the 12.0-rtl-dropdown-lpe branch from 249356e to 4d718c4 Compare October 24, 2019 15:32
@qsm-odoo qsm-odoo removed their request for review October 24, 2019 15:54
@C3POdoo C3POdoo added the RD research & development, internal work label Oct 24, 2019
@robodoo robodoo added the CI 🤖 Robodoo has seen passing statuses label Oct 24, 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
@kebeclibre kebeclibre force-pushed the 12.0-rtl-dropdown-lpe branch from 4d718c4 to d7ef92b Compare October 29, 2019 15:47
@robodoo robodoo removed the CI 🤖 Robodoo has seen passing statuses label Oct 29, 2019
@kebeclibre
Copy link
Contributor Author

robodoo r+

@robodoo robodoo added r+ 👌 CI 🤖 Robodoo has seen passing statuses labels Oct 29, 2019
robodoo pushed a commit that referenced this pull request Oct 29, 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

closes #39353

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
@robodoo
Copy link
Contributor

robodoo commented Oct 29, 2019

Merged at f65bdd1, thanks!

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 RD research & development, internal work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants