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

[css-view-transitions-2] Apply resolutions for view-transition types #10072

Merged
merged 9 commits into from
Mar 14, 2024

Conversation

noamr
Copy link
Collaborator

@noamr noamr commented Mar 13, 2024

Closes #9972
Closes #9542
Closes #9526
Closes #9626

[css-spec-shortname-1] Brief description which should also include the #issuenum-or-URL and/or link to relevant CSSWG minutes.

Copy the above line into the Title and replace with the relevant details. Fill in any additional details here. See https://github.com/w3c/csswg-drafts/blob/master/CONTRIBUTING.md for more info.

- Make types mutable using ViewTransition.typeList
w3c#9542 (comment)

- Separate `:active-view-transition` and `:active-view-transition-type`
See w3c#9972 (comment)

- Add notes about types being bound to one document
See w3c#9526 (comment)

Closes w3c#9972
Closes w3c#9542
Closes w3c#9526
Closes w3c#9626
@noamr noamr added the css-view-transitions-2 View Transitions; New feature requests label Mar 13, 2024
css-view-transitions-2/Overview.bs Outdated Show resolved Hide resolved
css-view-transitions-2/Overview.bs Show resolved Hide resolved
};
</pre>

The {{ViewTransition/typeList}} [=getter steps=] are to return [=this=]'s [=ViewTransition/active types=].
Copy link
Member

Choose a reason for hiding this comment

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

Don't we need setter steps for this to update active types?

Copy link
Collaborator Author

@noamr noamr Mar 13, 2024

Choose a reason for hiding this comment

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

No, it's a readonly DOMTokenList. It stays constant, and you can mutate its internal token set with the DOMTokenList API

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

... made it readonly, that was indeed missing

Copy link
Member

Choose a reason for hiding this comment

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

Ah ok. So the attribute is readonly but you can mutate the DOMTokenList.

@@ -473,7 +488,7 @@ Note: as per default behavior, the ''@view-transition'' rule can be nested insid

1. Let |viewTransition| be the result of running the [=method steps=] for {{Document/startViewTransition(updateCallback)}} given |updateCallback|.

1. If |callbackOptions| is a {{StartViewTransitionOptions}}, then set |viewTransition|'s [=ViewTransition/active types=] to |callbackOptions|'s {{StartViewTransitionOptions/type}}.
1. If |callbackOptions| is a {{StartViewTransitionOptions}}, then [=list/extend=] |viewTransition|'s [=ViewTransition/active types=] with |callbackOptions|'s {{StartViewTransitionOptions/type}}.
Copy link
Member

Choose a reason for hiding this comment

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

nit: At every instance active types is updated, its value is overwritten completely instead of appending. Can we say that instead of extend to make that obvious?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's the proper way to copy a list into an existing set (the token set). How would you reword it?

Copy link
Collaborator Author

@noamr noamr Mar 13, 2024

Choose a reason for hiding this comment

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

See revision, I'm setting it to the set from the rule when possible, but still using extend for adding the array from startViewTransition

css-view-transitions-2/Overview.bs Outdated Show resolved Hide resolved
css-view-transitions-2/Overview.bs Outdated Show resolved Hide resolved
};
</pre>

The {{ViewTransition/typeList}} [=getter steps=] are to return [=this=]'s [=ViewTransition/active types=].
Copy link
Member

Choose a reason for hiding this comment

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

Ah ok. So the attribute is readonly but you can mutate the DOMTokenList.

@noamr noamr merged commit bd11f28 into w3c:main Mar 14, 2024
1 check passed
@noamr noamr deleted the vt-types-stuff branch March 14, 2024 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
css-view-transitions-2 View Transitions; New feature requests
Projects
None yet
2 participants