fregante / notifications-preview-github

Browser Extension: preview GitHub notifications with same page pop-overs
https://chrome.google.com/webstore/detail/github-notifications-prev/kgilejfahkjidpaclkepbdoeioeohfmj?hl=en&gl=IN
MIT License
144 stars 15 forks source link

Add option the popup to close on mouseleave #125

Closed darkred closed 3 months ago

darkred commented 3 years ago

Closes #123

Test URLs

https://github.com/

Screenshot

2021-05-05_225054


Note to reviewers

I use .removeAttribute('open') to close the dropdown.

fregante commented 3 years ago

Thank you! I’ll make sure it works correctly soon

darkred commented 3 years ago

I made a change so that the popup close gets canceled if you re-mousenter quick enough, within 1 sec (1000 ms) (and updated the screenshot in the OP).

darkred commented 3 years ago

Hi @fregante Is there any way I can assist you in making the PR complete ?

  Some notes:

darkred commented 3 years ago

Thank you! I’ll make sure it works correctly soon

@fregante Have you changed your mind? Do you find this PR is not salvageable? Should I close this?

fregante commented 3 years ago

I've been on Safari for a year and I haven't used some of my extensions since 😅 so you can just leave this open until someone reviews it

tjx666 commented 3 months ago

Welcome to contribute here: https://github.com/tjx666/github-notifications-preview/tree/main

darkred commented 3 months ago

@fregante Thanks for the merge. Just wanted to note, though, that the problem with my code that I reported above still exists (the additional multiple "Marked 0 notifications as read").

Screenshot: ![](https://github.com/user-attachments/assets/731ce1a8-b30c-4b37-a83b-5226d4b4b05e)

  Is it ok if I open an issue for reference? (I haven't managed to fix this problem myself). Or, it's better to revert the merge altogether, so someone else can provide a fully working PR?

fregante commented 3 months ago

If this PR introduced the bug, just reuse the closing logic that we already had: select('.modal-backdrop').click();

You can place this line in closeDropdown and replace the old select('.modal-backdrop').click(); with closeDropdown() as well.

Note that we're still waiting for this to be released though

darkred commented 3 months ago

Thanks a lot for the guidance. So, I tried your suggestions but I noticed that the .modal-backdrop selector no longer applied (you had used it 7 years ago here). If you could provide me with a working one, I'd gladly make a new PR. (I apologize for asking for your help once again, but I can't seem to find a working one myself).

Note that we're still waiting for this to be released though

For Firefox it was released alright.

fregante commented 3 months ago

Check how it's already working. Clicking somewhere manually closes the dropdown, so you can see what the new selector is.

darkred commented 3 months ago

The selector I've found is details.NPG-container[open] > summary and it works, but unfortunately the duplicate additional multiple "Marked 0 notifications as read") still occur. Here are the 2 changes in total: 2024-08-06_021512

and here is a screen capture of the issue: ![](https://github.com/user-attachments/assets/77af31b1-1333-49a0-868d-dc4075105265)
fregante commented 3 months ago

It's not an issue with this PR. It can be fixed separately:

PR welcome with the change I suggested anyway

fregante commented 2 months ago

I just submitted this version to the chrome web store. They should publish it within 24 hours