-
Notifications
You must be signed in to change notification settings - Fork 12
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
feat: rich text and user mention components (DHIS2-15522) #1525
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
jenniferarnesen
approved these changes
Jul 3, 2023
"Moved" from d2-ui-rich-text.
RichText has the Jest tests from the old d2-ui implementation.
This allows for customization of the textarea height.
When the same query is run multiple times, data does not change and the useEffect does not trigger. By looking at fetching instead, we can set data every time the query is completed.
edoardo
force-pushed
the
feat/rich-text-user-mention-components
branch
from
February 7, 2024 15:13
5afcf61
to
6ecad89
Compare
edoardo
force-pushed
the
feat/rich-text-user-mention-components
branch
from
February 8, 2024 09:00
6ecad89
to
fcccbbc
Compare
…-mention-components
jenniferarnesen
approved these changes
Mar 19, 2024
This fix is to solve the issue of a click on a list item not selecting the user. Also, a fix for the list positioning when there are newlines in the text.
This fix is for when using Ctrl + B/I, now the same callback used when clicking the B/I buttons in the toolbar is used.
They cause the user search request to fail with a 400 error.
edoardo
changed the title
feat: rich text and user mention components
feat: rich text and user mention components (DHIS2-15522)
Jun 6, 2024
dhis2-bot
added a commit
that referenced
this pull request
Jun 6, 2024
# [26.7.0](v26.6.14...v26.7.0) (2024-06-06) ### Features * rich text and user mention components (DHIS2-15522) ([#1525](#1525)) ([5681126](5681126))
🎉 This PR is included in version 26.7.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This was referenced Jun 7, 2024
Merged
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.
Implements DHIS2-15522
Relates to dhis2/dashboard-app#2474
Key features
inputHeight
option forRichTextEditor
for controlling the height of the textarea used internally in the editorDescription
The rich text parser was still used from
d2-ui-rich-text
component.The Interpretation components in
analytics
had a new implementation withoutd2
andMUI
for both the rich text editor and the user mention.This PR is taking those out of the Interpretation component and exporting them on their own, also, the tests originally in the
d2-ui
package have been moved over toanalytics
.Apps that use
d2-ui-rich-text
and/ord2-ui-mentions-wrapper
can update to these new components.The rich text editor is more advanced compared to the original one and it provides a UI with a series of buttons for the various functionalities.
TODO
Known issues
height: 100%
of the textarea and to theoverflow-y: auto
on theedit
div around it, which were added to allow the textarea to follow the size of the parent (https://dhis2.atlassian.net/browse/DHIS2-15535)Screenshots
Example of use in LL (no visual changes here):
Example of use in dashboard:
(before)
(after)