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

[FX-5554] Remove picasso-tailwind dependency on picasso-tailwind-merge #4377

Merged
merged 5 commits into from
Jun 21, 2024

Conversation

augustobmoura
Copy link

@augustobmoura augustobmoura commented Jun 21, 2024

FX-5554

Description

Because picasso-tailwind is a pure CJS module, it caused a few problems with the expected webpack setup, which would try to transpile it to an ESM module. Besides, this dependency brought the whole tailwind package to the runtime bundle, which is unnecessary for such a simple case.

I also added a unit test to guarantee that the 2 packages are in sync, while also adding a not to picasso-tailwind to remind developers that the two need to have the same value

How to test

Screenshots

Before. After.
Insert screenshots or screen recordings Insert screenshots or screen recordings

Development checks

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

PR commands

List of available commands:

  • @toptal-bot run package:alpha-release - Release alpha version
  • @toptal-anvil ping reviewers - Ping FX team for review
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.

@augustobmoura augustobmoura self-assigned this Jun 21, 2024
@augustobmoura augustobmoura requested a review from a team June 21, 2024 02:24
Copy link

changeset-bot bot commented Jun 21, 2024

🦋 Changeset detected

Latest commit: c2b204d

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

This PR includes changesets to release 2 packages
Name Type
@toptal/picasso-tailwind-merge Minor
@toptal/picasso-tailwind 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

@pudek357
Copy link
Contributor

@toptal-bot run package:alpha-release

@toptal-devbot
Copy link
Collaborator

Your alpha package is ready 🎉
yarn add @topkit/analytics-charts@55.0.7-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.24+c2b204d90
yarn add @toptal/picasso@46.0.7-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.4+c2b204d90
yarn add @toptal/picasso-accordion@1.0.22-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.8+c2b204d90
yarn add @toptal/picasso-account-select@1.0.16-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.8+c2b204d90
yarn add @toptal/picasso-alert@1.0.22-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.8+c2b204d90
yarn add @toptal/picasso-amount@1.0.6-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.24+c2b204d90
yarn add @toptal/picasso-application-update-notification@1.0.22-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.8+c2b204d90
yarn add @toptal/picasso-autocomplete@1.0.26-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.4+c2b204d90
yarn add @toptal/picasso-avatar@2.0.7-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.8+c2b204d90
yarn add @toptal/picasso-avatar-upload@1.0.23-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.8+c2b204d90
yarn add @toptal/picasso-backdrop@1.0.5-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.36+c2b204d90
yarn add @toptal/picasso-badge@1.0.4-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.42+c2b204d90
yarn add @toptal/picasso-breadcrumbs@1.0.12-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.8+c2b204d90
yarn add @toptal/picasso-button@2.0.8-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.8+c2b204d90
yarn add @toptal/picasso-calendar@1.0.22-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.8+c2b204d90
yarn add @toptal/picasso-carousel@1.0.23-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.8+c2b204d90
yarn add @toptal/picasso-charts@59.0.1-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.42+c2b204d90
yarn add @toptal/picasso-checkbox@2.0.7-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.8+c2b204d90
yarn add @toptal/picasso-codemod@6.0.1-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.85+c2b204d90
yarn add @toptal/picasso-collapse@1.0.5-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.22+c2b204d90
yarn add @toptal/picasso-container@1.0.4-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.42+c2b204d90
yarn add @toptal/picasso-date-picker@1.0.24-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.8+c2b204d90
yarn add @toptal/picasso-date-select@1.0.26-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.4+c2b204d90
yarn add @toptal/picasso-drawer@2.0.14-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.8+c2b204d90
yarn add @toptal/picasso-dropdown@2.0.4-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.40+c2b204d90
yarn add @toptal/picasso-dropzone@1.0.23-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.8+c2b204d90
yarn add @toptal/picasso-empty-state@1.0.11-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.8+c2b204d90
yarn add @toptal/picasso-environment-banner@1.0.4-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.42+c2b204d90
yarn add @toptal/picasso-fade@1.0.5-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.36+c2b204d90
yarn add @toptal/picasso-file-input@1.0.23-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.8+c2b204d90
yarn add @toptal/picasso-form@3.0.7-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.8+c2b204d90
yarn add @toptal/picasso-forms@70.0.6-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.4+c2b204d90
yarn add @toptal/picasso-grid@3.0.6-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.8+c2b204d90
yarn add @toptal/picasso-helpbox@2.0.8-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.8+c2b204d90
yarn add @toptal/picasso-icons@1.4.1-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.8+c2b204d90
yarn add @toptal/picasso-image@1.0.4-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.42+c2b204d90
yarn add @toptal/picasso-input@2.0.6-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.8+c2b204d90
yarn add @toptal/picasso-input-adornment@1.0.8-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.8+c2b204d90
yarn add @toptal/picasso-link@1.0.4-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.42+c2b204d90
yarn add @toptal/picasso-list@2.0.7-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.8+c2b204d90
yarn add @toptal/picasso-loader@1.0.4-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.42+c2b204d90
yarn add @toptal/picasso-logo@1.0.8-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.8+c2b204d90
yarn add @toptal/picasso-menu@1.0.16-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.8+c2b204d90
yarn add @toptal/picasso-modal@2.0.8-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.8+c2b204d90
yarn add @toptal/picasso-modal-context@1.0.2-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.144+c2b204d90
yarn add @toptal/picasso-note@1.0.8-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.24+c2b204d90
yarn add @toptal/picasso-notification@2.0.14-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.8+c2b204d90
yarn add @toptal/picasso-number-input@1.0.24-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.8+c2b204d90
yarn add @toptal/picasso-outlined-input@1.1.3-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.8+c2b204d90
yarn add @toptal/picasso-overview-block@1.0.8-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.24+c2b204d90
yarn add @toptal/picasso-page@2.0.21-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.4+c2b204d90
yarn add @toptal/picasso-pagination@2.0.8-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.8+c2b204d90
yarn add @toptal/picasso-paper@2.0.5-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.40+c2b204d90
yarn add @toptal/picasso-password-input@2.0.10-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.8+c2b204d90
yarn add @toptal/picasso-pictograms@4.1.1-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.11+c2b204d90
yarn add @toptal/picasso-popper@1.0.4-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.42+c2b204d90
yarn add @toptal/picasso-prompt-modal@1.0.22-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.8+c2b204d90
yarn add @toptal/picasso-provider@4.2.2-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.50+c2b204d90
yarn add @toptal/picasso-query-builder@6.0.18-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.4+c2b204d90
yarn add @toptal/picasso-quote@1.0.6-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.24+c2b204d90
yarn add @toptal/picasso-radio@2.0.7-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.8+c2b204d90
yarn add @toptal/picasso-rating@1.0.8-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.8+c2b204d90
yarn add @toptal/picasso-rich-text-editor@13.0.11-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.4+c2b204d90
yarn add @toptal/picasso-section@3.0.3-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.8+c2b204d90
yarn add @toptal/picasso-select@1.0.26-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.4+c2b204d90
yarn add @toptal/picasso-shared@15.0.1-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.42+c2b204d90
yarn add @toptal/picasso-show-more@1.0.22-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.8+c2b204d90
yarn add @toptal/picasso-skeleton-loader@1.0.22-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.8+c2b204d90
yarn add @toptal/picasso-slider@2.0.1-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.22+c2b204d90
yarn add @toptal/picasso-step@1.1.7-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.8+c2b204d90
yarn add @toptal/picasso-switch@2.0.3-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.8+c2b204d90
yarn add @toptal/picasso-table@1.1.19-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.8+c2b204d90
yarn add @toptal/picasso-tabs@2.0.7-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.8+c2b204d90
yarn add @toptal/picasso-tag@2.0.6-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.8+c2b204d90
yarn add @toptal/picasso-tagselector@1.0.29-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.4+c2b204d90
yarn add @toptal/picasso-tailwind@2.6.1-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.22+c2b204d90
yarn add @toptal/picasso-tailwind-merge@1.0.2-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.26+c2b204d90
yarn add @toptal/picasso-test-utils@1.1.2-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.42+c2b204d90
yarn add @toptal/picasso-timeline@2.0.3-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.24+c2b204d90
yarn add @toptal/picasso-timepicker@1.0.24-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.8+c2b204d90
yarn add @toptal/picasso-tooltip@1.1.4-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.24+c2b204d90
yarn add @toptal/picasso-tree-view@2.0.1-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.6+c2b204d90
yarn add @toptal/picasso-typography@2.0.3-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.24+c2b204d90
yarn add @toptal/picasso-typography-overflow@2.0.3-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.24+c2b204d90
yarn add @toptal/picasso-user-badge@2.0.7-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.8+c2b204d90
yarn add @toptal/picasso-utils@1.0.4-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.42+c2b204d90

Copy link
Contributor

@pudek357 pudek357 left a comment

Choose a reason for hiding this comment

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

Tested on consumer app side, works as expected

@TomasSlama TomasSlama merged commit 9bd24fb into master Jun 21, 2024
22 of 24 checks passed
@TomasSlama TomasSlama deleted the fix/picasso-tailwind-dep-on-merge branch June 21, 2024 07:51
@toptal-build toptal-build mentioned this pull request Jun 21, 2024
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