sindresorhus/refined-github

`select-notifications` disappears after clicking Done #4752

fregante posted onGitHub


Weird, I can't reproduce this on Firefox. Does it happens every time? Or only when marking a "tag notification" as done? (I don't have any of those in my backlog so can't test this case).

posted by cheap-glitch over 3 years ago

Every time the list updates, it has to do with ajax loading because you can see it's delayed by a few seconds. Try again if the list is spread across multiple pages and GitHub will definitely attempt to load more items if you mark some as Done.

posted by fregante over 3 years ago

I could reproduce this now. By checking the network tab it seems like github implicitly refreshes the page and so the Select By button disappears.

posted by Nirajn2311 over 3 years ago

This reminds me of working with Turbolinks in Rails. I assume some event fires when the page "refreshes" which we would need to listen for and re-trigger injecting the "Select by..." dropdown insertion?

Alternatively, I assume we could register a change event handler on the header or something to detect it being reset.

posted by sambostock over 3 years ago

This reminds me of working with Turbolinks in Rails

That's basically it, I think GitHub uses a custom version of jQuery-pjax.

we could register a change event handler

If GitHub doesn't already fire an event, we can use onNodeRemoved or just selector-observer.

posted by fregante over 3 years ago

Fund this Issue

$0.00
Funded

Pull requests