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: aa #3660

Conversation

sashuk
Copy link
Contributor

@sashuk sashuk commented Jun 27, 2023

FX-4106

🔴 Please do not review

Description

Describe the changes and motivations for the pull request.

Approaches

  • create a PicassoTextNode that has a modified exportDOM() class method that does not wrap elements in <b/>, for example (as it is done in TextNode here)
    • use node replacement as suggested in https://lexical.dev/docs/concepts/node-replacement, but the editor internals still call the $createTextNode() function which creates TextNode, not the PicassoTextNode
    • have registerNodeTransform() that replaces TextNodes with PicassoTextNode (❓ somehow the formatting does not work in this case)
  • a function that removes certain tags from the HTML output but keeps the content

How to test

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

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.

dmaklygin and others added 11 commits May 31, 2023 16:49
* feat: add Toolbar for LexicalEditor

* chore: review amends
* chore: integrate disable state

* fix: reexport change handler type

* chore: update tests for Lexical editor

* fix: rte test

* fix: fix review comments
* chore: integrate limits to rich text editor

* chore: update tests
* chore: integrate new rich text editor to forms

* chore: add highlight prop

* chore: enhance component

* chore: remove unnecessary tests cases
* chore: integrare onFocus and onBlur plugins to RTE

* chore: remove outdated props

* chore: add Focus and autoFocus functionality

* chore: cover with unit tests a new hook
@sashuk sashuk self-assigned this Jun 27, 2023
@changeset-bot
Copy link

changeset-bot bot commented Jun 27, 2023

⚠️ No Changeset found

Latest commit: 5ceb12f

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

@toptal-devbot toptal-devbot temporarily deployed to temploy June 27, 2023 15:01 Inactive
@toptal-devbot toptal-devbot temporarily deployed to temploy June 27, 2023 16:23 Inactive
@toptal-devbot toptal-devbot temporarily deployed to temploy June 27, 2023 17:39 Inactive
@toptal-devbot toptal-devbot temporarily deployed to temploy June 27, 2023 18:43 Inactive
@toptal-devbot toptal-devbot temporarily deployed to temploy June 28, 2023 18:10 Inactive
@sashuk sashuk force-pushed the fx-4106-make-rich-text-editor-output-identical-to-the-old-one-2 branch 2 times, most recently from cb2938b to 14df3bd Compare June 29, 2023 11:27
@toptal-devbot toptal-devbot temporarily deployed to temploy June 29, 2023 11:40 Inactive
@sashuk sashuk force-pushed the fx-4106-make-rich-text-editor-output-identical-to-the-old-one-2 branch from 14df3bd to 6798447 Compare June 29, 2023 12:28
@toptal-devbot toptal-devbot temporarily deployed to temploy June 29, 2023 12:41 Inactive
@sashuk sashuk closed this Jun 29, 2023
@sashuk sashuk deleted the fx-4106-make-rich-text-editor-output-identical-to-the-old-one-2 branch June 29, 2023 14:53
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