Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the closest variant for "t-portal" #1428

Open
rfr-odoo opened this issue May 8, 2023 · 2 comments
Open

Add the closest variant for "t-portal" #1428

rfr-odoo opened this issue May 8, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@rfr-odoo
Copy link
Contributor

rfr-odoo commented May 8, 2023

Actually the portal is place in the first match for the specified selector, but when a component is set a second times (in a model for example) the second portal goes behind the modal.
It is possible to add a closest variant to the t-portal ?

e.g.:

<t t-name="web.SearchBar" owl="1">
	<div t-if="state.showSearchBar" class="o_cp_searchview" t-ref="root">
		<SearchBarMenu/>
	</div>
	<t t-portal.closest="'.o_control_panel_navigation'">
		<button t-on-click="onToggleSearchBar">
			<i class="fa fa-fw fa-search"/>
		</button>
	</t>
</t>

Actual result in OWL

BODY
-.control_panel
--.o_control_panel_navigation
---button [1]
---button [2]
--.o_cp_searchview [1]
-.modal
--.control_panel
---.o_control_panel_navigation
---.o_cp_searchview [2]

Desired result

BODY
-.control_panel
--.o_control_panel_navigation
---button [1]
--.o_cp_searchview [1]
-.modal
--.control_panel
---.o_control_panel_navigation
----button [2]
---.o_cp_searchview [2]
@brboi
Copy link
Contributor

brboi commented May 10, 2023

Maybe it shouldn't be an option and instead be the standard behavior

@ged-odoo
Copy link
Contributor

i thought about this, but it would be a breaking change, and seems wrong

@sdegueldre sdegueldre added the enhancement New feature or request label May 16, 2023
pparidans added a commit to odoo-dev/odoo that referenced this issue Apr 4, 2024
Note: as we don't have a way to have a relative selector in `t-portal`,
a unique class had to be added to the ListRenderer. The point is to
target the parent list instead of the first in the page (cf.
odoo/owl#1428).

References:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1887116
- https://bugs.webkit.org/show_bug.cgi?id=160953
pparidans pushed a commit to odoo-dev/odoo that referenced this issue Apr 4, 2024
On firefox and safari applying a position-sticky on an element inside
an other element with an overflow is causing a rendering issue (see
issue [1]).

This was occuring with the dropdown `.o_optional_columns_dropdown`
making it unusable as soon as the `overflow-x` triggered the horizontal
scroll in the table.

This commit works around this bug by moving the dropdown's menu out of
the actual table and attachs it to the ListRender's root element.

As this issue is specific to the Optional Fields dropdown, we
implemented it only in the ListRender (and not for all Dropdowns). Also
the issue is not present anymore in master since the Dropdown
refactoring (see PR [2]).

Note: a unique class identifying the ListRenderer has been introduced to
handle multiple List Views rendered at the same time (in the same view,
in modal...) as the the `t-portal` requires a global selector and
doesn't allow to use relative one (i.e. searching only the parents ; cf.
OWL feature request [3]).

task-3696473
opw-3682280
opw-3697814

X-original-commit: 01cd6d4

[1]: https://bugzilla.mozilla.org/show_bug.cgi?id=1887116
[2]: odoo#137691
[3]: odoo/owl#1428
robodoo pushed a commit to odoo/odoo that referenced this issue Apr 4, 2024
On firefox and safari applying a position-sticky on an element inside
an other element with an overflow is causing a rendering issue (see
issue [1]).

This was occuring with the dropdown `.o_optional_columns_dropdown`
making it unusable as soon as the `overflow-x` triggered the horizontal
scroll in the table.

This commit works around this bug by moving the dropdown's menu out of
the actual table and attachs it to the ListRender's root element.

As this issue is specific to the Optional Fields dropdown, we
implemented it only in the ListRender (and not for all Dropdowns). Also
the issue is not present anymore in master since the Dropdown
refactoring (see PR [2]).

