Skip to content

Editorial: export page visibilty concepts#7337

Merged
annevk merged 4 commits into
whatwg:mainfrom
marcoscaceres:visibility_exports
Nov 17, 2021
Merged

Editorial: export page visibilty concepts#7337
annevk merged 4 commits into
whatwg:mainfrom
marcoscaceres:visibility_exports

Conversation

@marcoscaceres

@marcoscaceres marcoscaceres commented Nov 15, 2021

Copy link
Copy Markdown
Member

@domenic domenic left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Seems reasonable, but I think it'd be a bit nicer if we didn't have the shorthands. WDYT?

@marcoscaceres

Copy link
Copy Markdown
Member Author

If it's ok, I'd like to keep the shorthands. I had them in the original Page Visibility document and I'm using them in some specs already. I personally find it convenient to conceptually write, for example, "if the document is [=document/visible=]... ", versus, "If the document's [=document/visibility state=] is "visible"...".

However, it it sets bad precedence, I can remove them (or please delete them directly via a suggestion).

@domenic

domenic commented Nov 16, 2021

Copy link
Copy Markdown
Member

Can you give some examples so we can see how widely-used that kind of shortcut is? I couldn't find any myself when quickly poking around.

I think it's slightly suboptimal to talk about a document being hidden instead of talking about its visiblity state, as without following the link one might think it's a general idea of hiddenness instead of the very specific definition given here. But it doesn't matter that much.

@marcoscaceres

Copy link
Copy Markdown
Member Author

A not so great example (I’m the process of rewriting the visibility part to use the visibility change algo, but let’s use it for discussion):
https://www.w3.org/TR/geolocation/#request-position

@domenic

domenic commented Nov 16, 2021

Copy link
Copy Markdown
Member

Any examples that aren't in need of rewriting anyway? :)

@marcoscaceres

marcoscaceres commented Nov 16, 2021

Copy link
Copy Markdown
Member Author

No. The other one I thought was using the shorthands was Screen Wake Lock, but turns out it’s using “visibility state”. I’ll remove them as then it’s only Geo, and I’m rewriting it.

@annevk annevk merged commit 29cad71 into whatwg:main Nov 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Export "visibility state", [=Document/hidden=] and [=Document/visible=]

3 participants