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

feat: CSS vars updater package #801

Open
wants to merge 19 commits into
base: main
Choose a base branch
from

Conversation

adamviktora
Copy link
Contributor

@adamviktora adamviktora commented Nov 8, 2024

Closes: #795

  • updates token lists to reflect on the newest updates in V6
  • moves tokenLists + some utilities used both in class-name-updater and css-vars-updater to a shared-helpers local package
  • updates yarn to [email protected]

Related to the actual css-vars-updater:

  • can be tested locally with npx tsx [path to cli.ts] [path to the test.css file]
  • there is an interactive interface for customization, otherwise it runs with all the default options

@adamviktora adamviktora marked this pull request as draft November 8, 2024 11:26
@adamviktora adamviktora marked this pull request as ready for review November 13, 2024 12:25
Copy link
Collaborator

@wise-king-sullyman wise-king-sullyman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Absolutely awesome work on this 🚀 🚀 🚀

I'm still working on the full review, but I did have a couple thoughts about the packaging of the shared helpers that I think are worth bringing up now:

"packages/class-name-updater"
"packages/class-name-updater",
"packages/css-vars-updater",
"packages/shared-helpers"
Copy link
Collaborator

@wise-king-sullyman wise-king-sullyman Nov 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want lerna managing and releasing the shared-helpers package? Or can it just be a private package that doesn't get published?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was meant to be a private package. It was necessary to add it to this packages list, so lerna can link the packages when building. I updated the shared-helpers package to be "private": true.

But if you see a reason to publish it, we can

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah nope, sounds good to me!

Copy link
Collaborator

@wise-king-sullyman wise-king-sullyman Nov 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh actually..... if it's a full dep in the other packages rather than a devDep will it actually work without the package being published? 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good point, I don't know. LLM thinks it won't work, which makes sense given that shared-helpers won't be published anywhere. I at first thought that lerna can somehow bundle it into the other packages.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like there are ways we could bundle it in, or maybe make it into a devDep, though just publishing it would probably be the fastest/easiest route.

@@ -0,0 +1,22 @@
{
"name": "shared-helpers",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it is going to be a public package that we ship I think we should place it under the @patternfly npm org, and probably give it a more descriptive name like shared-codemod-helpers.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this is valid given your comment above

@wise-king-sullyman
Copy link
Collaborator

I did run into some issues trying to test this. Following your instructions I ran into an error that I guessed was related to needing to run a build, but then I also ran into an error trying to do that:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add utility for updating PF5 css vars in scss/css files
2 participants