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

fix(design): Add back missing icon colors types #880

Merged
merged 4 commits into from
Apr 18, 2022

Conversation

darryltec
Copy link
Contributor

@darryltec darryltec commented Apr 14, 2022

Motivations

For some reason, rollup doesn't want to bring over the .css.d.ts file even tho we're referencing it. Could have something to do with the way those typed-css-module exports the type with the old-style imports export = styles.

Anyhoo, this makes rollup copy those files in the correct place. It now autocompletes again.

image

Prop table colors now shows the correct type

image

Changes

Added

  • Added a plugin called rollup-plugin-copy to copy the missing .css.d.ts files over to dist so it gets exported

Changed

Deprecated

Removed

Fixed

Security

Testing

Install the pre-release on the other repo and see that the colors now gets suggestions

npm i @jobber/design@0.24.1-pre.17+288721e0

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

Random photo of Atlantis

@cloudflare-pages
Copy link

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 288721e
Status: ✅  Deploy successful!
Preview URL: https://c9d464c4.atlantis.pages.dev

View logs

@timoteialbu
Copy link
Contributor

This fixes Icon issues which is the AC of the story, but it would be nice to find the root cause of why rollup doesn't do this correctly, because if we do, then we can solve the other issues (for example Content has a prop spacing that also does not auto complete).

@darryltec
Copy link
Contributor Author

darryltec commented Apr 14, 2022

Oh I think I know why. There was a pretty big change with the typed-css-modules format. https://github.com/GetJobber/atlantis/pull/677/files

I think it is related to how it gets exported. it was very different from that PR to what it is now

@darryltec
Copy link
Contributor Author

@timoteialbu thanks for that thought. I have an idea on how to fix this. it's gonna be a hella big PR but it's gonna fix it!! 80% sure on that one.

@darryltec
Copy link
Contributor Author

@timoteialbu that one is actually a lot harder to deal with as that issue goes back into v0 of atlantis.

This issue we're fixing is related but slightly different since it used to work. Why does it work? The history of the icon before the keyof typeof was it hardcoded all the colors.

I added another ticket to look at the bigger issue, but i think this should just go out as it's affecting atlantis, jobber online, and jobber mobile

@timoteialbu
Copy link
Contributor

@timoteialbu that one is actually a lot harder to deal with as that issue goes back into v0 of atlantis.

This issue we're fixing is related but slightly different since it used to work. Why does it work? The history of the icon before the keyof typeof was it hardcoded all the colors.

I added another ticket to look at the bigger issue, but i think this should just go out as it's affecting atlantis, jobber online, and jobber mobile

If you made another ticket to look at it that sounds good to me!
I do wonder, would it be the worst to quickly add this copy stuff to all the other ones that are broken?

@darryltec
Copy link
Contributor Author

@timoteialbu thought about it. it would basically add extra files that we don't need on the release. We'd have to figure out which one gets referenced as a keyof typeof and then copy it over.

@timoteialbu
Copy link
Contributor

As discussed, we will have another ticket to try and fix the root cause so that we can fix the other type issues in the app. Good work on this!

@darryltec darryltec merged commit 6f45adc into master Apr 18, 2022
@darryltec darryltec deleted the fix-missing-icon-colours branch April 18, 2022 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

2 participants