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

fix: allow label on FieldWrapper to be ReactNode #3856

Conversation

OleksandrNechai
Copy link
Collaborator

@OleksandrNechai OleksandrNechai commented Sep 7, 2023

FX-4318

Description

Users want to be able to do complex things with labels, like for example have in label icon and Tooltip. For this we change label type on FieldWrapper from string to ReactNode

How to test

  • Temploy
  • FIXME: Add the steps describing how to verify your changes

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.

@OleksandrNechai OleksandrNechai requested a review from a team as a code owner September 7, 2023 15:24
@changeset-bot
Copy link

changeset-bot bot commented Sep 7, 2023

🦋 Changeset detected

Latest commit: 09972ec

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

This PR includes changesets to release 1 package
Name Type
@toptal/picasso-forms Minor

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

@toptal-devbot toptal-devbot temporarily deployed to staging September 7, 2023 15:36 Inactive
@OleksandrNechai OleksandrNechai self-assigned this Sep 7, 2023
@toptal-devbot toptal-devbot temporarily deployed to staging September 7, 2023 16:52 Inactive
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.

Maybe we should also have a example on Storybook about this new funcionality, wdyt?
Also to have some visual tests for it

Copy link
Contributor

@sashuk sashuk left a comment

Choose a reason for hiding this comment

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

Code looks good, tested locally! Having story and visual test as suggested #3856 (review) would be great

@OleksandrNechai
Copy link
Collaborator Author

@sashuk @augustobmoura, @dmaklygin has discovered that FieldWrapper is the thing that we need to deprecate actually. It is not used any more in Picasso. But still used externally and we do this change for suffering people. Most likely we will delete it soon. So I guess no need to put more efforts into it to cover with tests. Ticket for future investigation of FieldWrapper future: https://toptal-core.atlassian.net/browse/FX-4335

@toptal-devbot toptal-devbot temporarily deployed to staging September 8, 2023 08:56 Inactive
@OleksandrNechai OleksandrNechai force-pushed the fx-4318-allow-reactnode-type-for-labels-in-form-elements branch from 75375e9 to ca2bf33 Compare September 8, 2023 09:25
@OleksandrNechai
Copy link
Collaborator Author

@toptal-anvil ping reviewers

@toptal-devbot toptal-devbot temporarily deployed to staging September 8, 2023 09:40 Inactive
@OleksandrNechai OleksandrNechai force-pushed the fx-4318-allow-reactnode-type-for-labels-in-form-elements branch from ca2bf33 to 09972ec Compare September 8, 2023 16:18
@OleksandrNechai OleksandrNechai merged commit 0f68c18 into master Sep 11, 2023
18 checks passed
@OleksandrNechai OleksandrNechai deleted the fx-4318-allow-reactnode-type-for-labels-in-form-elements branch September 11, 2023 09:23
@toptal-build toptal-build mentioned this pull request Sep 11, 2023
1 task
sashuk pushed a commit that referenced this pull request Sep 14, 2023
* fix: allow label on FieldWrapper to be ReactNode

* fix: add changesets

* fix: imrove typing
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.

5 participants