Skip to content

Conversation

noamr
Copy link
Collaborator

@noamr noamr commented Sep 27, 2024

  • view-transition-group maintains the tree-scoping relationship
  • nearest/custom-ident act like contain for their descendants

Closes #10780
Closes #10633

See resolutions in the above issues.

@noamr noamr requested a review from khushalsagar September 27, 2024 14:21

When the [=computed value=] of 'view-transition-name' for an element is ''view-transition-name/none'', its 'view-transition-group' [=used value=] is always resolved to ''view-transition-name/none'' as well.

The <dfn>relevant tree</dfn> for the 'view-transition-group' property is the [=tree=] that includes the element in which the property itself is declared.
Copy link
Member

Choose a reason for hiding this comment

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

This is trying to capture the tree scope for the computed value right? Would it be enough to say that the used value for group is "normal" if it doesn't match view transition name's scope. Because the group only applies if the name does and we have checks to only apply the name if the tree scope matches the transition's tree scope.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

To get the <dfn>nearest containing group name</dfn> for an {{Element}} |element| and a [=tree=] |tree|, perform the following steps:

1. Let |nearestAncestorWithContain| be |element|'s nearest ancestor whose 'view-transition-name' [=computed value=] is not ''view-transition-name/none'' and whose 'view-transition-group' [=computed value=] is ''view-transition-group/contain''.
1. Let |nearestAncestorWithContain| be |element|'s nearest [=tree/ancestor=] in |tree|, whose 'view-transition-name' [=computed value=] is not ''view-transition-name/none'' and whose 'view-transition-group' [=computed value=] is not ''view-transition-group/normal''.
Copy link
Member

Choose a reason for hiding this comment

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

I don't think we need to pass tree here? We can ignore the group if its computed value's tree scope doesn't match view-transition-name's tree scope.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

@khushalsagar
Copy link
Member

Eh, it looks like you missed publishing new changes. :)

@noamr
Copy link
Collaborator Author

noamr commented Oct 2, 2024

Eh, it looks like you missed publishing new changes. :)

Oops, look now

noamr added 2 commits October 2, 2024 20:46
- view-transition-group is tree-scoped - nearest/custom-ident act like contain Closes w3c#10780 Closes w3c#10633
Copy link
Member

@khushalsagar khushalsagar left a comment

Choose a reason for hiding this comment

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

This is a lot better, thank you!

Co-authored-by: Khushal Sagar <63884798+khushalsagar@users.noreply.github.com>
@noamr noamr merged commit 9d7be5c into w3c:main Oct 14, 2024
1 check passed
@noamr noamr deleted the vt2-nesting2 branch October 14, 2024 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants