This repository was archived by the owner on Sep 11, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 819
Improve design of the rich text editor #9533
Merged
Merged
Changes from 37 commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
2957e52
WIP on new design
florianduros 1737c21
Final design for composer
florianduros 7140743
Merge remote-tracking branch 'origin/develop' into feat/improve-rich-…
florianduros 479aa45
Fix growing composer
florianduros 1055dd4
Fix formatting buttons in edition
florianduros ef7f7f9
Fix copyright and hook name
florianduros 68a4216
Update i18n
florianduros 275e3a0
Fix types in test
florianduros a535796
Fix send button position
florianduros 10c8732
Cleaner button placement
florianduros 4645fc7
Smaller editor
florianduros b63f9d9
Fix bottom input when editor is expanded
florianduros 2746319
Lot of visual fix
florianduros a8a9ff1
Change outline color when editor has focused
florianduros 7fbd4b7
Rework the plain text icon
florianduros 5092acd
Fix blinking when switching mode
florianduros b8cbd01
Merge remote-tracking branch 'origin/develop' into feat/improve-rich-…
florianduros d92bffc
Increase timer in blur
florianduros 8b9cf19
Remove useless e2e icon key
florianduros 2a7834f
fix isfocused timeout
florianduros c5fd302
Fix tests
florianduros 52adb2c
Fix margin in case of multiple lines
florianduros 7a9166a
Merge remote-tracking branch 'origin/develop' into feat/improve-rich-…
florianduros a3e5511
Fix resize observer error
florianduros 6bc9ffe
improve rich text composer design
florianduros 70c3648
Merge branch 'develop' into feat/improve-rich-text-design
florianduros 4fdec53
Review fixes
florianduros bc610c8
Merge remote-tracking branch 'origin/develop' into feat/improve-rich-…
florianduros 3ae3ec7
Reduce margin-right of the composer
florianduros d9e032a
Fix ts strict error
florianduros dba4b1e
Merge remote-tracking branch 'origin/develop' into feat/improve-rich-…
florianduros 5add6ab
Fix ts error
florianduros e5be79f
Merge branch 'develop' into feat/improve-rich-text-design
florianduros 30015a5
Update room view snapshot
florianduros b8bcd7c
Fix composer growing
florianduros df6238b
Fix remaining ts error
florianduros 8a68450
Add requestionAnimationFrame to avoid resizer loop
florianduros cc7901e
Fix is expanded test
florianduros 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 hidden or 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 hidden or 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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
Copyright 2022 The Matrix.org Foundation C.I.C. | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
@import "./_MessageComposerButton.pcss"; | ||
|
||
.mx_EmojiButton { | ||
@mixin composerButton 50%,$accent; | ||
} | ||
|
||
.mx_EmojiButton_highlight { | ||
@mixin composerButtonHighLight; | ||
} | ||
|
||
.mx_EmojiButton_icon::before { | ||
mask-image: url('$(res)/img/element-icons/room/composer/emoji.svg'); | ||
} | ||
|
||
.mx_MessageComposer_wysiwyg { | ||
.mx_EmojiButton { | ||
@mixin composerButton 5px,$tertiary-content; | ||
} | ||
} |
This file contains hidden or 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 hidden or 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 |
---|---|---|
@@ -0,0 +1,68 @@ | ||
/* | ||
Copyright 2022 The Matrix.org Foundation C.I.C. | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
@define-mixin composerButtonHighLight { | ||
florianduros marked this conversation as resolved.
Show resolved
Hide resolved
|
||
background: rgba($accent, 0.25); | ||
/* make the icon the accent color too */ | ||
&::before { | ||
background-color: $accent !important; | ||
} | ||
} | ||
|
||
@define-mixin composerButton $border-radius,$hover-color { | ||
--size: 26px; | ||
position: relative; | ||
cursor: pointer; | ||
height: var(--size); | ||
line-height: var(--size); | ||
width: auto; | ||
padding-left: var(--size); | ||
border-radius: $border-radius; | ||
|
||
&::before { | ||
content: ''; | ||
position: absolute; | ||
top: 3px; | ||
left: 3px; | ||
height: 20px; | ||
width: 20px; | ||
background-color: $icon-button-color; | ||
mask-repeat: no-repeat; | ||
mask-size: contain; | ||
mask-position: center; | ||
} | ||
|
||
&::after { | ||
content: ''; | ||
position: absolute; | ||
left: 0; | ||
top: 0; | ||
z-index: 0; | ||
width: var(--size); | ||
height: var(--size); | ||
border-radius: $border-radius; | ||
} | ||
|
||
&:hover { | ||
&::after { | ||
background: rgba($hover-color, 0.1); | ||
} | ||
|
||
&::before { | ||
background-color: $hover-color; | ||
} | ||
} | ||
} |
This file contains hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.