Skip to content

latest-tag-button, default-branch-button and list-prs-for-file are not fast/reliable enough #3673

Closed

Description

@fregante
  1. Visit https://github.com/sindresorhus/refined-github/blob/42dfa16cd5366de26b475de94f8225003df07364/source/features/list-prs-for-file.tsx (or any file with an open PR)
  2. Refresh the page
  3. Wait for each button to appear, if ever

a212

These are 3 separate features but they affect the same area. I think they should be reviewed to understand why they're so slow and why latest-tag-button sometimes doesn't appear at all.

default-branch-button is the most annoying one because it's a simple feature with data that's easily available, it should be instant.

Activity

  1. fregante commented on Oct 22, 2020

    @fregante
    MemberAuthor

    Makes sense! Any API calls should appear before elementReady, or else we definitely wait too long.

  2. fregante commented on Nov 18, 2020

    @fregante
    MemberAuthor

    Here's an error:

    refined-github.js:5657 ❌ Refined GitHub → latest-tag-button → TypeError: Cannot read property 'parentElement' of null
        at init (refined-github.js:6078)
        at async runFeature (refined-github.js:5697)
        at async setupPageLoad (refined-github.js:5710)
    

    It can't find #branch-select-menu. It happened on the root of a fork:

    https://github.com/fregante/refined-github

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions