qld-gov-au / qgds-tokens

A prototype repository for generating re-usable SCSS tokens
0 stars 3 forks source link

Functionality #5

Open MitchAnderson93 opened 4 weeks ago

MitchAnderson93 commented 4 weeks ago
  1. The current state:

    • Designer (actor) syncs token.json to repo (figma/tokens.json folder, via figma and the token studio plugin)
    • Should create an automatic pull request to main (notifying the development team)
    • On merge (in the developer process) a patch/minor/major release type is selected
    • This takes care of semver number and release to github packages and npm packages (see guide on the right of the repository)
  2. How could we improve it?

    • Idea: A secondary script (.figma.js that we have already) to poll figma daily/weekly etc - checking for changes between the last generated /dist and what is available. If an update is detected (cron job performs the request on a schedule), build a new /dist on develop branch and start the same pull request process?
  3. How do we perform good tests?

    • Count the variables and ensure they match the number of total palette colours (in JEST right now, needs count added)
    • Perform an integrity test against a committed change set file? e.g. Designer not only performs the sync, but also declares the changing variable name in a committed change set file. This can be utilised for further change control, and for delta purposes (if an extra change is detected and not declared, fail gracefully and inform the team).
  4. Missing:

    • Status colours such as warning/info/critical should never be overridden (even if done so in Figma). The repository should always use a static copy for final dist (that can't change).
    • Support for icons.svg (sprite), crest/logo variations
    • Support for niche conventions like drop shadow/box shadow etc.
    • Automatic support for multi-brand/multi-palettes e.g. Dan pushes a new token.json (as DES-token.json) to ./figma. This should create a seperate dist for this, using part of the file name (seperate, inteded for DES).
MitchAnderson93 commented 4 weeks ago

Let me know your thoughts @duttonw

MitchAnderson93 commented 4 weeks ago

Keen to hear your thoughts @ThrawnCA and @chris-randall-qol

ThrawnCA commented 4 weeks ago

Should there be an intermediate 'develop' branch before merging to main? We use that in several other places to represent bleeding-edge changes.

duttonw commented 4 weeks ago

Depending on the maturity of the design having it auto cron into develop on a daily basis to build latest and assigning a team to review and version point cut or have it raise a PR per day to master with date in the PR name to have it flesh out. Could also add list of Parma added, changed to the pr that could propagate to the auto release notes.