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

New design principle: Consistency #285

Closed
LeaVerou opened this issue Feb 9, 2021 · 6 comments
Closed

New design principle: Consistency #285

LeaVerou opened this issue Feb 9, 2021 · 6 comments

Comments

@LeaVerou
Copy link
Member

LeaVerou commented Feb 9, 2021

Consistency is currently mentioned in Naming, but I think it's broader than naming and should really have its own section, which naming could reference.

A few thoughts:

I think we probably all agree that all else being equal, consistency with the rest of the Web Platform should be prioritized. However since typically all else are not equal, there are tradeoffs to be made, and we should provide guidance about how to resolve these dilemmas.

  • Since the Web Platform has gradually evolved over time, there are often multiple conflicting precedents. We should provide some guidance about which precedent to choose in these cases. It seems that a reasonable guideline might be to choose based on prevalence, API ergonomics, and to prioritize newer APIs over older ones. Not sure about the relative order of these three factors.
  • There is often a tension between API ergonomics and internal consistency, when precedent is very clearly of poor usability. In some cases it makes sense to break consistency to improve usability, but the improvement in usability should be very significant to justify this.
  • There is often a tension between internal and external consistency. That might materialize in three layers: consistency within the technology (e.g. CSS) vs consistency with the rest of the Web Platform vs consistency with the rest of the world. One example is Lab colors: It would be more consistent with CSS to use <percentage> for L (0%-100%), but more consistent with the color science world to use a <number> (0-100). There was a lot of heated debate, which resolved in favor of consistency within CSS, i.e. percentages.

This is partly related to the Pave the Cowpaths HTML Design principle. Do we want to merge them?

@hadleybeeman
Copy link
Member

Would be interesting to explore how these thought might be a counterpart to the W3CTAG Evergreen Web finding.

@torgo torgo added this to the 2021-04-05-week milestone Apr 4, 2021
@LeaVerou
Copy link
Member Author

Another example by @plinss : It would be cool if API methods that return URLs actually returned URL objects, but there are so much existing API surface that returns strings, that it would be inconsistent. So it's another instance of API ergonomics (URL objects) vs internal consistency (strings).

@LeaVerou LeaVerou added Status: Consensus to write We have TAG consensus about the principle but someone needs to write it (see "To Write" project) WRITEMEASAP labels May 13, 2021
LeaVerou added a commit that referenced this issue May 13, 2021
@LeaVerou LeaVerou added Status: PR in review A PR has been created and is being iterated on and removed WRITEMEASAP Status: Consensus to write We have TAG consensus about the principle but someone needs to write it (see "To Write" project) labels May 13, 2021
LeaVerou added a commit that referenced this issue Jun 8, 2021
@torgo
Copy link
Member

torgo commented Jun 8, 2021

We agreed to keep this open despite merging #313 as we need some additional examples.

@torgo torgo added Agenda+ and removed Status: PR in review A PR has been created and is being iterated on labels Jun 8, 2021
@ylafon
Copy link
Member

ylafon commented Jul 6, 2021

Note that we already have a section on units relative to consistency, see https://w3ctag.github.io/design-principles/#types-and-units that probably need expansion or link to WG-produced document about consistency.

@torgo
Copy link
Member

torgo commented Jul 6, 2021

Could we use wake lock as an example - where the design process involved looking at consistency with how other device-based sensors worked.

@torgo torgo modified the milestones: 2021-07-05-week, 2021-08-02-week Aug 1, 2021
@torgo
Copy link
Member

torgo commented Aug 4, 2021

On further reflection and considering our work load we are going to close this for now. If we get further feedback on the doc regarding lack of examples we can re-open.

@torgo torgo closed this as completed Aug 4, 2021
hober pushed a commit that referenced this issue Apr 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants