Skip to content

Copy button doesn't show (and other file-related features) #3945

Closed

Activity

  1. fregante commented on Feb 5, 2021

    @fregante
    Member

    I found this too. It appears after a refresh. It probably has something to do with Ajax navigation

  2. self-assigned this
    on Feb 6, 2021
  3. removed their assignment
    on Feb 7, 2021
  4. yakov116 commented on Feb 16, 2021

    @yakov116
    Member

    This issue is very complex. Basically any time you navigate from a file selection any feature that needs to run does not.
    This includes not just features that are within the file box. Even fork-to is affected.

  5. fregante commented on Feb 21, 2021

    @fregante
    Member

    Even fork-to is affected.

    I don’t think so, that area is not updated when navigating the files, so the RG changes aren't lost nor do they need to be re-applied.

    gif

    This issue is very complex

    This issue just means that we can't rely on has-rgh to deduplicate our features. Fixing this would mean making features.add aware of which features need to be run on filelists as well and having their own filelist-has-rgh file.

    I think it's easier to just use per-feature checks on filelist features, as described in #3968 (comment)

  6. added
    small
    and removed
    small
    on Feb 21, 2021
  7. yakov116 commented on Feb 21, 2021

    @yakov116
    Member

    I don’t think so, that area is not updated when navigating the files, so the RG changes aren't lost nor do they need to be re-applied.

    When going to a single file fork-to is supposed to link to the file on the fork. (Maybe I am mixing up feature nanes)

  8. fregante commented on Feb 22, 2021

    @fregante
    Member

    Ah crap, you may be right. The URL isn't updated.

    It appears that the issue affects every feature on files and filelists. Another example:

    1. Visit https://github.com/sindresorhus/refined-github/find/main
    2. Type forkedto
    3. Open the feature
    4. No rgh-feature-descriptions enabled 😕
    5. Refresh the page
    6. There it is…

    I'm afraid we'll have to drop has-rgh, or at least figure out how many features are affected by this bug.

    As a temporary solution, once again, my suggestion still works. The alternative (dropping has-rgh) would mean that, if we forget to handle deduplication, we'll end up with duplicates. Whereas in the current situation, if we don't catch these issues, the features just silently fail. I prefer the latter, probably. 🤷‍♂️

  9. kidonng commented on Apr 3, 2021

    @kidonng
    Member

    Just FYI, navigation through Octotree does pair nicely with Refined GitHub (sadly they are closed source now, so it doesn't help much).

  10. 3 remaining items

  11. cheap-glitch commented on Apr 5, 2021

    @cheap-glitch
    Contributor

    navigation through Octotree does pair nicely with Refined GitHub

    +1

    I've been using the paid version of Octotree for a few months now, and it works great. RGH features are correctly enabled whenever navigating between files, there's no need to reload the page.

    Afaik it seems to use the native GH navigation (or at least some kind of AJAX navigation) because the page is never fully reloaded.

  12. yakov116 commented on Apr 5, 2021

    @yakov116
    Member

    I have never used octo but am I correct they only need to monitor the tree part of github? We need to monitor the whole page.

    What about about we add a config called repeatWhereNotExist: 'selector here' and do a select.exists on run?

    I know this is a bit manual but it can work until we find a good solution.

  13. kidonng commented on Apr 7, 2021

    @kidonng
    Member

    If I remember correctly OctoTree implemented its own loading mechanism (for no good reason) so many other extensions didn't work because of it.

    If you are referring to ovity/octotree#490, that has been fixed a long time ago.

    I don't know if that has been changed since.

    It certainly does, but we won't know exactly how now 🤷‍♀️

  14. fregante commented on Apr 8, 2021

    @fregante
    Member

    I think I know why it works with octotree: they load the whole page as GitHub used to do before. The issue here doesn’t apply because GitHub replaces part of the page, leaving has-rgh untouched.

    @yakov116 that’s an interesting solution, which basically standardizes what we already do manually inside init in some cases.

    Either way I’d like this issue fixed before the next release, so if no one opens a PR with their solution I will

  15. yakov116 commented on Apr 8, 2021

    @yakov116
    Member

    @yakov116 that’s an interesting solution, which basically standardizes what we already do manually inside init in some cases.

    Exactly my thought.

    Either way I’d like this issue fixed before the next release, so if no one opens a PR with their solution I will

    Do you like my idea? or do you want another idea.

  16. fregante commented on Apr 9, 2021

    @fregante
    Member

    Yeah, either one could work. It could even be merged with the existing deduplication key: deduplicate: 'selector' for your suggestion and deduplicate: true for the current behavior (equivalent to deduplicate: 'has-rgh')

  17. yakov116 commented on Apr 9, 2021

    @yakov116
    Member

    I want to finish up my other PR(s) so your free to take this. If not I can try sometime next week.

  18. fregante commented on Apr 9, 2021

    @fregante
    Member

    onetime could also be merged into the same property if it makes sense, since it's also used to avoid running multiple times, but naming the option might be tough. Maybe:

    - init: onetime(init)
    + deduplicate: 'once',
    + init
    - repeatOnBackButton: false,
    + deduplicate: 'auto',
    - if (select.exists('.rgh-selector')) {
    - 	return false;
    - }
    ...
    + deduplicate: '.rgh-selector',
  19. fregante commented on Apr 12, 2021

    @fregante
    Member

    There's no deduplication there, they're just tracking the URL in an unnecessarily-complex way (we do the same by just listening to pjax:end)

  20. self-assigned this
    on Apr 16, 2021
  21. fregante commented on May 28, 2021

    @fregante
    Member

    show-whitespace seems to be missing too

    1. Open https://github.com/sindresorhus/refined-github/tree/main/build
    2. Open file
    3. See no whitespace
    4. Refresh oage
    5. See whitespace

    gif

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

Metadata

Metadata

Assignees

Labels

Please! ♥︎acceptedbug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions