Skip to content

@/RoboShield: Migrate rich text editor from Slate to Lexical #1122

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

Open
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

m453h
Copy link
Contributor

@m453h m453h commented Apr 25, 2025

Description

This PR migrates the Rich Text editor from Slate to Lexical used in Payload. While both Slate and Lexical save the editor state in JSON, the structure of the JSON is different, thus requiring a migration to convert all previously saved Rich Text content to the new format.

Fixes #1120

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Screenshots

Screenshot 2025-04-25 at 12 05 38
Screenshot 2025-04-25 at 12 06 08

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation

@m453h m453h added the enhancement New feature or request label Apr 25, 2025
@m453h m453h self-assigned this Apr 25, 2025
@m453h m453h added this to COMMONS Apr 25, 2025
@github-project-automation github-project-automation bot moved this to 🚧 In Progress in COMMONS Apr 25, 2025
@m453h m453h force-pushed the ft/migrate_to_lexical_rich_text_editor branch from ef41564 to bd69b30 Compare April 29, 2025 06:52
@m453h m453h marked this pull request as ready for review May 2, 2025 10:43
@m453h m453h requested a review from a team May 2, 2025 10:43
@m453h m453h moved this from 🚧 In Progress to 👀 In Review in COMMONS May 2, 2025
Copy link
Member

@kilemensi kilemensi left a comment

Choose a reason for hiding this comment

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

👍🏽

@kilemensi kilemensi requested a review from a team May 5, 2025 06:49
Copy link
Contributor

@koechkevin koechkevin left a comment

Choose a reason for hiding this comment

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

@m453h this looks good, I have tested locally. Something small I noticed on Hero description, every text is bold meaning any bold styling doesn't get applied to the output.
image

@m453h
Copy link
Contributor Author

m453h commented May 6, 2025

@m453h this looks good, I have tested locally. Something small I noticed on Hero description, every text is bold meaning any bold styling doesn't get applied to the output. image

@koechkevin , this was deliberately implemented to use a fixed font variant i.e. h6. Made an adjustment to remove this since we can change the font variant on the admin panel. It should be good now

@m453h m453h requested a review from a team May 6, 2025 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: 👀 In Review
Development

Successfully merging this pull request may close these issues.

Migrate RoboShield Rich Text Editor from Slate to Lexical Editor
3 participants