Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Fix class name of the read marker on MessagePanel#10745

Merged
andybalaam merged 9 commits into
matrix-org:developfrom
luixxiul:RoomView3
May 15, 2023
Merged

Fix class name of the read marker on MessagePanel#10745
andybalaam merged 9 commits into
matrix-org:developfrom
luixxiul:RoomView3

Conversation

@luixxiul
Copy link
Copy Markdown
Contributor

@luixxiul luixxiul commented Apr 29, 2023

This PR suggests to fix a read marker's class name, so that it indicates that the marker belongs to MessagePanel, not RoomView.

It also intends to create _MessagePanel.pcss for MessagePanel.tsx and 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

  • Tests written for new code (and old code if feasible)
  • Linter and other CI checks pass
  • Sign-off given on the changes (see CONTRIBUTING.md)

This change is marked as an internal change (Task), so will not be included in the changelog.

@github-actions github-actions Bot added Z-Community-PR Issue is solved by a community member's PR T-Task Refactoring, enabling or disabling functionality, other engineering tasks labels Apr 29, 2023
@luixxiul luixxiul marked this pull request as ready for review April 29, 2023 07:21
@luixxiul luixxiul requested a review from a team as a code owner April 29, 2023 07:21

// find the <li> which wraps the read marker
const [rm] = container.getElementsByClassName("mx_RoomView_myReadMarker_container");
const [rm] = container.getElementsByClassName("mx_MessagePanel_myReadMarker");
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having the element named as mx_MessagePanel_ indeed should look natural.

luixxiul added 5 commits May 8, 2023 05:30
- 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 andybalaam added the X-Needs-Percy Whether to run Percy screenshot tests in Merge Queue label May 9, 2023
Copy link
Copy Markdown
Member

@andybalaam andybalaam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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!

@andybalaam andybalaam enabled auto-merge May 9, 2023 12:46
@andybalaam andybalaam added this pull request to the merge queue May 9, 2023
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks May 9, 2023
@robintown robintown removed their request for review May 9, 2023 19:25
@andybalaam andybalaam added this pull request to the merge queue May 10, 2023
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks May 10, 2023
@luixxiul

This comment was marked as resolved.

@luixxiul luixxiul marked this pull request as ready for review May 12, 2023 06:58
@luixxiul luixxiul marked this pull request as draft May 12, 2023 06:58
@luixxiul luixxiul marked this pull request as ready for review May 12, 2023 07:02
@luixxiul
Copy link
Copy Markdown
Contributor Author

permalinks.spec.ts was updated and it should be fine now.

@andybalaam andybalaam added this pull request to the merge queue May 12, 2023
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks May 12, 2023
@andybalaam
Copy link
Copy Markdown
Member

Two flakes in Percy caused the failure: element-hq/element-web#25283 and element-hq/element-web#24881

@andybalaam andybalaam added this pull request to the merge queue May 12, 2023
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks May 12, 2023
@andybalaam
Copy link
Copy Markdown
Member

.. and now we have merge conflicts :-( Should be better when that is fixed, now that #10878 is merged.

@luixxiul
Copy link
Copy Markdown
Contributor Author

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…

@andybalaam andybalaam enabled auto-merge May 12, 2023 11:44
@andybalaam andybalaam added this pull request to the merge queue May 12, 2023
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks May 12, 2023
@andybalaam
Copy link
Copy Markdown
Member

andybalaam commented May 15, 2023

I have approved the Percy screenshots and logged a bug about the flaky test: element-hq/element-web#25368

@andybalaam andybalaam added this pull request to the merge queue May 15, 2023
@luixxiul
Copy link
Copy Markdown
Contributor Author

Here is a link to the run: https://cloud.cypress.io/projects/ppvnzg/runs/13963/overview

Merged via the queue into matrix-org:develop with commit 3b2216e May 15, 2023
@luixxiul luixxiul deleted the RoomView3 branch May 15, 2023 11:31
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 X-Needs-Percy Whether to run Percy screenshot tests in Merge Queue Z-Community-PR Issue is solved by a community member's PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants