cds-snc / design-gc-conception

MIT License
4 stars 0 forks source link

Semantic versioning #42

Closed ioanacontu closed 1 year ago

ioanacontu commented 3 years ago

What needs to get done? Who needs to participate?


References:

Video shared by David E: https://www.youtube.com/watch?v=m1i_PVwtL7o at 3:09 Gijora Dammann dives into define what needs to be versionned for a good minute.

Comments from Francis G (captured from this miro board): Again, as a reference in terms of WET-BOEW / GCWeb, we are using a mono-repo that follows Semantic version (as described int the Design Decision here: https://wet-boew.github.io/wet-boew-documentation/decision/6.html ). In fact the WET-BOEW Documentation website, which is different from the main site, is the one we use to publish documents such as Design Decisions and accessibility reports, both for transparency and research purposes: https://wet-boew.github.io/wet-boew-documentation/index-en.html . An example of an a11y assessment would be this one: https://wet-boew.github.io/wet-boew-documentation/research/2020-37-research-a11y-sit.html

Product cycle and versioning API were also both defined through Design decisions, respectively: https://wet-boew.github.io/wet-boew-documentation/decision/9.html and https://wet-boew.github.io/wet-boew-documentation/decision/3.html . As well as browsers supported (DD-2).

FYI, I am just putting all of those references here so that we are aware of where we currently are to better understand where we want to go.

ioanacontu commented 3 years ago

Conversation to start in in the tech syncs this week.

duboisp commented 3 years ago

Bellow is my initial draft on semantic versioning for the design system that I am currently working on. It's still incomplete and will require to be discussed.


Semantic Versioning and public API for the Design System (Draft)

Demystify the term

API could means -> A web service used to interact with or to gather information. Like Github GraphQL API, RestFull API... API could means -> A public API explaining how we can interact with a product in a specific point in time. A set of rules where change would happen in the future and are risk managed by a meaningful version number.

What is it?

The semantic versioning is a contract with the product user, which exclude technical implementer, to quickly evaluate the impact on their work when upgrading a dependant library used by it. In other word, it allow to quickly evaluate the risk of applying changes on the published work after the completion of the dependant library update process. This document define the basic public API for the design system by explaining what aspect need to be monitored and how it should be monitored. This public API apply for products and sub-products of the design system.

The library implementation details are out of scope by default of this versioning public API. However, for some library, depending of their purpose or their audience, might include some implementation details in their public API variant. When possible, leave those implementation details in the release note of the library along with changes description applied in the version.

Implementation via sub-system between the user and the library

The risk of requiring to apply a change can be direct or indirect. It is an indirect change when the dependant library is implemented through a sub-system which manage some aspect described by the public API.

[Next paragraph need to be rewritten] A library that is implemented in a subsequent system before to reach out the user could transfer some requirement of changing the published work from the user to the implementer. So it is possible to get the major (breaking) changes fully managed and to lower the risk impact on the user.

For example, here a major change to a library that are transformed into a patch change for the user by implementers. Let say a major version of the GCWeb library is released which require to apply some HTML markup change for the contextual feature component. For the GCWeb library, the user is the web editor that only/directly use the library to produce a web page. Let say that GCWeb library are implemented in a web content management system, like Adobe Experience Manager (AEM) and AEM have a component with a graphic user interface (GUI) to help the user to configure the contextual feature component. The HTML markup produced are not controlled by the user but instead by the AEM component. Then, for the user this change in the GCWeb library don't impact them, but it will impact and require some development work by the library technical implementer to apply the HTML markup change at the component level. In that situation, the user should follow the versioning of the subsequent system. Like in the previous scenario the GCWeb change should be measured by an incrementation of the patch number of the subsequent system.

What to version:

Formally, each component (individual feature) and the product (library) should carry their own version number. The product version to help users to be aware that changes happen in the dependency. The component version are to help more precisely the user about what change should be applied strictly at the component level in the context of a product (library). The third type of version are to provide guidance to stakeholder that are working on the development of the actual component. It is used to identify if the changes, along with how it is applied, are going to impact the version of the component. In some situation, a major/minor change can be avoided by applying the change request differently, like leveraging JavaScript to avoid a change in the HTML markup.

3 Type of version

Product (Library)

A system or a tool that directly support the design system mostly composed of a set of components.

For example:

Component (Feature)

Design patterns of organic feature which are used to create uniform and common digital experience for published creative work. This group represent component at different atomicity level. Sub-atomic, atomic, molecule, organic and template.

For example:

Component composition (Architecture Aspect)

[[ TODO: Find a better name for this sub-division of a component and to avoid the confusion of re-using the word "component" here. Francis G. proposed to rename it for "component aspect" and then in the description we only refer to "aspect" without the qualitative word "component"]]

Pieces that, put together, define what a component is. A component might not include all the sub-pieces, but changes applied to individual or more pieces impact component users (Designer, Framework implementer, Web publisher, Content author). Each pieces carry its own version number. When needed, product can be more specific on how it get measured.

Composed of:

Component scope

For example, a web page is sectioned like: page header, content, site footer... Components are designed to use only in one of those section. Bellow are generalized scope that can applicable for various like website, mobile apps...

Type of layer:

How to evaluate a version number.

The following are to help to identify if the version number need to be incremented by first evaluating the component composition.

For:

Component composition:

Layout (ex. Wireframe)

Defined by how atom and molécule pieces are organized among others within a component. Multiple layout can be supported for the same component. A layout can contain sub-layout which correspond to a bloc. ---Probably to remove--Removing or adding pieces create more sub-layout variant.--

Library variant:

Example of metrics:

Style (ex. CSS):

Define the visual aesthetic of a component.

Library variant:

Example of metrics:

Semantic (ex. HTML):

Provide a meaning of the dynamic data (schema) and static data contained, managed and visible through the component.

Library variant:

Example of metrics

--- End of first review (as 2021-09-23) with Pierre D. and Francis G. ---

Interaction pattern (ex. Functional event listing):

Definition of the events supported by component.

Library variant:

Example of metrics

Context of use (ex. Guidance):

Library variant:

Example of metrics

Configuration (ex. Customization description):

Configuration that transform or adapt the plain component to better meet the user need. Providing a configuration should be optional and when it is required it must provide/define default value.

Library variant:

Example of metrics

Static data (ex. i18n text string):

Stateless text used by the component except when changing the language. i18n means internalization.

Library variant:

Example of metrics

Schema (ex. Shape graph; data layer):

Stateful text or data to deliver information or user experience by using the component

Library variant:

Example of metrics

Component essential dependencies (ex. List of major versioned component):

Library variant:

Example of metrics


edit: Completed the draft + styled + applied first review changes

ioanacontu commented 3 years ago

To be presented at the next tech sync and with the product team.

duboisp commented 3 years ago

I updated my draft published in my previous comment

duboisp commented 3 years ago

Tel que commenté par @mcman12 ce matin. Il avait suggéré d'inclure le risque d'implémentation d'un produit. Il n'est pas nécessaire d'avoir cette discussion maintenant.

J'ai intentionnellement exclus l'implémentation dans l'ébauche de API publique car, dans notre context au gouvernement, l'implémentation du produit est rarement fait par l'utilisateur du produit pour en produire du contenu.

Au moment venu, il va falloir déterminer la périodicité de la release du Design system. Je propose que le Design system soit un ensemble de produits associés à une version ainsi qu'un descriptif du risque associé à son implémentation. En même temps, ceci permettrait de mettre en place un processus de synchronization entre les divers produits et de s'assurer que les components soit développé ou mis à jour à temps. On pourrait avoir un numéro de version pour le Design System un peu comme Ubuntu "YYYY-MM".

ioanacontu commented 3 years ago

In progress. Need to review with team - we want to insure there is plain language.

ioanacontu commented 3 years ago

Reviewing the public API with Francis. Preparing a presentation for how we will be measuring versioning/changes. Review from the Guidance Pod required as a follow-up. How we track changes in the guidance/code.

ioanacontu commented 2 years ago

Pierre, David E and Francis meeting this week or beginning of next week - discussion on the governance protocol/public API. A second round of review will follow-up - more people can get invited then.

duboisp commented 2 years ago

Me and @delisma have completed an initial review. The Public API initial draft was edited to take in consideration our initial/first review.

As next step:

duboisp commented 2 years ago

Summary of Oct 4 tech sync:

(still an open discussion)

mcman12 commented 2 years ago

putting back in the backlog. Focusing the work on the proof of concept. We will revisit this work in the near future.