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

40698660: Make asJquery() work within a shadow DOM #529

Merged
merged 5 commits into from
Jan 30, 2025

Conversation

DamienCassou
Copy link
Member

@DamienCassou DamienCassou commented Jan 29, 2025

This change is Reviewable

@DamienCassou DamienCassou force-pushed the 40698660/Make_asJquery_work_within_a_shadow_DOM branch 2 times, most recently from a515cdb to 1de4ef0 Compare January 29, 2025 16:17
@DamienCassou DamienCassou marked this pull request as ready for review January 29, 2025 16:22
Copy link

@josquindebaz josquindebaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 4 of 4 files at r1, 1 of 1 files at r2, 4 of 4 files at r3, 1 of 1 files at r4, 4 of 4 files at r5, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @benemotz, @BenjaminVanRyseghem, @DamienCassou, @danglotb, @JohanBriglia, and @ValentinaVasile)


src/test/widgetTest.js line 258 at r5 (raw file):

		it("returns true if the widget is attached to the DOM under a special shadow host", () => {
			expect.assertions(1);

NIT: It's not crystal clear why this have to be used. May be a comment like "making sure promise is called" could help?

Copy link
Contributor

@JohanBriglia JohanBriglia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 4 of 4 files at r1, 1 of 1 files at r2, 4 of 4 files at r3, 1 of 1 files at r4, 4 of 4 files at r5, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @benemotz, @BenjaminVanRyseghem, @danglotb, @josquindebaz, and @ValentinaVasile)


src/test/widgetTest.js line 258 at r5 (raw file):

Previously, josquindebaz (Josquin Debaz) wrote…

NIT: It's not crystal clear why this have to be used. May be a comment like "making sure promise is called" could help?

+1

…ow trees

In the previous version, widget.asJQuery() would only return something
useful if the widget is directly attached to the document. If the
widget is within a shadow tree, asJQuery() wouldn't work.

This commit makes asJQuery() work even if widget is within a shadow
tree if and only if:

- this tree is attached to a host node with widgetjs-shadow=document,

- and there is only one such node in the DOM

This limitation on the host avoids impacting too much the performance.
@DamienCassou DamienCassou force-pushed the 40698660/Make_asJquery_work_within_a_shadow_DOM branch from 1de4ef0 to 5a2ad83 Compare January 30, 2025 09:05
Copy link
Member Author

@DamienCassou DamienCassou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @benemotz, @BenjaminVanRyseghem, @danglotb, and @ValentinaVasile)


src/test/widgetTest.js line 258 at r5 (raw file):

Previously, JohanBriglia wrote…

+1

done

@DamienCassou DamienCassou merged commit 21ca184 into master Jan 30, 2025
1 of 2 checks passed
@DamienCassou DamienCassou deleted the 40698660/Make_asJquery_work_within_a_shadow_DOM branch January 30, 2025 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants