Skip to content

⚠️ Many features don't work until you refresh the page #4695

Closed

Description

@fregante

Please ensure:

  • The bug is caused by Refined GitHub. It doesn't happen if I disable the extension.

Description

One of the recent AJAX PRs might have broken the loader altogether. One example I see is in the PR Files tab.

  1. Open Refactor functions related to file renames #4685
  2. Click the files tab
  3. Notice that almost every feature is missing:
  • remove-diff-signs
  • pr-jump-to-first-non-viewed-file
  • faster-reviews
  • collapsible-button (but table-input is working, these 2 should be identical)
  • batch-mark-files-as-viewed
  • etc etc etc
  1. Refresh the page, everything works

cc @kidonng @dertieran @cheap-glitch @yakov116 as you've recently worked on the ajax part

Screenshot

Screen Shot 2

Console errors

No response

Example URL

#4685 -> then click the files tab

Browser(s) used

Safari

Activity

  1. added
    Please! ♥︎
    on Aug 21, 2021
  2. pinned this issue on Aug 24, 2021
  3. williammck commented on Aug 31, 2021

    @williammck
  4. williammck commented on Sep 1, 2021

    @williammck

    Dug around for a bit, this is due to deduplicate not being set to has-rgh-inner on some features after #4571.

    e.g. if I apply the following patch, faster-reviews now starts functioning properly even after multiple tab clicks.

    diff --git a/source/features/faster-reviews.tsx b/source/features/faster-reviews.tsx
    index 1b11bd54..7cc4e23c 100644
    --- a/source/features/faster-reviews.tsx
    +++ b/source/features/faster-reviews.tsx
    @@ -54,6 +54,7 @@ void features.add(__filebasename, {
                    },
            ],
            awaitDomReady: false,
    +       deduplicate: 'has-rgh-inner',
            init: addSidebarReviewButton,
     }, {
            shortcuts: {
    @@ -63,5 +64,6 @@ void features.add(__filebasename, {
                    pageDetect.isPRFiles,
            ],
            awaitDomReady: false,
    +       deduplicate: 'has-rgh-inner',
            init: initReviewButtonEnhancements,
     });

    I may spend some time this weekend identifying where all this needs to be updated, if no one gets to it before then.

  5. fregante commented on Sep 1, 2021

    @fregante
    MemberAuthor

    Thank you! It's possible that they just changed the container for PRs so it broke it for every PR feature.


    It'd be great to create a map of "page:deduplicate-selector" so that this can be handled by the feature manager instead of having to manually specify it in every feature, but this might take a little effort. It's best to focus on patching the specific features first so we can release a fix soon.

    Anyway this is what I mean:

    const deduplicateMap = {
      isPR: '.has-rgh-inner',
      isDashboard: '.has-rgh',
    }
  6. changed the title [-]Many features don't work on ajax navigation[/-] [+]⚠️ Many features don't work on ajax navigation[/+] on Sep 9, 2021
  7. fregante commented on Sep 9, 2021

    @fregante
    MemberAuthor

    @williammck would you be able to send a PR?

  8. changed the title [-]⚠️ Many features don't work on ajax navigation[/-] [+]⚠️ Many features don't work until you refresh the page[/+] on Sep 16, 2021
  9. fregante commented on Sep 29, 2021

    @fregante
    MemberAuthor

    This has been fixed for many PR-related features and will be in the upcoming v21.10.1.

    If you still see this problem after updating, please leave a link to the page you're seeing the issue on (i.e. the page you have to refresh for features to appear)

  10. unpinned this issue on Oct 8, 2021
  11. locked as resolved and limited conversation to collaborators on Aug 17, 2022
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

    Please! ♥︎acceptedbug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions