GetJobber / atlantis

🔱 Atlantis
https://atlantis.getjobber.com
MIT License
27 stars 30 forks source link

chore(design): Added descriptions to semantic tokens JSON files #2107

Closed edison-cy-yang closed 2 weeks ago

edison-cy-yang commented 2 weeks ago

Motivations

This is an enabler so we can use semantic descriptions in docs

Changes

Added

Changed

Deprecated

Removed

Fixed

Security

Testing

Changes can be tested via Pre-release


In Atlantis we use Github's built in pull request reviews.

Random photo of Atlantis

edison-cy-yang commented 2 weeks ago

@chris-at-jobber A couple of questions that I came across while adding these descriptions:

chris-at-jobber commented 2 weeks ago

@edison-cy-yang hopefully this answers the questions!

Token structure

If that would change the output values then I would say no, as that would be a massive breaking change, but if it's not, then maybe? I'm not sure what exactly that change would look like.

Workflow colors

I would be OK with moving the token definitions from workflow.tokens into semanticColor.tokens, I'm not sure if that would have any knock-on effects (@scotttjob might know!)

Description for hover/etc

Couldn't hurt! I think as a general rule for

scotttjob commented 2 weeks ago

If that would change the output values then I would say no, as that would be a massive breaking change, but if it's not, then maybe? I'm not sure what exactly that change would look like.

Changing the structure of the JSON would definitely change the final token key. (each 'level' traversed in the JSON file is translated to a dash in the final token)

I would be OK with moving the token definitions from workflow.tokens into semanticColor.tokens, I'm not sure if that would have any knock-on effects (@scotttjob might know!)

The only concern I have is for the token aliases, I believe they'll still be processed properly but would want to verify that.

Ideally the only thing that would change from this would be potentially the tokens appearing in a different order in the generated output, but the contents would be identical. So I would be comfortable with this update if I could see that Diff as part of the PR.

cloudflare-workers-and-pages[bot] commented 2 weeks ago

Deploying atlantis with  Cloudflare Pages  Cloudflare Pages

Latest commit: 304c86a
Status: âœ…  Deploy successful!
Preview URL: https://4bd215d7.atlantis.pages.dev
Branch Preview URL: https://job-105692-add-descriptions.atlantis.pages.dev

View logs

edison-cy-yang commented 2 weeks ago

@chris-at-jobber @scotttjob Thanks! I will leave those structural JSON changes out for now. I want to take a look at parsing token descriptions next, hoping I will have more understanding and feel more comfortable making these by then.

Descriptions for hover, surface, and onSurface states added.

edison-cy-yang commented 2 weeks ago

I ran through these quickly, did not run the code directly.

Can we run a quick diff on the output of the generated files before and after this change? There should be no change.

I normally wouldn't ask for a diff, but there's enough changes in here that a diff is a good sanity check.

@scotttjob those generated css and js files are gitignored, by seeing the diff are you talking about temporarily adding those files to the index and running diff on them (then removing them from index)?

In this case would it make sense to include this step (in a shell script) as part of running npm run bootstrap just to confirm the diffs are what we expected?

scotttjob commented 2 weeks ago

I ran through these quickly, did not run the code directly. Can we run a quick diff on the output of the generated files before and after this change? There should be no change. I normally wouldn't ask for a diff, but there's enough changes in here that a diff is a good sanity check.

@scotttjob those generated css and js files are gitignored, by seeing the diff are you talking about temporarily adding those files to the index and running diff on them (then removing them from index)?

In this case would it make sense to include this step (in a shell script) as part of running npm run bootstrap just to confirm the diffs are what we expected?

I don't think we have to go that far, I was thinking just a manual diff. So if you swapped branches back to master, ran the build command, copied the files out, swapped branches, ran the command again, then manually compared.

So a one-off screenshot. :)

edison-cy-yang commented 2 weeks ago

I ran through these quickly, did not run the code directly. Can we run a quick diff on the output of the generated files before and after this change? There should be no change. I normally wouldn't ask for a diff, but there's enough changes in here that a diff is a good sanity check.

@scotttjob those generated css and js files are gitignored, by seeing the diff are you talking about temporarily adding those files to the index and running diff on them (then removing them from index)? In this case would it make sense to include this step (in a shell script) as part of running npm run bootstrap just to confirm the diffs are what we expected?

I don't think we have to go that far, I was thinking just a manual diff. So if you swapped branches back to master, ran the build command, copied the files out, swapped branches, ran the command again, then manually compared.

So a one-off screenshot. :)

Picked a few files

Screenshot 2024-11-07 at 10 40 59 AM Screenshot 2024-11-07 at 10 41 16 AM Screenshot 2024-11-07 at 10 41 47 AM

scotttjob commented 2 weeks ago

I ran through these quickly, did not run the code directly. Can we run a quick diff on the output of the generated files before and after this change? There should be no change. I normally wouldn't ask for a diff, but there's enough changes in here that a diff is a good sanity check.

@scotttjob those generated css and js files are gitignored, by seeing the diff are you talking about temporarily adding those files to the index and running diff on them (then removing them from index)? In this case would it make sense to include this step (in a shell script) as part of running npm run bootstrap just to confirm the diffs are what we expected?

I don't think we have to go that far, I was thinking just a manual diff. So if you swapped branches back to master, ran the build command, copied the files out, swapped branches, ran the command again, then manually compared. So a one-off screenshot. :)

Picked a few files

Screenshot 2024-11-07 at 10 40 59 AM Screenshot 2024-11-07 at 10 41 16 AM Screenshot 2024-11-07 at 10 41 47 AM

Amaaaaaaazing! That's exactly the kind the reassurance I was looking for. Great work Edi!