-
-
Notifications
You must be signed in to change notification settings - Fork 828
Conform class names of mx_AppTileBody
for a widget and PiP widget to our naming policy
#11002
Conversation
mx_AppTileBody: !this.props.miniMode, | ||
mx_AppTileBody_mini: this.props.miniMode, |
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.
These have not really been efficient, as it was impossible to specify common declarations to a single selector.
Also, the class name mx_AppTileBody
had been misleading as it did not indicate by itself that the style rules added to the selector were in fact not applied to AppTileBody on mini mode.
Include mx_AppTileBody_fadeInSpinner in mx_AppTileBody, the class name applied by default
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.
Ah yes, this will definitely spare future developers looking at these class names some confusion. I have some questions though:
When you add, edit, or remove style rules from mx_appTileBody without causing a visual regression, it is imperative to keep in mind which selector should be worked on. The comments should help developers who are not familiar with the style codebase to avoid a regression.
Include mx_AppTileBody_fadeInSpinner in mx_AppTileBody, the class name applied by default
When you add, edit, or remove style rules from mx_appTileBody without causing a visual regression, it is imperative to keep in mind which selector should be worked on. The comments should help developers who are not familiar with the style codebase to avoid a regression.
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.
Sorry that I've taken a while to get back to you on this, I think this is fine to merge now
Ah, well, there is one snapshot test that still needs to be updated |
For element-hq/element-web#25269
This PR intends to conform selectors of
mx_AppTileBody
for a widget to our naming policy, in order to increase understandability and maintainability of the style rules, preventing a visual regression code-wise.Currently there are three class names for
AppTileBody
, two of which do not follow our naming policy:mx_AppTileBody
mx_AppTileBody_mini
mx_AppTile_loading
All of them are used to style
AppTileBody
. Bothmx_AppTileBody_mini
andmx_AppTile_loading
are not a child element defined byAppTileBody
, but a variant of it.The class name
mx_AppTile_loading
is misleading as it is not a child element ofAppTile
. It is my mistake with aed5fcf#diff-a94695056f674ec44233ef1dd8163588d10278cadaa3258d0a1112b32ec17d7eR382 (#10783).This PR suggests to replace them with these:
mx_AppTileBody
(for common declarations)mx_AppTileBody--large
(for normal size widgets; this selector manages the style rules whichmx_AppTileBody
had specified)mx_AppTileBody--mini
(for Element Call PiP widget)mx_AppTileBody--loading
(for widgets being loaded)(Elliptic avatar is a known issue: element-hq/element-web#24601)
type: task
Signed-off-by: Suguru Hirahara luixxiul@users.noreply.github.com
Checklist
This change is marked as an internal change (Task), so will not be included in the changelog.