Skip to content

Make the cursor style reflect that it can be clicked on hidden comment#2415

Merged
Urgau merged 3 commits into
rust-lang:masterfrom
Urgau:gh-comments-cursor-style
Jun 1, 2026
Merged

Make the cursor style reflect that it can be clicked on hidden comment#2415
Urgau merged 3 commits into
rust-lang:masterfrom
Urgau:gh-comments-cursor-style

Conversation

@Urgau
Copy link
Copy Markdown
Member

@Urgau Urgau commented May 29, 2026

image image

cc @apiraino (since we talked about at RustWeek)

@Urgau Urgau requested a review from Kobzol May 29, 2026 17:20
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented May 29, 2026

Static files in src/gh_comments/ were modified, make sure to update their version number in src/gh_comments.rs to bust the client cache.

@apiraino
Copy link
Copy Markdown
Contributor

maybe I am missing something: what is the difference after this patch?

Also now the cursors becomes a 'hand'

Details
recording.mp4

The thing that I think is missing, is a hint when a comment is collapsed

Details grafik

@Urgau
Copy link
Copy Markdown
Member Author

Urgau commented May 29, 2026

what is the difference after this patch?

regular comments (not reviews or review comments, as they already show the hand) now show a hand (to indicate that it can be clicked) instead of the regular cursor pointer

@Urgau
Copy link
Copy Markdown
Member Author

Urgau commented May 29, 2026

The thing that I think is missing, is a hint when a comment is collapsed

Doesn't the "hidden" text, next to the time, already serve that purpose?

EDIT: I see what you mean, we don't show this text for review threads.

@Urgau
Copy link
Copy Markdown
Member Author

Urgau commented May 29, 2026

What about like this?

Collapsed Expanded
image image

PS: Doing the fold/unfold at the right is bit tricky, there doesn't seems to be unicode set of characters we could use, and none of the arrays are convincing.

@apiraino
Copy link
Copy Markdown
Contributor

apiraino commented May 31, 2026

What about like this?

definitively better! Do you think it's possible to add this svg inline, to make it look like just like GitHub's?

Collapse SVG

<svg aria-hidden="true" data-component="Octicon" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-unfold">
    <path d="m8.177.677 2.896 2.896a.25.25 0 0 1-.177.427H8.75v1.25a.75.75 0 0 1-1.5 0V4H5.104a.25.25 0 0 1-.177-.427L7.823.677a.25.25 0 0 1 .354 0ZM7.25 10.75a.75.75 0 0 1 1.5 0V12h2.146a.25.25 0 0 1 .177.427l-2.896 2.896a.25.25 0 0 1-.354 0l-2.896-2.896A.25.25 0 0 1 5.104 12H7.25v-1.25Zm-5-2a.75.75 0 0 0 0-1.5h-.5a.75.75 0 0 0 0 1.5h.5ZM6 8a.75.75 0 0 1-.75.75h-.5a.75.75 0 0 1 0-1.5h.5A.75.75 0 0 1 6 8Zm2.25.75a.75.75 0 0 0 0-1.5h-.5a.75.75 0 0 0 0 1.5h.5ZM12 8a.75.75 0 0 1-.75.75h-.5a.75.75 0 0 1 0-1.5h.5A.75.75 0 0 1 12 8Zm2.25.75a.75.75 0 0 0 0-1.5h-.5a.75.75 0 0 0 0 1.5h.5Z"></path>
</svg>

@Urgau
Copy link
Copy Markdown
Member Author

Urgau commented May 31, 2026

Do you think it's possible to add this svg inline, to make it look like just like GitHub's?

Maybe not as inline svg, since it needs to change depending on the state (there is two icons).

But the original SVG are open-source MIT Licensed: fold and unfold

Let's me see what I can do.

@Urgau
Copy link
Copy Markdown
Member Author

Urgau commented May 31, 2026

What about now?
image

@apiraino
Copy link
Copy Markdown
Contributor

looks great! Pretty much GitHub's own design

@Urgau Urgau added this pull request to the merge queue Jun 1, 2026
Merged via the queue into rust-lang:master with commit 8b17696 Jun 1, 2026
3 checks passed
@Urgau Urgau deleted the gh-comments-cursor-style branch June 1, 2026 06:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants