Prevent possible regressions of EventTile structurally (#8647)
Prevent possible regressions of EventTile structurally (#8647)

* '.mx_EventTile_e2eIcon_warning' and '.mx_EventTile_e2eIcon_normal'

- Include '.mx_EventTile_e2eIcon_warning' and '.mx_EventTile_e2eIcon_normal'
- Merge '.mx_EventTile_e2eIcon_warning' and '.mx_EventTile_e2eIcon_normal'

Signed-off-by: Suguru Hirahara <4ee41141f41dad19127963eb65a2461cc3bc0d81@users.noreply.github.com>

* mx_EventTile_spoiler

- Group 'mx_EventTile_spoiler'
- mx_EventTile_spoiler.visible

Signed-off-by: Suguru Hirahara <4ee41141f41dad19127963eb65a2461cc3bc0d81@users.noreply.github.com>

* Group 'mx_EventTile_button'

Signed-off-by: Suguru Hirahara <4ee41141f41dad19127963eb65a2461cc3bc0d81@users.noreply.github.com>

* Group '.mx_EventTile_collapseButton' and '.mx_EventTile_expandButton'

Signed-off-by: Suguru Hirahara <4ee41141f41dad19127963eb65a2461cc3bc0d81@users.noreply.github.com>

* Group '.mx_EventTile_body .mx_EventTile_pre_container'

Signed-off-by: Suguru Hirahara <4ee41141f41dad19127963eb65a2461cc3bc0d81@users.noreply.github.com>

* Group '.mx_EventTile_copyButton'

Signed-off-by: Suguru Hirahara <4ee41141f41dad19127963eb65a2461cc3bc0d81@users.noreply.github.com>

* Group '.mx_EventTile_collapseButton'

Signed-off-by: Suguru Hirahara <4ee41141f41dad19127963eb65a2461cc3bc0d81@users.noreply.github.com>

* Group '.mx_EventTile_expandButton'

Signed-off-by: Suguru Hirahara <4ee41141f41dad19127963eb65a2461cc3bc0d81@users.noreply.github.com>

* Group '.mx_EventTile_copyButton' and '.mx_EventTile_collapseButton'

Signed-off-by: Suguru Hirahara <4ee41141f41dad19127963eb65a2461cc3bc0d81@users.noreply.github.com>

* Group '.mx_EventTile_collapseButton'

Signed-off-by: Suguru Hirahara <4ee41141f41dad19127963eb65a2461cc3bc0d81@users.noreply.github.com>

* Include '.mx_EventTile_collapsedCodeBlock' in '.mx_EventTile_pre_container'

Collapsed code block is displayed only in mx_EventTile_pre_container

Signed-off-by: Suguru Hirahara <4ee41141f41dad19127963eb65a2461cc3bc0d81@users.noreply.github.com>

* .mx_EventTile_keyRequestInfo

- Include '.mx_EventTile_keyRequestInfo_text' in '.mx_EventTile_keyRequestInfo'
- Include '.mx_AccessibleButton' in '.mx_EventTile_keyRequestInfo_text'
- Include '.mx_EventTile_keyRequestInfo_tooltip_contents p:first-child' and 'p:last-child' in '.mx_EventTile_keyRequestInfo_tooltip_contents p'

Signed-off-by: Suguru Hirahara <4ee41141f41dad19127963eb65a2461cc3bc0d81@users.noreply.github.com>

* Separate properties of mx_EventTile_button

The properties which should only be applied to buttons inside mx_EventTile_pre_container should not be applied to the top level.

Signed-off-by: Suguru Hirahara <4ee41141f41dad19127963eb65a2461cc3bc0d81@users.noreply.github.com>

* Apply mask-size of collapse button and expand button to ones in mx_EventTile_pre_container only

Signed-off-by: Suguru Hirahara <4ee41141f41dad19127963eb65a2461cc3bc0d81@users.noreply.github.com>

* Move declarations of buttons from mx_EventTile_button to mx_EventTile_pre_container

Signed-off-by: Suguru Hirahara <4ee41141f41dad19127963eb65a2461cc3bc0d81@users.noreply.github.com>

* Move buttons declarations below mx_EventTile_button

Signed-off-by: Suguru Hirahara <4ee41141f41dad19127963eb65a2461cc3bc0d81@users.noreply.github.com>

* Include '.mx_EventTile_pre_container' in '.mx_EventTile_body .mx_EventTile_pre_container'

Signed-off-by: Suguru Hirahara <4ee41141f41dad19127963eb65a2461cc3bc0d81@users.noreply.github.com>

* yarn run lint:style --fix

Signed-off-by: Suguru Hirahara <4ee41141f41dad19127963eb65a2461cc3bc0d81@users.noreply.github.com>

* Specify width and height to only buttons in mx_EventTile_pre_container

Signed-off-by: Suguru Hirahara <4ee41141f41dad19127963eb65a2461cc3bc0d81@users.noreply.github.com>

* Dedupe 'mx_EventTile_e2eIcon' ::before

Signed-off-by: Suguru Hirahara <4ee41141f41dad19127963eb65a2461cc3bc0d81@users.noreply.github.com>

* Hide buttons in mx_EventTile_pre_container and show them on hover by default

Setting "visibility: hidden" to mx_EventTile_button can easily cause a regression. The declaration should be exclusively applied to buttons inside mx_EventTile_pre_container, and "visibility: visible" should be set to those buttons only.

Signed-off-by: Suguru Hirahara <4ee41141f41dad19127963eb65a2461cc3bc0d81@users.noreply.github.com>

* Remove redundant nestings for E2E icons

Signed-off-by: Suguru Hirahara <4ee41141f41dad19127963eb65a2461cc3bc0d81@users.noreply.github.com>
matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk