-
Notifications
You must be signed in to change notification settings - Fork 15
chore(deps): update btn deps #168
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
chore(deps): update btn deps #168
Conversation
|
This pull request is being automatically deployed with Vercel (learn more). π Inspect: https://vercel.com/hashicorp/react-components/BSxuwN1QLwSnj7dT4GEARw5929PG |
| `variant-${themeObj.variant}`, | ||
| themeClass, | ||
| { 'brand-neutral': themeObj.brand === 'neutral' }, | ||
| `background-${themeObj.background}`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Button didn't seem to actually be affected by dark or light theme values, so I added back in that classname. LMK if that's not wanted, but note that other components depend on this property.
| } | ||
| return ( | ||
| <div className={`g-call-to-action variant-${variant} theme-${theme}}`}> | ||
| <div className={`g-call-to-action variant-${variant} theme-${theme}`}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix: as the classname wasn't dark} π€
| "lockfileVersion": 1, | ||
| "requires": true, | ||
| "dependencies": { | ||
| "@hashicorp/react-button": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder why the updated version of @hashicorp/react-button isn't in the lock file.... π€
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you hit the nail on the head in the comment below - lerna bootstrap modifies package-lock files when it finds and symlinks interdependencies within the monorepo (at least, that's my understanding π
)
| "version": "1.0.2", | ||
| "resolved": "https://registry.npmjs.org/@hashicorp/react-inline-svg/-/react-inline-svg-1.0.2.tgz", | ||
| "integrity": "sha512-AAFnBslSTgnEr++dTbMn3sybAqvn7myIj88ijGigF6u11eSRiV64zqEcyYLQKWTV6dF4AvYoxiYC6GSOgiM0Yw==" | ||
| }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know why this was removed...maybe someone didn't run bootstrap after removing that dep?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, this seems accurate! We're tracking when this bites us on the platform board - ideally we'd have a CI check to catch these before they get merged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Err wait to clarify - I think this would have happened if someone didn't run bootstrap after adding the dep. I know I've forgotten to do that a few times π
| ], | ||
| "dependencies": { | ||
| "@hashicorp/react-button": "^2.2.4" | ||
| "@hashicorp/react-button": "^4.1.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we going to have to update all of these again when we release the breaking change with colors??... I felt like this was something Lerna would take care of, but I guess not?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm sort of like, should this just be a peer dep??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think Lerna should take care of this - I made the mistake of manually bumping versions in recent docs-page work, but as long as there's none of that happening, and as long as the version numbers actually match (as they do in this case thanks to all the work you did π
), I think lerna should do its job.
I don't have a super deep understanding of peer deps vs direct ones, but based on my understanding so far button should be a direct dependency, since we need a specific version of button code to run callouts (rather than callouts just being "compatible" or "intended for use with" a specific version of button).
| </a> | ||
| </div> | ||
| <div className="feature-content g-type-body"> | ||
| <div |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The dark and light theme was broken on this component.
|
|
||
| & .slider-frame { | ||
| & .case-study { | ||
| & .dark { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Text wasn't showing on dark.
| title={`${c.name} Website`} | ||
| url={c.link} | ||
| theme="dark-outline" | ||
| theme={{ variant: 'secondary' }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updates to new API
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
β Thanks for tackling all the dependency weirdness π― π
Took a look at the preview and the dark theme fix on case-study-slider & the logo-grid theme format update both look great π
| "version": "1.0.2", | ||
| "resolved": "https://registry.npmjs.org/@hashicorp/react-inline-svg/-/react-inline-svg-1.0.2.tgz", | ||
| "integrity": "sha512-AAFnBslSTgnEr++dTbMn3sybAqvn7myIj88ijGigF6u11eSRiV64zqEcyYLQKWTV6dF4AvYoxiYC6GSOgiM0Yw==" | ||
| }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, this seems accurate! We're tracking when this bites us on the platform board - ideally we'd have a CI check to catch these before they get merged.
| "lockfileVersion": 1, | ||
| "requires": true, | ||
| "dependencies": { | ||
| "@hashicorp/react-button": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you hit the nail on the head in the comment below - lerna bootstrap modifies package-lock files when it finds and symlinks interdependencies within the monorepo (at least, that's my understanding π
)
| ], | ||
| "dependencies": { | ||
| "@hashicorp/react-button": "^2.2.4" | ||
| "@hashicorp/react-button": "^4.1.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think Lerna should take care of this - I made the mistake of manually bumping versions in recent docs-page work, but as long as there's none of that happening, and as long as the version numbers actually match (as they do in this case thanks to all the work you did π
), I think lerna should do its job.
I don't have a super deep understanding of peer deps vs direct ones, but based on my understanding so far button should be a direct dependency, since we need a specific version of button code to run callouts (rather than callouts just being "compatible" or "intended for use with" a specific version of button).
|
We're going to ask the Lerna folks about this behavior to get more clarity as to what went wrong here. I'll connect this issue there. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Edit: never mind kendall just posted the same thing above!
|
See the issue, feel free to add more comments or questions! It's kind of an odd one to explain so feel free to chime in. |
|
Thinking outloud: I suppose this PR doesn't necessarily need to go with the branding refresh PR, we could merge and release this separately as a patch once we figure out the dependency stuff. |
|
@jescalan Now that I am actually updating the colors, the legacy button styles are going to get in the way of Visual QA. We may need to review / merge this before we hear back from Lerna or find out exactly what happened. |
|
@kendallstrautman I think that's ok, let's move forward with it then! |
accommodates dark background
3a7b3c8 to
a3af144
Compare
|
Cool, I rebased onto the branding assembly. For me, its easier to do one release for the packages with the color updates and this dep stuff, but let me know if we want to merge this into main and release sooner |
|
Because the rollout process is kind of a pain, I vote we avoid doing it twice. |
|
Agreed, let's take that approach ππΌ |
ποΈ Asana Task
π Preview Link
Description
On certain components, the new theming changes aren't working as expected because they are using an old version of the button component. Enter, dependency wormholes....
See
call-to-actionfor an example. Right now the product prop isn't affecting the button color, if you upgrade the the button package, it works as expected. Also,Buttondidn't seem to actually be affected by dark or light theme values, so I added back in that classname. LMK if that's not wanted, but note that other components depend on this property.This PR updates all old react-button versions on dependent components and upgrades their implementation if needed. Friction like this makes me think we need to really nail down our dependency approach within this monorepo...there doesn't seem to be a consistent way they are defined between packages.
Packages Affected
Release Information
Please select one (required)
Release Notes (required)
PR Checklist π
Items in this checklist may not may not apply to your PR, but please consider each item carefully.