-
-
Notifications
You must be signed in to change notification settings - Fork 71
Keyboard event-related fixes + notifications improvements #1826
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files
☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Keyboard: I'm not seeing a behavior change. On a Mac, cmd-click launches a new tab and closes the notifications, and ctrl-click gives me the right-click menu (normal behavior). I restarted the server before testing and I don't see any db changes here. Is there something else I need to do to activate this? Red outline: confirmed working in Firefox. (Bug is apparently masked in Chrome.) |
I'm not available to test at the moment (I never have access to a Mac setup and I'm currently away from my Linux setup), so these questions are based solely on guesswork: Possible other fixDoes this also fix Stuck red border after reducing below maximum characters (asking because it is so closely related to the linked meta post, so might be worth testing)? Not a request to include it if not. Also I'm not sure if I understood a recent conversation that suggested one or other of them was already fixed or due to be, so this question might turn out to be irrelevant. Possible unintended Windows behaviourFrom a brief glance at the code, could it be that the code: if (ev.ctrlKey || ev.metaKey) { causes the shortcuts that previously worked on Windows/Linux with the ctrl key to now also work on Windows/Linux with the Windows key? Regardless of whether it's working correctly on a Mac, I'm guessing we don't want to override Windows key shortcuts for Windows/Linux users? Since I can't currently test I don't know if this is the case, but it seems like something we should check carefully on both those operating systems before proceeding. I don't know the correct way to handle this, but I'm guessing we either need to detect operating system rather than just detect either modifier button (so we only respond to one specific modifier button per operating system) or we need some way that the browser can do the interpretation for us (not hopeful about that and haven't looked into it). |
We can't, there is no reliable way of determining whether the user is on MacOS or not from JS (thankfully so), the best option is to use two keys that are specified to work this way.
Yup, it does (at least it should), and, IIRC, @cellio confirmed it should be working in this PR |
No, @cellio, it should work out of the box - I'll take a look |
Yes. I tested both linked meta cases on this branch in Firefox and saw red borders where they're supposed to be and not otherwise. |
I pulled this branch again (to test the red-outline thing for comments), and now I'm seeing cmd-click open a notification in a separate tab (Firefox and Chrome). It also marks the notification as read, but right-clicking to open in a new tab does not (never did). Which behavior do users of cmd-click/ctrl-click expect? I don't have a Windows machine to test ctrl-click on. |
I don't know which behaviour is expected, but the inconsistencies are probably best dealt with in a separate issue since they go beyond what is being changed here.
In addition to things like this not being picked up by the JavaScript code for users who have JavaScript, users with JavaScript disabled get no response when clicking on the new notification circle or the envelope icon, so they have no way to view the notifications unless they know the URL for the stand alone notifications page, and even once there they cannot mark notifications as read. Maybe things that don't yet result in a notification being marked as read could be added to a separate issue to make notifications available to users with JavaScript disabled, along with a way to mark notifications as read without JavaScript? |
I've added #1833. Feel free to add subtasks to that one that don't need to be addressed here. |
To be honest, those icons are there only because I failed to find a better way of separating read notifications from unread - suggestions welcome. Adding icons to the filter buttons sounds good to me, but let's see if someone can come up with a better approach |
Is the light blue background, like in the notifications pane, possible? And then that saves the icon "slot" for a control later. |
closes #1824
completes meta:293809 (hasn't been able to find an issue that corresponds to it)
Also finally moves our keyboard shortcuts manager from a global
_codidactKeyboard
variable to theQPixel
namespace (Keyboard
), as well as simplifies its initialization handling.+ fixes the inbox icon doing nothing for users with JavaScript disabled (it's now linked to the full inbox page);
+ allows inbox notifications (on the full page) to be filtered by status (all / read / unread), as well as ordered by "oldest first";
+ adds an icon indicating whether the notification is read or not (we don't have any currently):