-
Notifications
You must be signed in to change notification settings - Fork 731
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] Add list formatting buttons to the rich text editor #7887
Conversation
80fd02d
to
624c5d6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changelog.d/7887.feature
Outdated
@@ -0,0 +1 @@ | |||
Add your info here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we should update the changelog entry with the real entry?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -240,6 +240,12 @@ internal class RichTextComposerLayout @JvmOverloads constructor( | |||
} | |||
} | |||
} | |||
addRichTextMenuItem(R.drawable.ic_composer_bullet_list, R.string.rich_text_editor_bullet_list, ComposerAction.UNORDERED_LIST) { | |||
views.richTextComposerEditText.toggleList(false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it would be more clear to use named parameter?
views.richTextComposerEditText.toggleList(false) | |
views.richTextComposerEditText.toggleList(ordered = false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
views.richTextComposerEditText.toggleList(false) | ||
} | ||
addRichTextMenuItem(R.drawable.ic_composer_numbered_list, R.string.rich_text_editor_numbered_list, ComposerAction.ORDERED_LIST) { | ||
views.richTextComposerEditText.toggleList(true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
views.richTextComposerEditText.toggleList(true) | |
views.richTextComposerEditText.toggleList(ordered = true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree and actually in the designs we have a 'faded edge' to indicate that the buttons can be scrolled horizontally. I've added this in Here's what it looks like: fading-edge.webm |
Kudos, SonarCloud Quality Gate passed! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the updates. LGTM!
Type of change
Content
Add list formatting buttons to the rich text editor.
Motivation and context
PSU-1058
Screenshots / GIFs
lists.webm
Toggling list types
switching-list-types.webm
Tests
Note that the feature is still a little unstable so expect some quirks while testing manually.
Tested devices
Checklist