Re: [w3ctag/design-reviews] Beforematch event (#511)

> It would make sense to combine the explainers as well, since one doesn't really work without the other. That combined explainer could use the Wikipedia mobile page example as an end to end example illustrating how to use the two APIs in conjunction to create a good user experience.

Done: https://github.com/WICG/display-locking/pull/184

> This is a great example. Are there any other kinds of interactions you had in mind while designing these APIs?

No, we don't have any other interactions in mind. Collapsible sections is our use case of interest.

> To flesh this out a little more, you might add some example code like:

This seems pretty similar to the example code I already have in the explainer, right...?
I am planning on updating the sample code in the explainer to have clickable titles to toggle their corresponding sections, will that help?

> Is that the flow you're designing for?

Yes

> If so: what happens at step 4? How does the beforematch event enable it?

At least for the wikipedia example and other things that look like details elements, the user would click the heading to collapse the section again. The beforematch event does not specifically enable the behavior of clicking the title to collapse the section.

> Also: at step 3, is it implied that the author must write code to remove the hidden-matchable style, by handling the beforematch event?

Yes

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3ctag/design-reviews/issues/511#issuecomment-702987291

Received on Friday, 2 October 2020 22:41:33 UTC