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

Rich Text WYSIWYG Editor - Design System #529

Merged
merged 13 commits into from
Oct 30, 2024
Merged

Conversation

g-saracca
Copy link
Contributor

@g-saracca g-saracca commented Oct 24, 2024

What this PR does / why we need it:

Adds a new Rich Text Editor component to the design system.

This component is made with Tiptap npm packages.
Tiptap is a headless wrapper around ProseMirror – a toolkit for building rich text WYSIWYG editors, which is already in use at many well-known companies such as New York Times, The Guardian or Atlassian.

Cons: It does not support markdown as output, the output is html.
Pros:

  • It does support Markdown shortcuts.
  • Compatible with what dataverse already handles for rich content, that is html.
  • Tiptap is headless, that means there is no styling provided so all styles were matched to what the rest of the SPA components look like.

Which issue(s) this PR closes:

Suggestions on how to test this:

Visual code inspection and Storybook story manual testing.
The component has 100% unit test coverage as well.

Does this PR introduce a user interface change? If mockups are available, please link/include them here:

Screen Shot 2024-10-24 at 10 19 52 Screen Shot 2024-10-24 at 10 11 19

@g-saracca g-saracca added Size: 3 A percentage of a sprint. 2.1 hours. D: Design System Deliverable: Design System GREI Re-arch GREI re-architecture-related Original size: 3 SPA.Q4 Not related to any specific Q4 feature FY25 Sprint 9 FY25 Sprint 9 (2024-10-23 - 2024-11-06) labels Oct 24, 2024
@coveralls
Copy link

coveralls commented Oct 24, 2024

Coverage Status

coverage: 97.444% (+0.06%) from 97.385%
when pulling 4f9a42a on feat/525-rich-text-editor
into 02bc675 on develop.

@ChengShi-1 ChengShi-1 self-assigned this Oct 28, 2024
@ChengShi-1 ChengShi-1 self-requested a review October 28, 2024 14:05
@g-saracca
Copy link
Contributor Author

@ChengShi-1 empty lines added 👍🏼 , thanks

@g-saracca g-saracca removed their assignment Oct 30, 2024
Copy link
Contributor

@ChengShi-1 ChengShi-1 left a comment

Choose a reason for hiding this comment

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

Great! Approve.

@ofahimIQSS ofahimIQSS self-assigned this Oct 30, 2024
@ofahimIQSS
Copy link
Contributor

Came across one observation - @ChengShi-1 can you confirm this is expected or a bug:
https://646fbe232a8d3b501a1943f3-dvpreauelj.chromatic.com/?path=/story/rich-text-editor--default

Steps to Reproduce:

  1. Navigate to the WYSIWG Editor
  2. Click on Add Link
  3. Add: https://www.google.com/

Issue: After adding the link, nothing happens (link not generated).

@ChengShi-1
Copy link
Contributor

ChengShi-1 commented Oct 30, 2024

Came across one observation - @ChengShi-1 can you confirm this is expected or a bug: https://646fbe232a8d3b501a1943f3-dvpreauelj.chromatic.com/?path=/story/rich-text-editor--default

Steps to Reproduce:

  1. Navigate to the WYSIWG Editor
  2. Click on Add Link
  3. Add: https://www.google.com/

Issue: After adding the link, nothing happens (link not generated).

Hi Omer! After adding a link, you can type your text, and it will appear blue and linked to the target web, you could open it in a new tab.

Alternatively, you can type the text first, highlight the words, and then attach the link to those words.
Screenshot 2024-10-30 at 4 43 16 PM

@ofahimIQSS
Copy link
Contributor

ofahimIQSS commented Oct 30, 2024

Testing of 529.docx
Thanks for clarifying @ChengShi-1! - Merging PR

@ofahimIQSS ofahimIQSS removed their assignment Oct 30, 2024
@ofahimIQSS ofahimIQSS merged commit 8b59a48 into develop Oct 30, 2024
10 of 14 checks passed
@ofahimIQSS ofahimIQSS deleted the feat/525-rich-text-editor branch October 30, 2024 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
D: Design System Deliverable: Design System FY25 Sprint 9 FY25 Sprint 9 (2024-10-23 - 2024-11-06) GREI Re-arch GREI re-architecture-related Original size: 3 Size: 3 A percentage of a sprint. 2.1 hours. SPA.Q4 Not related to any specific Q4 feature
Projects
Status: Done 🧹
Development

Successfully merging this pull request may close these issues.

Rich Text WYSIWYG Editor - Design System
4 participants