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
Stop using mx_GroupLayout for styling #8711
Merged
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
github-actions
bot
added
the
T-Task
Refactoring, enabling or disabling functionality, other engineering tasks
label
May 28, 2022
luixxiul
changed the title
Stop using mx_GroupLayout as the top level declaration for styling
Stop using mx_GroupLayout for styling and delete _GroupLayout.scss
Jun 3, 2022
Signed-off-by: Suguru Hirahara <[email protected]>
Signed-off-by: Suguru Hirahara <[email protected]>
…o _EventTile.scss - Remove _GroupLayout.scss Signed-off-by: Suguru Hirahara <[email protected]>
- Move the variables to the top - Remove the duplicate variable - Replace the global variable with a scss variable as it is no longer used on other files Signed-off-by: Suguru Hirahara <[email protected]>
The declaration with not() function is stronger than the declaration with '[data-layout=group]'. Setting margin value should be left to selectors in each case. Signed-off-by: Suguru Hirahara <[email protected]>
Signed-off-by: Suguru Hirahara <[email protected]>
Signed-off-by: Suguru Hirahara <[email protected]>
- Add [data-layout=group] to EventTile (it had been included in mx_GroupLayout) Signed-off-by: Suguru Hirahara <[email protected]>
Into .mx_EventTile[data-shape=ThreadsList] Signed-off-by: Suguru Hirahara <[email protected]>
Signed-off-by: Suguru Hirahara <[email protected]>
Signed-off-by: Suguru Hirahara <[email protected]>
luixxiul
changed the title
Stop using mx_GroupLayout for styling and delete _GroupLayout.scss
Stop using mx_GroupLayout for styling
Jun 3, 2022
Though the change itself is fairly small, I've split it into meaningful chunks for the sake of reviewers. Please ask me if there is something which is not clear enough. I could provide some screenshots of DOM if requested. |
Signed-off-by: Suguru Hirahara <[email protected]>
luixxiul
commented
Jun 3, 2022
@@ -128,7 +145,6 @@ $threadInfoLineHeight: calc(2 * $font-12px); // See: _commons.scss | |||
display: inline-block; | |||
padding-bottom: 0px; | |||
padding-top: 0px; | |||
margin: 0px; |
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.
- For modern layout: specified with https://github.com/matrix-org/matrix-react-sdk/pull/8711/files#diff-bd83194d78de871bc4ad1c4e8d43102c4368481bbb90705152d3d17fea813919R71
- For IRC layout: specified with https://github.com/matrix-org/matrix-react-sdk/pull/8711/files#diff-29c6a3cc88dee2f8be7fa065c46d7d64f66ba006cd8ba9f3f16f301f41d67444R176
- For bubble layout: inline start margin is not required
into GroupLayout Signed-off-by: Suguru Hirahara <[email protected]>
Signed-off-by: Suguru Hirahara <[email protected]>
luixxiul
commented
Jun 10, 2022
@@ -803,7 +819,7 @@ $threadInfoLineHeight: calc(2 * $font-12px); // See: _commons.scss | |||
} | |||
|
|||
.mx_DisambiguatedProfile { | |||
margin-right: $spacing-12; | |||
margin-inline: 0 $spacing-12; |
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.
SimonBrandner
approved these changes
Jun 15, 2022
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.
Looks sane
mm |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
T-Task
Refactoring, enabling or disabling functionality, other engineering tasks
Z-Community-PR
Issue is solved by a community member's PR
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.
For element-hq/element-web#22434
For
mx_EventTile
,mx_GroupLayout
is globally a parent element. Becausemx_GroupLayout
includesmx_EventTile
as a child element on _GroupLayout.scss, any rules to stylemx_EventTile
differently require to havemx_GroupLayout
as a parent selector in order to cancel cascading effect (see: ThreadsList), which makes style rules unnecessarily complicated and bloated.Since
mx_GroupLayout
has currentlymx_EventTile
as a sole direct child element on _GroupLayout.scss, it should be able to be safely removed in favor ofmx_EventTile[data-layout=group]
, which is used much more widely to style EventTile on the group layout. With this PR,mx_GroupLayout
is used only one time on _EventTilePreview.scss 🎉Actually _GroupLayout.scss can be (and should be) deleted altogether by moving the rest of the rules on the file because there is no "Group Layout", but it is out of scope of this PR.
type: task
Signed-off-by: Suguru Hirahara [email protected]
This change is marked as an internal change (Task), so will not be included in the changelog.