Note: a unique class identifying the ListRenderer has been introduced to
handle multiple List Views rendered at the same time (in the same view,
in modal...) as the the `t-portal` requires a global selector and
doesn't allow to use relative one (i.e. searching only the parents ; cf.
OWL feature request [3]).

task-3696473
opw-3682280
opw-3697814

X-original-commit: 01cd6d4

[1]: https://bugzilla.mozilla.org/show_bug.cgi?id=1887116
[2]: #137691
[3]: odoo/owl#1428

closes #153952

Related: odoo/enterprise#60079
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
fw-bot pushed a commit to odoo-dev/odoo that referenced this issue Apr 4, 2024
On firefox and safari applying a position-sticky on an element inside
an other element with an overflow is causing a rendering issue (see
issue [1]).

This was occuring with the dropdown `.o_optional_columns_dropdown`
making it unusable as soon as the `overflow-x` triggered the horizontal
scroll in the table.

This commit works around this bug by moving the dropdown's menu out of
the actual table and attachs it to the ListRender's root element.

As this issue is specific to the Optional Fields dropdown, we
implemented it only in the ListRender (and not for all Dropdowns). Also
the issue is not present anymore in master since the Dropdown
refactoring (see PR [2]).

Note: a unique class identifying the ListRenderer has been introduced to
handle multiple List Views rendered at the same time (in the same view,
in modal...) as the the `t-portal` requires a global selector and
doesn't allow to use relative one (i.e. searching only the parents ; cf.
OWL feature request [3]).

task-3696473
opw-3682280
opw-3697814

X-original-commit: 01cd6d4

[1]: https://bugzilla.mozilla.org/show_bug.cgi?id=1887116
[2]: odoo#137691
[3]: odoo/owl#1428

X-original-commit: 9a9da10
pparidans pushed a commit to odoo-dev/odoo that referenced this issue Apr 5, 2024
On firefox and safari applying a position-sticky on an element inside
an other element with an overflow is causing a rendering issue (see
issue [1]).

This was occuring with the dropdown `.o_optional_columns_dropdown`
making it unusable as soon as the `overflow-x` triggered the horizontal
scroll in the table.

This commit works around this bug by moving the dropdown's menu out of
the actual table and attachs it to the ListRender's root element.

As this issue is specific to the Optional Fields dropdown, we
implemented it only in the ListRender (and not for all Dropdowns). Also
the issue is not present anymore in master since the Dropdown
refactoring (see PR [2]).

Note: a unique class identifying the ListRenderer has been introduced to
handle multiple List Views rendered at the same time (in the same view,
in modal...) as the the `t-portal` requires a global selector and
doesn't allow to use relative one (i.e. searching only the parents ; cf.
OWL feature request [3]).

task-3696473
opw-3682280
opw-3697814

X-original-commit: 01cd6d4

[1]: https://bugzilla.mozilla.org/show_bug.cgi?id=1887116
[2]: odoo#137691
[3]: odoo/owl#1428

X-original-commit: 9a9da10
robodoo pushed a commit to odoo/odoo that referenced this issue Apr 5, 2024
On firefox and safari applying a position-sticky on an element inside
an other element with an overflow is causing a rendering issue (see
issue [1]).

This was occuring with the dropdown `.o_optional_columns_dropdown`
making it unusable as soon as the `overflow-x` triggered the horizontal
scroll in the table.

This commit works around this bug by moving the dropdown's menu out of
the actual table and attachs it to the ListRender's root element.

As this issue is specific to the Optional Fields dropdown, we
implemented it only in the ListRender (and not for all Dropdowns). Also
the issue is not present anymore in master since the Dropdown
refactoring (see PR [2]).

Note: a unique class identifying the ListRenderer has been introduced to
handle multiple List Views rendered at the same time (in the same view,
in modal...) as the the `t-portal` requires a global selector and
doesn't allow to use relative one (i.e. searching only the parents ; cf.
OWL feature request [3]).

task-3696473
opw-3682280
opw-3697814

X-original-commit: 01cd6d4

