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

editorial: Modernize and replace prose with algorithms in BatteryManager #46

Merged

Conversation

rakuco
Copy link
Member

@rakuco rakuco commented Sep 1, 2021

Similarly to #45, make the BatteryManager section more conformant to
modern spec writing practices, while avoiding making user-visible changes as
much as possible:

  • Define a task source for this spec, and switch from "queue a task" to the
    more specific and recent "queue a global task" algorithm.
  • Replace a lot of prose with internal slots and algorithms.
  • Make the interface attributes simply return the values of the internal
    slots rather than defining logic in their getters.
  • Define an actual algorithm for updating internal slots and dispatching
    events. The existing prose just said "the UA must change the attribute and
    fire an event" without really defining how to reach a BatteryManager
    object in the first place.

Preview | Diff

@rakuco
Copy link
Member Author

rakuco commented Sep 1, 2021

@reillyeon @marcoscaceres
This one is bigger than #45, so some extra pairs of eyes are appreciated.

@rakuco rakuco force-pushed the editorial/modernize-BatteryManager-section branch from df61e14 to 7cbd8d2 Compare September 1, 2021 12:55
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
@marcoscaceres
Copy link
Member

Will try to review soon!

@anssiko
Copy link
Member

anssiko commented Sep 2, 2021

I authorize @reillyeon to merge this PR once we get @marcoscaceres's eyeballs on it.

Similarly to w3c#45, make the `BatteryManager` section more conformant to
modern spec writing practices, while avoiding making user-visible changes as
much as possible:
- Define a task source for this spec, and switch from "queue a task" to the
  more specific and recent "queue a global task" algorithm.
- Replace a lot of prose with internal slots and algorithms.
- Make the interface attributes simply return the values of the internal
  slots rather than defining logic in their getters.
- Define an actual algorithm for updating internal slots and dispatching
  events. The existing prose just said "the UA must change the attribute and
  fire an event" without really defining how to reach a `BatteryManager`
  object in the first place.
@rakuco rakuco force-pushed the editorial/modernize-BatteryManager-section branch from 7cbd8d2 to 79ec094 Compare September 2, 2021 07:43
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
Copy link
Member

@marcoscaceres marcoscaceres left a comment

Choose a reason for hiding this comment

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

Overall looks good @rakuco! Just some suggestions, but a vast improvement! keep it up!

The contents are essentially the same as the normative descriptions in the
subsequent section.
Refer to the Web IDL interface rather than the BatteryManager concept.
index.html Outdated Show resolved Hide resolved
@rakuco
Copy link
Member Author

rakuco commented Sep 9, 2021

thanks for reviewing, @reillyeon and @marcoscaceres

I'd appreciate it if someone could merge this PR

@anssiko
Copy link
Member

anssiko commented Sep 9, 2021

Thanks @rakuco! You should add yourself to the editors if you plan to keep an eye on this spec. Otherwise, we’ll give you huge credits in the ack section for these modernizations.

@rakuco
Copy link
Member Author

rakuco commented Sep 9, 2021

So far I've just been trying to catch up with the backlog of things I'd promised to do back in April during the DAS WG virtual meeting :-) Once I finish making the spec look better (and hopefully address #15) I can consider officially becoming an editor.

@marcoscaceres marcoscaceres merged commit 4291db6 into w3c:gh-pages Sep 13, 2021
@rakuco rakuco deleted the editorial/modernize-BatteryManager-section branch September 13, 2021 14:44
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.

4 participants