-
Notifications
You must be signed in to change notification settings - Fork 8
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 Editor | Bring up of editor component with toolbar support #1416
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…rs/vivin/integrate-tiptap-editor
…rs/vivin/integrate-tiptap-editor
…rs/vivin/integrate-tiptap-editor
…rs/vivin/integrate-tiptap-editor
…rs/vivin/integrate-tiptap-editor
… into separate PRs
rajsite
reviewed
Aug 15, 2023
rajsite
reviewed
Aug 15, 2023
packages/nimble-components/src/rich-text-editor/testing/rich-text-editor.pageobject.ts
Show resolved
Hide resolved
jattasNI
reviewed
Aug 15, 2023
packages/nimble-components/src/rich-text-viewer/tests/rich-text-viewer.spec.ts
Outdated
Show resolved
Hide resolved
packages/nimble-components/src/rich-text-editor/testing/rich-text-editor.pageobject.ts
Show resolved
Hide resolved
jattasNI
reviewed
Aug 16, 2023
packages/nimble-components/src/rich-text-editor/tests/rich-text-editor.stories.ts
Show resolved
Hide resolved
packages/nimble-components/src/rich-text-editor/tests/rich-text-editor-matrix.stories.ts
Show resolved
Hide resolved
packages/nimble-components/src/rich-text-editor/tests/rich-text-editor-matrix.stories.ts
Show resolved
Hide resolved
packages/nimble-components/src/rich-text-editor/tests/rich-text-editor.spec.ts
Outdated
Show resolved
Hide resolved
packages/nimble-components/src/rich-text-editor/tests/rich-text-editor.spec.ts
Outdated
Show resolved
Hide resolved
packages/nimble-components/src/rich-text-editor/testing/rich-text-editor.pageobject.ts
Show resolved
Hide resolved
…com/ni/nimble into users/vivin/integrate-tiptap-editor
jattasNI
approved these changes
Aug 17, 2023
packages/nimble-components/src/rich-text-editor/testing/rich-text-editor.pageobject.ts
Show resolved
Hide resolved
packages/nimble-components/src/rich-text-editor/tests/rich-text-editor.spec.ts
Outdated
Show resolved
Hide resolved
rajsite
approved these changes
Aug 17, 2023
1 task
Merged
1 task
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request
🤨 Rationale
This PR introduces the initial implementation of the editor component by building on top of the
Tiptap
editor. The component is developed to align with the design for the comments feature and matches the current visual design linked below.Visual design
Comments feature mockup
AzDo Feature: https://dev.azure.com/ni/DevCentral/_backlogs/backlog/ASW%20SystemLink%20LIMS/Features/?workitem=2350963
Issue: #1288
Other functionalities mentioned in the spec document for rich text editor will be implemented in subsequent PRs.
👩💻 Implementation
@tiptap/starter-kit
.nimble-toolbar
for the footer section.nimble-toggle-button
for the supported formatting options such as bold, italics, numbered list, and bulleted list and added functionalities to it.nimble-toggle-button
usesclick
andkeydown
events to toggle the state instead ofchange
event. The rationale for adopting this approach is elaborated as follows:change
event toggles upon clicking, whereas the intended behavior is for the state to change only based on the node that currently holds the cursor focus.click
event approach, we merely reference it and update the state whenever needed.change
event andclick
event approach and decided to use theclick
event as it is simpler to implement. For more info, refer to the discussion here.footer-actions
slot element.🧪 Testing
✅ Checklist