[1]: https://bugzilla.mozilla.org/show_bug.cgi?id=1887116
[2]: #137691
[3]: odoo/owl#1428

closes #160553

X-original-commit: 9a9da10
Related: odoo/enterprise#60109
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
robodoo pushed a commit to odoo/odoo that referenced this issue Apr 5, 2024
On firefox and safari applying a position-sticky on an element inside
an other element with an overflow is causing a rendering issue (see
issue [1]).

This was occuring with the dropdown `.o_optional_columns_dropdown`
making it unusable as soon as the `overflow-x` triggered the horizontal
scroll in the table.

This commit works around this bug by moving the dropdown's menu out of
the actual table and attachs it to the ListRender's root element.

As this issue is specific to the Optional Fields dropdown, we
implemented it only in the ListRender (and not for all Dropdowns). Also
the issue is not present anymore in master since the Dropdown
refactoring (see PR [2]).

Note: a unique class identifying the ListRenderer has been introduced to
handle multiple List Views rendered at the same time (in the same view,
in modal...) as the the `t-portal` requires a global selector and
doesn't allow to use relative one (i.e. searching only the parents ; cf.
OWL feature request [3]).

task-3696473
opw-3682280
opw-3697814

X-original-commit: 01cd6d4

[1]: https://bugzilla.mozilla.org/show_bug.cgi?id=1887116
[2]: #137691
[3]: odoo/owl#1428

closes #160566

X-original-commit: 9a9da10
Related: odoo/enterprise#60116
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
pparidans pushed a commit to odoo-dev/odoo that referenced this issue Apr 5, 2024
On firefox and safari applying a position-sticky on an element inside
an other element with an overflow is causing a rendering issue (see
issue [1]).

This was occuring with the dropdown `.o_optional_columns_dropdown`
making it unusable as soon as the `overflow-x` triggered the horizontal
scroll in the table.

This commit works around this bug by moving the dropdown's menu out of
the actual table and attachs it to the ListRender's root element.

As this issue is specific to the Optional Fields dropdown, we
implemented it only in the ListRender (and not for all Dropdowns). Also
the issue is not present anymore in master since the Dropdown
refactoring (see PR [2]).

Note: a unique class identifying the ListRenderer has been introduced to
handle multiple List Views rendered at the same time (in the same view,
in modal...) as the the `t-portal` requires a global selector and
doesn't allow to use relative one (i.e. searching only the parents ; cf.
OWL feature request [3]).

task-3696473
opw-3682280
opw-3697814

X-original-commit: 01cd6d4

[1]: https://bugzilla.mozilla.org/show_bug.cgi?id=1887116
[2]: odoo#137691
[3]: odoo/owl#1428

X-original-commit: 2cbd223
robodoo pushed a commit to odoo/odoo that referenced this issue Apr 7, 2024
On firefox and safari applying a position-sticky on an element inside
an other element with an overflow is causing a rendering issue (see
issue [1]).

This was occuring with the dropdown `.o_optional_columns_dropdown`
making it unusable as soon as the `overflow-x` triggered the horizontal
scroll in the table.

This commit works around this bug by moving the dropdown's menu out of
the actual table and attachs it to the ListRender's root element.

As this issue is specific to the Optional Fields dropdown, we
implemented it only in the ListRender (and not for all Dropdowns). Also
the issue is not present anymore in master since the Dropdown
refactoring (see PR [2]).

Note: a unique class identifying the ListRenderer has been introduced to
handle multiple List Views rendered at the same time (in the same view,
in modal...) as the the `t-portal` requires a global selector and
doesn't allow to use relative one (i.e. searching only the parents ; cf.
OWL feature request [3]).

task-3696473
opw-3682280
opw-3697814

X-original-commit: 01cd6d4

[1]: https://bugzilla.mozilla.org/show_bug.cgi?id=1887116
[2]: #137691
[3]: odoo/owl#1428

closes #160776

X-original-commit: 2cbd223
Related: odoo/enterprise#60187
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants