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: rich text editor behaviour in forms #3656

Merged
merged 1 commit into from
Jun 27, 2023

Conversation

sashuk
Copy link
Contributor

@sashuk sashuk commented Jun 26, 2023

FX-4105

Description

This pull request fixes bug with Rich Text Editor blocking the form, so the RTE field does not lose focus (bug was introduced in #3645).

The solution is to move the registerNodeTransform() in the separate plugin.

How to test

Steps to reproduce

Navigate to https://picasso.toptal.net/FX-NULL-fix-rte-in-forms/?path=/story/picasso-forms-form--form and test it the same way

Screenshots

🔴 Before

Kapture.2023-06-26.at.19.27.28.mp4

🟢 After

Kapture.2023-06-26.at.20.08.51.mp4

Development checks

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

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.

@sashuk sashuk self-assigned this Jun 26, 2023
@changeset-bot
Copy link

changeset-bot bot commented Jun 26, 2023

⚠️ No Changeset found

Latest commit: b51f4c5

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@@ -52,11 +52,13 @@ describe('replaceHeadingNodes', () => {
)

const appendMock = jest.fn()
const selectMock = jest.fn()
Copy link
Contributor Author

@sashuk sashuk Jun 26, 2023

Choose a reason for hiding this comment

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

This test was broken in feature branch, not related to the bug

@toptal-devbot toptal-devbot temporarily deployed to temploy June 26, 2023 18:19 Inactive
@sashuk sashuk marked this pull request as ready for review June 26, 2023 18:25
@sashuk sashuk requested a review from a team as a code owner June 26, 2023 18:25
@sashuk
Copy link
Contributor Author

sashuk commented Jun 26, 2023

@toptal-anvil ping reviewers

@toptal-devbot toptal-devbot temporarily deployed to temploy June 26, 2023 18:35 Inactive
@sashuk sashuk merged commit b43658d into feature/rte-lexical Jun 27, 2023
16 of 18 checks passed
@sashuk sashuk deleted the FX-NULL-fix-rte-in-forms branch June 27, 2023 07:29
augustobmoura pushed a commit that referenced this pull request Jun 28, 2023
augustobmoura pushed a commit that referenced this pull request Jun 28, 2023
augustobmoura pushed a commit that referenced this pull request Jun 29, 2023
dmaklygin pushed a commit that referenced this pull request Jul 3, 2023
dmaklygin pushed a commit that referenced this pull request Jul 5, 2023
dmaklygin pushed a commit that referenced this pull request Jul 6, 2023
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