This repository has been archived by the owner on Sep 11, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 833
Add list functionality to rich text editor #9871
Merged
Merged
Changes from 35 commits
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
be18bfd
add bullet list svg icon
ae37394
use new icon and add button
660b105
amend fill colour for icon
458e756
look at correct part of actionStates for styling
da8fdba
use .unorderedList method, not .orderedList
c2cff3e
style ul and ol to remove margin, use circle not disc
43cd30d
sort out line height and lhs padding
f051854
add numbered list and icon
20864e8
hide end of model linebreak, separate out ul styling
2f474fa
Change copy bullet => bulleted
cbbdce7
expand tests to include new buttons
fce7d3a
Merge branch 'develop' into alunturner/add-bullet-list
4e9d486
reformat tests, wip single failing refactored test
135d82c
rewrite final test
f4550d6
add i18n strings
2641fde
fix no implicit any errors, neaten up types
0d47acf
use yarn i18n to generate file
a3b2e9f
Merge remote-tracking branch 'origin/develop' into alunturner/add-bul…
e1926eb
rename to bulleted for consistency
10bff95
remove comment
ce7d478
remove unnecessary awaits
6be2f75
Merge branch 'develop' into alunturner/add-bullet-list
artcodespace 186d69e
update import path
98dd6e6
make display: none only target last child of container
6b1e91c
Merge remote-tracking branch 'origin/develop' into alunturner/add-bul…
7421d69
amend CSS selector
ce881c1
Merge branch 'develop' into alunturner/add-bullet-list
artcodespace 4677ee4
Merge branch 'develop' into alunturner/add-bullet-list
artcodespace 421f805
use :is instead of repeating selectors
463268b
Merge branch 'develop' into alunturner/add-bullet-list
125c562
Merge branch 'develop' into alunturner/add-bullet-list
b2400f5
fix rounding issue for composer input
ee7ffa0
make timeline and composer use discs, not circles
e9962d0
fix shift enter not working
553a2c0
Merge branch 'develop' into alunturner/add-bullet-list
artcodespace 07ed1ad
Merge remote-tracking branch 'origin/develop' into alunturner/add-bul…
a634d4d
use ! instead of === false
db0bf64
revert regression fix
bc5e6ef
Amend consecutive list display in timeline
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -619,6 +619,10 @@ $left-gutter: 64px; | |
ul ol { | ||
list-style-type: revert; | ||
} | ||
|
||
> ul { | ||
list-style-type: disc; | ||
} | ||
} | ||
} | ||
|
||
|
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,7 @@ import React, { CSSProperties, forwardRef, memo, MutableRefObject, ReactNode } f | |
import { useIsExpanded } from "../hooks/useIsExpanded"; | ||
import { useSelection } from "../hooks/useSelection"; | ||
|
||
const HEIGHT_BREAKING_POINT = 20; | ||
const HEIGHT_BREAKING_POINT = 24; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This change necessary due to the increase in line height introduced by this PR |
||
|
||
interface EditorProps { | ||
disabled: boolean; | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,10 @@ export function useInputEventProcessor(onSend: () => void): (event: WysiwygEvent | |
|
||
const isKeyboardEvent = event instanceof KeyboardEvent; | ||
const isEnterPress = | ||
!isCtrlEnter && (isKeyboardEvent ? event.key === "Enter" : event.inputType === "insertParagraph"); | ||
!isCtrlEnter && | ||
(isKeyboardEvent | ||
? event.key === "Enter" && event.shiftKey === false | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This line is the only logic change, to make sure shift + enter will add a linebreak
artcodespace marked this conversation as resolved.
Show resolved
Hide resolved
|
||
: event.inputType === "insertParagraph"); | ||
// sendMessage is sent when ctrl+enter is pressed | ||
const isSendMessage = !isKeyboardEvent && event.inputType === "sendMessage"; | ||
|
||
|
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
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
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.
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.
Requested design change - use discs not circles when displaying bulleted (unordered) lists in the main timeline