Skip to content

dim-viewed-files - New feature - #10172

Open
xremix wants to merge 32 commits into
refined-github:mainfrom
xremix:feat/dim-viewed-files
Open

xremix wants to merge 32 commits into
refined-github:mainfrom
xremix:feat/dim-viewed-files

Conversation

@xremix

@xremix xremix commented Oct 6, 2026 •

Copy link
Copy Markdown

Adds dim-viewed-files: dims files marked as "Viewed" in the PR file tree, plus folders whose files are all viewed, so unreviewed files stand out.

  • File rows are dimmed via a class set by JS, based on each diff's "Viewed" state (new React view and legacy checkboxes).
  • Folders are dimmed in CSS only, via :has(); only the folder's own row is dimmed to avoid compounding opacity on nested items.

Test URLs

https://github.com/refined-github/refined-github/pull/10172/changes

Screenshot

image

@xremix
xremix marked this pull request as ready for review October 6, 2026 09:33

@fregante fregante left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the PR! This has been requested at least once before (#9993)

If we can keep it simple and lightweight I think it might be useful.

Comment thread source/features/dim-viewed-files.css Outdated
Comment thread source/refined-github.ts Outdated
Comment thread source/features/dim-viewed-files.tsx Outdated
Comment thread source/features/dim-viewed-files.tsx Outdated
Comment thread source/features/dim-viewed-files.tsx Outdated
Comment thread source/features/dim-viewed-files.tsx Outdated
xremix and others added 10 commits October 10, 2026 10:53
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Scope folder selectors to the labeled file tree without relying on the legacy files_bucket container.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Remove legacy selectors and redundant viewed-state checks. Use diff IDs, aria-pressed, and modern tree items directly.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Avoid marking unviewed buttons as seen before aria-pressed becomes true.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

@fregante fregante left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It looks like a small feature now ☺️

Comment thread source/features/dim-viewed-files.tsx Outdated
Comment thread source/features/dim-viewed-files.tsx Outdated
Comment thread source/features/dim-viewed-files.tsx Outdated
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
xremix and others added 2 commits October 10, 2026 14:53
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Comment thread readme.md Outdated
Comment thread source/features/dim-viewed-files.css
@fregante fregante changed the title dim-viewed-files - Dim viewed files in the PR file tree dim-viewed-files - New feature Oct 10, 2026
@fregante

Copy link
Copy Markdown
Member

I'm not seeing the feature, did GitHub already break it?

Screenshot 11

@fregante
fregante marked this pull request as draft October 15, 2026 06:08
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@xremix

xremix commented Oct 15, 2026

Copy link
Copy Markdown
Author

@fregante I updated the code. It did work on one PR but not on another, but I found what was missing. Good catch, thanks for checking. I think this should be good now.

@xremix
xremix marked this pull request as ready for review October 15, 2026 20:13

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants