Skip to content

batch-mark-files-as-viewed - Selectors no longer match the PR Files view #10229

Closed

Description

@bsrz

Description

Shift-click (range) and alt-click (all) on the "Viewed" toggle no longer do anything on the PR Files tab. Only the clicked file is toggled.

It looks like GitHub changed its generated class names, so neither selector in batch-mark-files-as-viewed matches anymore. Checked on the feature's test URL, without the extension loaded:

Selector Matches Current markup
button[class*="MarkAsViewedButton"] 0 <button aria-label="Not Viewed" aria-pressed="false" class="prc-Button-ButtonBase-9n-Xk iconOnly__kjZ2po">
[class^="Diff-module__diffTargetable"] 0 <div class="diffTargetable__jbrCub diff__GZFl4M"> (14 on the page)

The Diff-module__ / *-module__ prefix appears to be gone, so other features using [class^="…-module__…"] selectors may also be affected.

Possible replacements:

  • Toggle: button[aria-label="Viewed"], button[aria-label="Not Viewed"]
  • Checked state: [aria-pressed="true"] (instead of :has(.octicon-checkbox-fill))
  • File: [class*="diffTargetable"]

keyboard-navigation imports viewedToggleSelector from this feature, so it would pick up the fix too.

How to replicate the issue + URL

  1. Open https://github.com/refined-github/sandbox/pull/55/changes
  2. Click "Viewed" on the first file
  3. Shift-click "Viewed" on a file further down

Expected: all files in between are marked as viewed
Actual: only the shift-clicked file is marked

Extension version

v26.10.15

Browser(s) used

Brave Nightly, Safari

Token ⚠️

  • I set a token in the options page. I understand that some features require a token to work.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions