-
Notifications
You must be signed in to change notification settings - Fork 152
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(Wizard): migrate to tailwind #4285
Conversation
Storybook staging is available at https://kiwicom-orbit-tw-wizard.surge.sh |
Size Change: -1.63 kB (0%) Total Size: 441 kB
ℹ️ View Unchanged
|
Deploying orbit with Cloudflare Pages
|
Hi @vbulant, I see this PR is in draft, are you working on it? Do you need any help from our side? Just let us know :) |
Hello @mvidalgarcia, it’s mostly done. There’s just a weird discrepancy in visual tests in the pipeline. I’m now working on something else but gonna get back to it tomorrow the latest. Gonna let you know in case I need help 🙂 |
There are regressions in I’ve compared the rendered markup with prod and can’t see any difference though. Not sure if it’s just some text rendering glitch or if I’m missing something. Could you check as well? 🙏 |
@vbulant you can see the diff here https://kiwicom-orbit-test-report-tw-wizard.surge.sh/#?q=s:failed it seems to be something with sizing or spacing or something (I didn't check the code, just the snapshots) Ah and you can ignore the Docs job failing, that is on us |
Yeah I know. I already checked the diffs and couldn’t find any difference in spacings or anything else. Gonna try again tomorrow. |
Ok, I will also take a look and try to spot the cause for the difference |
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 have left some comments of small improvements but overall great work.
In the meantime, after a lot of investigation, I have found the problem with the tests. It seems to be a problem with Playwright itself 🤯
This line was not being evaluated correctly on the browser Playwright uses for testing:
When using tailwind, the padding is introduced, causing the text to wrap because it does not fit in one line anymore.
I have verified and in Storybook the padding is being applied correctly with styled components, so it is something we want to keep indeed.
Therefore, you can trust the changed snapshots and update them (both darwin and linux) 👍 🙏
className={cx( | ||
"block [&_span]:block", | ||
!isActive && | ||
"group-hover/button:[&_span]:text-primary-foreground group-focus/button:[&_span]:text-primary-foreground group-hover/button:[&_span]:underline group-focus/button:[&_span]:underline", |
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.
It is a bit nitpick, but these hover and focus styles only applied on desktop and above. With this, this is being applied in tablet as well. I don't think there is a major problem, but I don't know how weird that effect might be on a touch device like a tablet.
To avoid any complications, and to keep 100% match, do you think you can add a desktop selector to these classes?
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 think breakpoints smaller than desktop imply touch device. You can still have a small window even on a computer with pointer device. Thus I prefer not restricting hover/focus
on specific media queries. But if you prefer 100% match I’ll tweak it.
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.
My point was more the opposite: if we only have it for desktop and above, it is very unlikely to have hover effects on a touch device. But for the sake of simplification I don't mind keeping your approach as is 👍
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.
Not sure if I follow but afaik the row timeline with hovers is visible from lm:
and above. But anyway let’s keep it simple then 👍
697810e
to
90fd41a
Compare
@DSil and thank you for the insightful investigation! |
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 failed to review this on another components, but this needs to be on a different commit.
We have one commit per package (except for docs, that one does not matter), so that the changelog produces only messages based on the commits from those packages. Therefore, please move this (and the other) file to a separate commit, as a chore commit, stating the addition of two new classes.
It is a chore commit instead of a feat because we don't want component-specific classes to be tracked, as we are free to change them without implying breaking changes
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.
Got it, I’ve moved these changes to a chore
commit.
className={cx( | ||
"block [&_span]:block", | ||
!isActive && | ||
"group-hover/button:[&_span]:text-primary-foreground group-focus/button:[&_span]:text-primary-foreground group-hover/button:[&_span]:underline group-focus/button:[&_span]:underline", |
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.
My point was more the opposite: if we only have it for desktop and above, it is very unlikely to have hover effects on a touch device. But for the sake of simplification I don't mind keeping your approach as is 👍
31d97be
to
107ba47
Compare
Closes FEPLT-1705
This Pull Request meets the following criteria:
For Tailwind migrations:
tailwind-migration-status.yaml
file has been updated with the migrated component(s).For new components:
d.ts
files and are exported inindex.d.ts