[FW][FIX] web: dropdown in modal in RTL mode#39620
Closed
Conversation
Contributor
Author
|
Ping @kebeclibre stderr: 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. |
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>
1101b39 to
4899362
Compare
Contributor
|
robodoo rebase-ff |
Contributor
|
Merge method set to rebase and fast-forward |
Contributor
|
Merged at 7f72b83, thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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