Skip to content

Features are not being applied on page change #4567

Closed

Description

@yakov116

Please ensure:

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

Describe the problem and how to replicate it

When changing pages unless I do a full refresh none of the CSS features are showing. I am not sure if this is an issue for all features. its all

Screenshots/video/gif showing the issue, if it’s visual

Video.2021-07-14.080606.mp4

Console errors, if any

No response

Example URL

https://github.com/sindresorhus/refined-github/issues

Browser(s) used

Chrome

Activity

  1. fregante commented on Jul 14, 2021

    @fregante
    Member

    Frik. Yes, I saw the bug but I always assume that it's Safari’s fault. Maybe they changed the pjax:* events? Every GitHub extension is broken if so

  2. added
    Please! ♥︎
    on Jul 14, 2021
  3. pinned this issue on Jul 14, 2021
  4. yakov116 commented on Jul 14, 2021

    @yakov116
    MemberAuthor

    I think the <has-rgh> is not getting removed on page change.
    makes sense?

  5. fregante commented on Jul 14, 2021

    @fregante
    Member

    Uhhh this is the same bug as #3945. They started changing content inside #repo-content-pjax-container, which is a sibling of has-rgh.

    It might be worth adding a secondary has-rgh-inner element inside #repo-content-pjax-container and also track that.

  6. yakov116 commented on Jul 14, 2021

    @yakov116
    MemberAuthor

    I am not going to attempt this. How do we know what features need to look at the #repo-content-pjax-container and what needs the other ones?

  7. cheap-glitch commented on Jul 14, 2021

    @cheap-glitch
    Contributor

    How do we know what features need to look at the #repo-content-pjax-container and what needs the other ones?

    I guess there's no choice but to manually check every feature and add deduplicate: 'has-rgh-inner' where needed?

  8. yakov116 commented on Jul 14, 2021

    @yakov116
    MemberAuthor

    Very tricky but I guess

  9. cheap-glitch commented on Jul 14, 2021

    @cheap-glitch
    Contributor

    After a bit of playing around, it seems to me most of the features would rely on has-rgh-inner anyway, so maybe this could become the new default? Then features modifying the repo header or tabs (e.g. more-dropdown, ci-link, etc.) would have to explicitly specify deduplicate: 'has-rgh'.

  10. yakov116 commented on Jul 14, 2021

    @yakov116
    MemberAuthor

    After a bit of playing around, it seems to me most of the features

    Most isRepo

  11. yakov116 commented on Jul 14, 2021

    @yakov116
    MemberAuthor

    Even show names is broken 😢

  12. fregante commented on Jul 14, 2021

    @fregante
    Member

    so maybe this could become the new default

    My concern is that:

    • the new container might not appear on every page
    • if GitHub goes from a "outer" page to an "inner" page in the same Ajax session, we won't notice

    I think the logic would be:

    1. has inner? deduplicate, return
    2. can have inner? add inner, run, return
    3. has-rgh? deduplicate, return
    4. add has-rgh, run, return
  13. fregante commented on Jul 15, 2021

    @fregante
    Member

    It looks like the current code doesn’t match my suggested flow. Maybe it’s:

    • Add has-rgh and has-rgh-inner at the same time, wherever possible
    • Default deduplicate to undefined, which would be the auto-mode:
    if the repo-container exists
      if has-rgh-inner doesn’t exists
        run feature
    else if has-rgh doesn’t exist
      run feature 
  14. unpinned this issue on Jul 19, 2021
  15. yakov116 commented on Jul 19, 2021

    @yakov116
    MemberAuthor

    There are still more issues.

    For example dim-bots

  16. cheap-glitch commented on Jul 19, 2021

    @cheap-glitch
    Contributor

    Yes, it's probable that I missed some features since I had to go manually through most of them. In most cases fixing it should be as simple as adding deduplicate: 'has-rgh-inner'.

  17. yakov116 commented on Jul 19, 2021

    @yakov116
    MemberAuthor

    But that runs on pages that do not have inner. (Commit pages)

  18. cheap-glitch commented on Jul 19, 2021

    @cheap-glitch
    Contributor

    I can't reproduce, can you describe the exact steps you took?

  19. yakov116 commented on Jul 19, 2021

    @yakov116
    MemberAuthor

    Will try later to see if I have a n issue ang will let you know

  20. yakov116 commented on Jul 19, 2021

    @yakov116
    MemberAuthor

    LOL I think we should wait a drop.
    Github needs to figure themselves out.

    Go to 21.7.18...main
    Then go to the pull requests

    image

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