Skip to content

Conversation

marcoscaceres
Copy link
Member

@marcoscaceres marcoscaceres commented Oct 16, 2025

Move pre-lock conditions definition after algorithm steps and integrate as optional step 4 for clarity. Addresses feedback about confusing interleaved MUST/MAY structure.

Closes #261


Preview | Diff

Move pre-lock conditions definition after algorithm steps and integrate as optional step 4 for clarity. Addresses feedback about confusing interleaved MUST/MAY structure.
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Clarifies the Screen Orientation locking algorithm by isolating and formalizing “pre-lock conditions” to improve readability and normative flow.

  • Moves the “pre-lock conditions” definition out of the interleaved intro paragraph.
  • Adds an explicit optional algorithm step that rejects when pre-lock conditions are required but unmet.
  • Rewords and links the definition section to relevant interactions (app manifest and fullscreen).

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +413 to +418
<li>Optionally, if the [=user agent=] requires |document| and its
associated [=Document/browsing context=] to meet [=pre-lock
conditions=] in order to [=lock the screen orientation=], and those
conditions are not met, return [=a promise rejected with=] a
{{"NotSupportedError"}} {{DOMException}} and abort these steps.
</li>
Copy link

Copilot AI Oct 16, 2025

Choose a reason for hiding this comment

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

[nitpick] The leading “Optionally,” makes the requirement ambiguous: if a user agent has chosen to require pre-lock conditions, the rejection when they are not met should not itself be optional. Suggest removing “Optionally,” so the step reads “If the [=user agent=] requires … and those conditions are not met, return …”.

Copilot uses AI. Check for mistakes.

<dfn>Pre-lock conditions</dfn> are optional requirements that a
[=user agent=] MAY impose before allowing screen orientation locking.
Common pre-lock conditions include requiring the document to be in
fullscreen mode or be part of an installed web application. See
Copy link

Copilot AI Oct 16, 2025

Choose a reason for hiding this comment

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

Improve grammatical parallelism by changing “or be part of” to “or being part of”.

Suggested change
fullscreen mode or be part of an installed web application. See
fullscreen mode or being part of an installed web application. See

Copilot uses AI. Check for mistakes.

</li>
</ol>
<p>
<dfn>Pre-lock conditions</dfn> are optional requirements that a
Copy link

Copilot AI Oct 16, 2025

Choose a reason for hiding this comment

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

[nitpick] For consistency with references like [=pre-lock conditions=] and typical Bikeshed practice, consider using lowercase in the : pre-lock conditions. This keeps the term’s canonical form aligned with link text and prior usage.

Suggested change
<dfn>Pre-lock conditions</dfn> are optional requirements that a
<dfn>pre-lock conditions</dfn> are optional requirements that a

Copilot uses AI. Check for mistakes.

@bvandersloot-mozilla
Copy link

This makes it super clear to me, thanks!

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.

Editorial: pre-lock conditions definition placement

2 participants