Fix class name of the read marker on MessagePanel#10745
Conversation
|
|
||
| // find the <li> which wraps the read marker | ||
| const [rm] = container.getElementsByClassName("mx_RoomView_myReadMarker_container"); | ||
| const [rm] = container.getElementsByClassName("mx_MessagePanel_myReadMarker"); |
There was a problem hiding this comment.
Having the element named as mx_MessagePanel_ indeed should look natural.
- Replace the compound selector with a type selector - Nest the type selector in "mx_RoomView_myReadMarker_container"
Including "container" in a class name is redundant as our naming policy tells that a string followed by an underscore (_) represents a container if it contains an element.
- Remove a unit - Hide hr's parent (mx_RoomView_myReadMarker) on Percy snapshots
…anel_myReadMarker` The read marker is specified on MessagePanel.tsx, and should be named so to avoid confusion. - Create _MessagePanel.pcss for the style rules of MessagePanel
andybalaam
left a comment
There was a problem hiding this comment.
Thank you - this looks good and I will merge it.
Even better would be to split the 3 things you mentioned in the PR description into 3 separate PRs!
This comment was marked as resolved.
This comment was marked as resolved.
|
|
|
Two flakes in Percy caused the failure: element-hq/element-web#25283 and element-hq/element-web#24881 |
|
.. and now we have merge conflicts :-( Should be better when that is fixed, now that #10878 is merged. |
|
Ideally the merge queue should return an error as soon as a PR is added to the queue, if the conflicts are expected to occur if the PRs on the queue have been successfully merged… |
|
I have approved the Percy screenshots and logged a bug about the flaky test: element-hq/element-web#25368 |
|
Here is a link to the run: https://cloud.cypress.io/projects/ppvnzg/runs/13963/overview |
This PR suggests to fix a read marker's class name, so that it indicates that the marker belongs to
MessagePanel, notRoomView.It also intends to create
_MessagePanel.pcssforMessagePanel.tsxand hide the zero height element which just wraps<hr>on Percy snapshots.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.