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-4601] Migrate Slider to TailwindCSS #4272

Merged
merged 40 commits into from
May 14, 2024

Conversation

AdrianContiu
Copy link
Contributor

@AdrianContiu AdrianContiu commented Apr 30, 2024

FX-4601

Description

This PR changes the Slider component to use the Slider from the MUI Base UI and applies styles using TailwindCSS.

Notes:

  • please note that compact and TooltipComponent props have been removed due to unnecessary extra work that doesn't match the designs. This was agreed between Tomas and Matt Vela.
  • currently, the props section for the Slider story is no longer displayed. Tomas said it's a known issue but needs debugging as there isn't always a similar pattern for this behavior and he will address it upon his return.

How to test

Screenshots

Before. After.
FX-4623  Migrate TableCell to TailwindCSS by AdrianContiu · Pull Requ Insert screenshots or screen recordings
Picasso - Slider - Google Chrome 2024-04-30 at 12 44 49 PM Insert screenshots or screen recordings
Picasso - Slider - Google Chrome 2024-04-30 at 12 46 23 PM 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.

@AdrianContiu AdrianContiu self-assigned this Apr 30, 2024
Copy link

changeset-bot bot commented Apr 30, 2024

🦋 Changeset detected

Latest commit: 2677289

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-slider Major
@toptal/picasso 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

@AdrianContiu AdrianContiu changed the title [FX 4601] Migrate Slider to TailwindCSS [FX-4601] Migrate Slider to TailwindCSS Apr 30, 2024
@AdrianContiu AdrianContiu marked this pull request as ready for review April 30, 2024 11:49
@AdrianContiu AdrianContiu requested a review from a team as a code owner April 30, 2024 11:49
Copy link
Member

@augustobmoura augustobmoura left a comment

Choose a reason for hiding this comment

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

Left a few comments, but overral nice work!

lerna-debug.log Outdated Show resolved Hide resolved
.changeset/mean-waves-help.md Show resolved Hide resolved
packages/base/Slider/src/Slider/Slider.tsx Outdated Show resolved Hide resolved
packages/base/Slider/src/Slider/Slider.tsx Outdated Show resolved Hide resolved
packages/base/Slider/src/Slider/Slider.tsx Outdated Show resolved Hide resolved
packages/base/Slider/src/Slider/story/Tooltip.example.tsx Outdated Show resolved Hide resolved
Copy link
Contributor

@dmaklygin dmaklygin left a comment

Choose a reason for hiding this comment

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

Good work! Left some comments

packages/base/Slider/src/Slider/Slider.tsx Outdated Show resolved Hide resolved
packages/base/Slider/src/Slider/Slider.tsx Outdated Show resolved Hide resolved
packages/base/Slider/src/Slider/Slider.tsx Outdated Show resolved Hide resolved
.changeset/perfect-apes-trade.md Outdated Show resolved Hide resolved
packages/base/Slider/src/Slider/Slider.tsx Show resolved Hide resolved
packages/base/Slider/src/Slider/Slider.tsx Show resolved Hide resolved
.changeset/mean-waves-help.md Outdated Show resolved Hide resolved
packages/base/Slider/src/Slider/Slider.tsx Outdated Show resolved Hide resolved
packages/base/Slider/src/Slider/SliderContext.tsx Outdated Show resolved Hide resolved
@TomasSlama
Copy link
Contributor

@toptal-anvil ping reviewers

@TomasSlama TomasSlama requested a review from dmaklygin May 14, 2024 13:38
@TomasSlama
Copy link
Contributor

@toptal-anvil ping reviewers

isOverlaped,
isFirstLabel,
currentPlacement,
}: GetPositionProps) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

since, it's a separate function, I would also define a return type.

Copy link
Contributor

Choose a reason for hiding this comment

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

done

@TomasSlama TomasSlama changed the base branch from master to feature/tailwind-w20 May 14, 2024 14:17
@TomasSlama TomasSlama merged commit a0bdab2 into feature/tailwind-w20 May 14, 2024
13 of 14 checks passed
@TomasSlama TomasSlama deleted the fx-4601-migrate-slider branch May 14, 2024 18:21
mkrl pushed a commit that referenced this pull request May 21, 2024
* Add the Slider from MUIBase

* Refactor components to accommodate migration

* Adapt stories and remove unused files

* Fix a small existing bug on Tooltip Story

* Update snapshots

* Add changeset

* Update rail slot to fix Happo Story failed test

* Update snapshots after changes on rail slot

* Address part of review comments

* Revert back ValueLabel to a span

* Test commit

* Update yarn

* Revert "Revert back ValueLabel to a span"

* Change ValueLabel to a span after revert

* Update snapshots

* Refactor ValueLabel

* Move slots components outside the Slider

* Add unit tests for getPosition util function

* Refactor SliderValueLabel

* Refactor hook

* Refactor hook and util function

* Add unit tests for hooks

* Add changeset file

* Update changeset

* Change position of Label when out of screen

* Fix doc generation

* Update yarn.lock

* Remove logs

* Fix spacing

* Update snapshots

* Update snapshots

* Address comments

* Rename property to cleaner code

* Fix tests

* Refactor ValueLabel

* Fix tests

* Refactor logic to hook

* Address comments

* Address comments

---------

Co-authored-by: TomasSlama <tomas.slama@toptal.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants