Skip to content

[CPS-2606] Migrate to Tailwind 4#4898

Merged
javier-delgado merged 1 commit intomasterfrom
CPS-2606-migrate-to-tailwind-4
Mar 30, 2026
Merged

[CPS-2606] Migrate to Tailwind 4#4898
javier-delgado merged 1 commit intomasterfrom
CPS-2606-migrate-to-tailwind-4

Conversation

@javier-delgado
Copy link
Copy Markdown
Contributor

@javier-delgado javier-delgado commented Mar 3, 2026

CPS-2606

Description

Upgrade Tailwind to V4.
min node version updated to 20

Discussion channel

How to test

There are still some "differences" picked up by happo, I checked them all and couldn't notice what the actual difference is.

Development checks

  • Add changeset according to guidelines (if needed)
  • Double check if picasso-tailwind-merge requires major update (check its README.md)
  • Read CONTRIBUTING.md and Component API principles
  • Make sure that additions and changes on the design follow Toptal's BASE design, and it's been already discussed with designers at #-base-core
  • Annotate all props in component with documentation
  • Create examples for component
  • Ensure that deployed demo has expected results and good examples
  • Ensure the changed/created components have not caused accessibility issues. How to use accessibility plugin in storybook.
  • Self reviewed
  • Covered with tests (visual tests included)

Breaking change

  • codemod is created and showcased in the changeset
  • test alpha package of Picasso in StaffPortal

All development checks should be done and set checked to pass the
GitHub Bot: TODOLess action

Alpha packages

Manually trigger the publish.yml workflow to publish alpha packages. Specify pull request number as a parameter (only digits, e.g. 123).

PR Review Guidelines

When to approve? ✅

