-
-
Notifications
You must be signed in to change notification settings - Fork 823
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
Show badge with unread counter #90
Comments
@brunolemos how about Menubar mode badge in the status bar? |
Menubar badge would be 💯. I've been using Gitify for a long time, and it changes the color when there's unread notifications, which works great. But knowing the number too somehow would be icing on that cake. |
I might actually take a stab at implementing that. I'm familiar with the react-native-web architecture, but not the specifics of this project. Is this the right place for that change? Also, for the number, the only way I can think to do it is to have different images for each number. Maybe created dynamically as discussed here: electron/electron#7322 |
@dkniffin yes that would be the file! I think the hardest part will be that each column needs to have a config to enable or disable the badge (and I haven't created a UI for that or thought about config object structure yet); but we can think of a simpler solution to start. I recently created a method called devhub/packages/components/src/components/columns/ColumnOptions.tsx Lines 525 to 533 in e096f47
The code above shows the number Also needs to think where is the best place to put a watcher for these unread numbers. Probably a react Context. And then, send the info to electron using the |
@dkniffin are you going to just work on the icon badge counter? if so, I can have a go at the "unread dot" on sidebar items (kind of like Slack and Discord) |
@johnletey Yeah, if I do anything on here, it would be the menubar indicator |
@dkniffin Wonderful ... I will get started on the "unread dot" feature now! |
@brunolemos I'm trying to get the menubar/tray indicator working. I know how to render it, but I'm having a hard time figuring out how to get the data needed to determine which state to render it in. You mentioned |
@dkniffin the Check the file I think we need a React Context, e.g. To send messages to Electron, first check that it is an electron app ( You need to listen to this |
Ok, thanks. That makes sense. I'll give that a shot |
You can use this to get all the columns:
And then for each column you do something like this to get the unread count for each one: devhub/packages/components/src/components/layout/Sidebar.tsx Lines 614 to 635 in 838840a
|
@brunolemos These context objects are unfamiliar to me. Are these the same as React Contexts or is this a different thing? |
@dkniffin yes, normal React Context, like this: https://github.com/devhubapp/devhub/blob/master/packages/components/src/components/context/ColumnWidthContext.tsx That is initiated at the App.tsx file: https://github.com/devhubapp/devhub/blob/master/packages/components/src/components/App.tsx |
@brunolemos Sorry I keep pestering you with questions about this. I think I've got the context set up correctly, and I understand how to pass the event over to electron, but the piece I'm missing is where to actually do that passing. Does that belong in |
Hm you can do it directly inside the context provider for now, or create a new file (e.g. |
While we dont have an option to specify which columns we wanna enable. #90
This is now available on v0.93.0! For web and desktop. |
To show an unread badge on mobile there are two possible ways:
N2 would provide a better UX but not sure if it's feasible, github would block the server for spamming/ddos. Help wanted on N1 for now! |
Help wanted
The text was updated successfully, but these errors were encountered: