Page MenuHomePhabricator

Explore ways to keep the DS agnostic (CSS/HTML only)
Closed, ResolvedPublic

Description

We assume that following the recommendation [1] to create a "framework agnostic" design system – one that is strictly built using purely HTML and CSS (+ light presentational JS [2]) – may be the best choice in order to achieve:

  • Resilience/Scalability: In the event of the adoption of any other JS framework by our team or any other, a pure HTML-based system would be prepared for that transition. Low-level agnosticism would allow the system to be adoptable by other wiki projects working with different frameworks.
  • Robustness (from an a11y point of view): Following the concept of Progressive enhancement [3], the system would be built on a solid foundation that would make it interpretable by a wide variety of user agents (non-JS ready).

Questions:

How costly can it be to keep the system agnostic (+ add Vue as a "flavor"), as opposed to building a Vue-based system?
Could dedicating effort to build a resilient system prevent us from generating value for the Wikidata teams sooner?

Volker's note on agnosticism: Yes, we've been investigating and talking about this direction for years. The problem here is, that higher complex components or patterns are not being able to be built with pure HTML (even if they were, you could come only relatively close), nobody would profit from this huge kind of work. It'd be just building an ivory tower for the creator.
A possible way out would be, on a pure technical level, to use web components public interfaces, and change the technology underneath, making it somewhat technology agnostic. Problem is, that web components development and support has stalled the last couple of years by browser vendors.

Sources:

  1. Design Systems Should be JavaScript Framework Agnostic, by Jeff Pelletier
  2. Managing technology-agnostic design systems, by Brad Frost
  3. Progressive Enhancement: What It Is, And How To Use It?, by Sam Dwyer

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
This comment was removed by Sarai-WMDE.

Change 596673 had a related patch set uploaded (by Tonina Zhelyazkova; owner: Tonina Zhelyazkova):
[wikibase/vuejs-components@master] Add ADR for the VueJs Design System

https://gerrit.wikimedia.org/r/596673

The result of the proposal:
We are going with a VueJS implementation of the Design System, where the CSS will be agnostic, as in it's going to be provided in schema driven way using design token files.
We will explore ways to export agnostic components (HTML/CSS) from the existing Vue components.

An ADR has been crafted with the results of this research. It can be found in the referenced gerrit patch.

Change 596673 merged by jenkins-bot:
[wikibase/vuejs-components@master] Add ADR for the VueJs Design System

https://gerrit.wikimedia.org/r/596673