You are OK with merging this PR and

  1. You have no extra requests.
  2. You have optional requests.
    1. Add nit: to your comment. (ex. nit: I'd rename this variable from makeCircle to getCircle)

When to request changes? ❌

You are not OK with merging this PR because

  1. Something is broken after the changes.
  2. Acceptance criteria is not reached.
  3. Code is dirty.

When to comment (neither ✅ nor ❌)

You want your comments to be addressed before merging this PR in cases like:

  1. There are leftovers like unnecessary logs, comments, etc.
  2. You have an opinionated comment regarding the code that requires a discussion.
  3. You have questions.

How to handle the comments?

  1. An owner of a comment is the only one who can resolve it.
  2. An owner of a comment must resolve it when it's addressed.
  3. A PR owner must reply with ✅ when a comment is addressed.

@javier-delgado javier-delgado self-assigned this Mar 3, 2026
@javier-delgado javier-delgado force-pushed the CPS-2606-migrate-to-tailwind-4 branch 2 times, most recently from 0f304f3 to 04029bf Compare March 3, 2026 19:15
@toptal toptal deleted a comment from changeset-bot bot Mar 3, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 3, 2026

📖 Storybook Preview

🚀 Your Storybook preview is ready: View Storybook

📍 Preview URL: https://toptal.github.io/picasso/prs/4898/

This preview is updated automatically when you push changes to this PR.

@javier-delgado javier-delgado force-pushed the CPS-2606-migrate-to-tailwind-4 branch from 04029bf to 9ff855b Compare March 4, 2026 15:41
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 4, 2026

🦋 Changeset detected

Latest commit: e93f40b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 85 packages
Name Type
@toptal/picasso-rich-text-editor Major
@toptal/picasso-input-adornment Major
@toptal/picasso-account-select Major
@toptal/picasso-outlined-input Major
@toptal/picasso-overview-block Major
@toptal/picasso-autocomplete Major
@toptal/picasso-avatar-upload Major
@toptal/picasso-notification Major
@toptal/picasso-number-input Major
@toptal/picasso-prompt-modal Major
@toptal/picasso-tagselector Major
@toptal/picasso-tailwind Major
@toptal/picasso-date-picker Major
@toptal/picasso-date-select Major
@toptal/picasso-pagination Major
@toptal/picasso-test-utils Major
@toptal/picasso-timepicker Major
@toptal/picasso-typography Major
@toptal/picasso-accordion Major
@toptal/picasso-file-input Major
@toptal/base-tailwind Major
@toptal/picasso-backdrop Major
@toptal/picasso-calendar Major
@toptal/picasso-dropdown Major
@toptal/picasso-show-more Major
@toptal/picasso-forms Major
@toptal/picasso-helpbox Major
@toptal/picasso-section Major
@toptal/picasso-avatar Major
@toptal/picasso-button Major
@toptal/picasso-select Major
@toptal/picasso-slider Major
@toptal/picasso-alert Major
@toptal/picasso-badge Major
@toptal/picasso-input Major
@toptal/picasso-modal Major
@toptal/picasso-table Major
@toptal/picasso-utils Major
@toptal/picasso-form Major
@toptal/picasso-link Major
@toptal/picasso-menu Major
@toptal/picasso-page Major
@toptal/picasso-tabs Major
@toptal/picasso-tag Major
@toptal/picasso Patch
@toptal/picasso-password-input Patch
@toptal/picasso-query-builder Patch
@toptal/picasso-tailwind-merge Patch
@toptal/picasso-switch Major
@topkit/analytics-charts Patch
@toptal/picasso-amount Patch
@toptal/picasso-application-update-notification Patch
@toptal/picasso-breadcrumbs Patch
@toptal/picasso-checkbox Patch
@toptal/picasso-collapse Patch
@toptal/picasso-container Patch
@toptal/picasso-dropzone Patch
@toptal/picasso-fade Patch
@toptal/picasso-form-label Patch
@toptal/picasso-form-layout Patch
@toptal/picasso-grid Patch
@toptal/picasso-list Patch
@toptal/picasso-note Patch
@toptal/picasso-paper Patch
@toptal/picasso-quote Patch
@toptal/picasso-radio Patch
@toptal/picasso-rating Patch
@toptal/picasso-skeleton-loader Patch
@toptal/picasso-slide Patch
@toptal/picasso-step Patch
@toptal/picasso-timeline Patch
@toptal/picasso-tooltip Patch
@toptal/picasso-typography-overflow Patch
@toptal/picasso-user-badge Patch
@toptal/picasso-drawer Patch
@toptal/picasso-empty-state Patch
@toptal/picasso-carousel Patch
@toptal/picasso-tree-view Patch
@toptal/picasso-charts Patch
@toptal/picasso-pictograms Patch
@toptal/picasso-icons Patch
@toptal/picasso-image Patch
@toptal/picasso-loader Patch
@toptal/picasso-logo Patch
@toptal/picasso-popper Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@javier-delgado javier-delgado force-pushed the CPS-2606-migrate-to-tailwind-4 branch 7 times, most recently from f89bf57 to f928b81 Compare March 5, 2026 16:12
@toptal toptal deleted a comment from github-actions bot Mar 5, 2026
@toptal toptal deleted a comment from github-actions bot Mar 5, 2026
@toptal toptal deleted a comment from github-actions bot Mar 5, 2026
@toptal toptal deleted a comment from github-actions bot Mar 5, 2026
@toptal toptal deleted a comment from github-actions bot Mar 5, 2026
@javier-delgado javier-delgado force-pushed the CPS-2606-migrate-to-tailwind-4 branch 2 times, most recently from 601e745 to f17440a Compare March 5, 2026 18:26
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 5, 2026

📖 Storybook Preview

🚀 Your Storybook preview is ready: View Storybook

📍 Preview URL: https://toptal.github.io/picasso/prs/4898/

This preview is updated automatically when you push changes to this PR.

Comment thread packages/base/Menu/src/MenuItem/MenuItem.tsx Outdated
@javier-delgado javier-delgado marked this pull request as ready for review March 5, 2026 20:10
@javier-delgado javier-delgado requested a review from a team as a code owner March 5, 2026 20:10
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 5, 2026

📖 Storybook Preview

🚀 Your Storybook preview is ready: View Storybook

📍 Preview URL: https://toptal.github.io/picasso/prs/4898/

This preview is updated automatically when you push changes to this PR.

Copy link
Copy Markdown
Collaborator

@vedrani vedrani left a comment

Choose a reason for hiding this comment

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

Thanks for doing it.

Interesting, not so many breaking changes.

What is migration path for projects using Picasso with TW4?

Check visual tests and ensure there are no differences or check are differences flaky.

Comment thread .gitignore Outdated
Comment thread packages/base/Menu/src/MenuItem/MenuItem.tsx Outdated
@javier-delgado
Copy link
Copy Markdown
Contributor Author

What is migration path for projects using Picasso with TW4?

They might have to make the same changes as in this PR if they use any of the changed TW utilities directly, but regarding picasso components per se, there is nothing to be done

Check visual tests and ensure there are no differences or check are differences flaky.

I fixed all the visual differences except the ones that are currently in happo. As I mentioned in the description, happo marks a difference in the corner of some buttons but I can't tell what is it even on full zoom

@denieler
Copy link
Copy Markdown
Collaborator

denieler commented Mar 9, 2026

@javier-delgado on this screenshot https://happo.io/a/675/p/848/compare/4dda03d90fad34bc8be321eb9015b6c4cc5f226a/f17440a1df1ea2989559c1ffb904eebe1da173e8#Accordion-custom-expand-icon by some reason the icon has changed color, please take a look 🙇‍♂️ all the rest of screenshots look ok, apart of the issue with color of the shadow of buttons (but maybe we can ignore it, as visually change it not possible to identity, at least to me)

Comment thread packages/base/Avatar/src/AvatarDropzoneSvg/AvatarDropzoneSvg.tsx
@javier-delgado javier-delgado requested a review from denieler March 17, 2026 14:28
@github-actions
Copy link
Copy Markdown
Contributor

📖 Storybook Preview

🚀 Your Storybook preview is ready: View Storybook

📍 Preview URL: https://toptal.github.io/picasso/prs/4898/

This preview is updated automatically when you push changes to this PR.

github-actions bot added a commit that referenced this pull request Mar 17, 2026
@javier-delgado javier-delgado force-pushed the CPS-2606-migrate-to-tailwind-4 branch from d56d32a to 7df39e6 Compare March 17, 2026 16:34
@github-actions
Copy link
Copy Markdown
Contributor

📖 Storybook Preview

🚀 Your Storybook preview is ready: View Storybook

📍 Preview URL: https://toptal.github.io/picasso/prs/4898/

This preview is updated automatically when you push changes to this PR.

github-actions bot added a commit that referenced this pull request Mar 17, 2026
@javier-delgado javier-delgado force-pushed the CPS-2606-migrate-to-tailwind-4 branch from 7df39e6 to ae6c6e5 Compare March 19, 2026 17:46
@github-actions
Copy link
Copy Markdown
Contributor

📖 Storybook Preview

🚀 Your Storybook preview is ready: View Storybook

📍 Preview URL: https://toptal.github.io/picasso/prs/4898/

This preview is updated automatically when you push changes to this PR.

github-actions bot added a commit that referenced this pull request Mar 19, 2026
Comment thread packages/base/Badge/src/Badge/Badge.tsx Outdated
Comment thread packages/base/InputAdornment/src/InputAdornment/InputAdornment.tsx Outdated
Comment thread packages/base/Page/src/SidebarLogo/SidebarLogo.tsx Outdated
Comment thread packages/base/Page/src/SidebarMenu/SidebarMenu.tsx Outdated
Comment thread cypress/component/Tooltip.spec.tsx Outdated
@javier-delgado javier-delgado force-pushed the CPS-2606-migrate-to-tailwind-4 branch from ae6c6e5 to 52dccf8 Compare March 26, 2026 13:22
@javier-delgado javier-delgado force-pushed the CPS-2606-migrate-to-tailwind-4 branch from 52dccf8 to e93f40b Compare March 26, 2026 13:38
@github-actions
Copy link
Copy Markdown
Contributor

📖 Storybook Preview

🚀 Your Storybook preview is ready: View Storybook

📍 Preview URL: https://toptal.github.io/picasso/prs/4898/

This preview is updated automatically when you push changes to this PR.

github-actions bot added a commit that referenced this pull request Mar 26, 2026
exports[`Autocomplete static behavior renders a loading indicator 1`] = `
<div
class="text-graphite h-auto flex items-center whitespace-nowrap max-h justify-end ml-auto flex-grow flex-shrink basis-auto pointer-events"
class="text-graphite h-auto flex items-center whitespace-nowrap max-h justify-end ml-auto grow-0 shrink-0 basis-auto pointer-events"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@javier-delgado here we still have wrong conversion

Comment thread packages/base/Badge/src/Badge/__snapshots__/test.tsx.snap
>
<span
class="base-Badge inline-flex flex-shrink content-middle flex-nowrap justify-normal text-[10px] font-semibold leading-3 align-middle text-graphite static"
class="base-Badge inline-flex shrink-0 content-middle flex-nowrap justify-normal text-[10px] font-semibold leading-3 align-middle text-graphite static"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

here it's still different

Comment thread packages/base/Input/src/Input/__snapshots__/test.tsx.snap
@denieler
Copy link
Copy Markdown
Collaborator

@javier-delgado I found why we had a difference in generated snapshots for flex-shrink-0. It appeared that in https://github.com/toptal/davinci/blob/master/packages/qa/src/configs/jest/jss-snapshot-serializer.cjs#L72 in the past we've been removing numeric pars from the class names that had format {name}-{name}-{number}. So the TW class flex-shrink-0 has this format, so it ends up as flex-shrink in the snapshot. However, the new TS class shrink-0 does not match this pattern, so it is rendered as shrink-0 without the numeric part being cut. So all differences I've mentioned before look legit to me now 👍

Regarding Davinci serializer, I think we can keep it for now until we migrate all the components to TW or the new Base UI

@javier-delgado javier-delgado merged commit 6ca42b1 into master Mar 30, 2026
15 of 21 checks passed
@javier-delgado javier-delgado deleted the CPS-2606-migrate-to-tailwind-4 branch March 30, 2026 18:12
@github-actions
Copy link
Copy Markdown
Contributor

🗑️ Storybook preview cleaned up

The preview deployment has been automatically removed since this PR was closed.

github-actions bot added a commit that referenced this pull request Mar 30, 2026
@github-actions github-actions bot mentioned this pull request Mar 30, 2026
1 task
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.

4 participants