artsy / palette

Artsy's design system
https://palette-storybook.artsy.net/
MIT License
214 stars 45 forks source link

feat(CX-3348): Update Input components #1250

Closed MrSltun closed 11 months ago

MrSltun commented 1 year ago

This PR resolves CX-3348

[!IMPORTANT] This is a major version update, please take a look at Features & Breaking Changes section

Description

This PR updates the input components in Palette to match the new design

Features & Breaking Changes

⚠️ Breaking Changes ⚠️

Screenshots & Videos

New Input ✨

Details #### Screenshots | Status | Screenshot | | -- | -- | | default | image | | with title | image | | with description | image image | | with a placeholder (no title) | image | | with a placeholder (with title - focused) | image | | required | image | | hover | image | | focused | image | | finished typing | image | | disabled | image | | with error message | image | | with character counter | image image | | with prefix and title | image | | with prefix and title - focused | image | | with suffix and title | image | | with suffix and title - focused | image | #### Demos of Moving Title | Input | Video | | -- | -- | | Normal Input |

New Phone Input ✨

Details #### Screenshots | Status | Screenshot | | --- | --- | | Empty | image | | With a placeholder | image | | Disabled | image | | Filled | image | | Hover | image | | Focused | image | | Required | image | | With the list open | image | | With the list open and filtered | image | | With errors | image | #### Demo | Jounrey | Video | | -- | -- | | ⌨️ & 🖱️ |

New TextArea ✨

Details #### Screenshots | Status | Screenshot | | -- | -- | | default | image | | with title | image | | with description | image image | | with placeholder (no title) | image | | with placeholder (with title - focused) | image | | required | image | | hover | image | | focused | image | | finished typing | image | | disabled | image | | disabled (with value) | image | | with error message | image | | with character counter | image image | | with character counter (over limit) | image |

New Select ✨

Details #### Screenshots | Status | Screenshot | | -- | -- | | default | image | | default (with value) | image | | with title | image | | with title (with value) | image | | with title and description | image image | | required | image | | hover | image | | focused | image | | with error message | image | | disabled | image | | disabled (with value) | image | #### Demo Video

New MultiSelect ✨

Details #### Screenshots | Status | Screenshot | | -- | -- | | default | image | | default (with value) | image | | with title | image | | with title (with value) | image | | with title and description | image image | | required | image | | hover | image | | focused | image | | with error message | image | | disabled | image | #### Demo Video
📦 Published PR as canary version: Canary Versions
:sparkles: Test out this PR locally via: ```bash npm install @artsy/palette-charts@36.0.0-canary.1250.29384.0 npm install @artsy/palette@37.0.0-canary.1250.29384.0 # or yarn add @artsy/palette-charts@36.0.0-canary.1250.29384.0 yarn add @artsy/palette@37.0.0-canary.1250.29384.0 ```
MrSltun commented 1 year ago

And as a side-effect, LabeledInput changed to match the new design as well 😄

image

Let's hope I didn't break anything else 🌚

MrSltun commented 1 year ago

@MounirDhahri I'm merging this to a working branch called in-progress/new-input as @dzucconi suggested, so that we can proceed with the work and release a canary version of Palette from the working branch to test it on Force before releasing it to the public :)

Please correct me if I got it wrong! @dzucconi

MounirDhahri commented 1 year ago

Sounds great, forgot that we spoke about it Already! let's proceed with that then once Damon approves

dzucconi commented 1 year ago

Yeah: we can't merge this until every input-like component is converted and we validate Force. (I've added the canary tag).

(Looking now though!)

dzucconi commented 1 year ago

Was wondering what happened to this — can you rebase though instead of the merge?

damassi commented 11 months ago

One thing I noticed @MrSltun is that checking out the order flow in the review app (which i think needs to be rebased from main, if it doesn't break anything) is that the drop down doesn't seem to be selectable, like i can't click that country select:

Screenshot 2023-10-25 at 10 25 42 AM

OR maybe that's by design since it seems disabled on second glance. So ignore me... lemme try to find another drop down to confirm.

Update: Yep, works great -- ignore the above.

damassi commented 11 months ago

@dzucconi - do you have any blocking comments, or can we do a follow-up here?

dzucconi commented 11 months ago

I would really address the prefixOffset props stuff before merging. Changing props APIs down the road is hard.

We also need to drop the default name

damassi commented 11 months ago

No prob, just wanted to be sure 👍 I shall contain my eagerness

damassi commented 11 months ago

Alright @MrSltun - thanks for all of your hard work on this, for real. Gonna merge it and we can follow up with a merge on the review app tomorrow and I can update Volt 2 first, then Forque and Volt 1.

artsyit commented 11 months ago

:rocket: PR was released in @artsy/palette-charts@36.0.0, @artsy/palette@37.0.0 :rocket: