Skip to content
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

Added number badge on top the tab icon to show the number of active conversations #421

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

arjenrschat
Copy link

Description

Improved logo.svg
- fixes to render correctly in firefox
- correct size
- the icon is aligned to a 2x2 grid to render crisp on retina
- has update colours that work on light and dark mode
Added: Show number of active conversations on top of the badge icon

Screenshots

image

	- fixes to render correctly in firefox
	- correct size
	- the icon is aligned to a 2x2 grid to render crisp on retina
	- has update colours that work on light and dark mode
Added: Show number of active conversations on top of the badge icon
Copy link
Collaborator

@reichert621 reichert621 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey @arjenrschat! thanks for sharing this, we'll definitely play around with it and see if it looks good to merge :)

a couple things:

  • was most of the code copy/pasted from somewhere? if so, can you share the link?
  • how many numbers does this support? i.e. if there are 99 messages, will it show "99" in the icon badge?
  • is there a way we can make the number fit in the red circle more nicely?

@arjenrschat
Copy link
Author

@reichert621

The code is written by me.
It supports 1-9 messages, if the number is higher a + is shown
The font is hand drawn based on old school bitmap font on a 4x7 grid
image
I agree the alignment can be improved. Unfortunately the available space is limited because the number badge can only be show in the same area as the icon. And I did not want to change the paper cups logo too much.

Compared to slack, they use just a quarter circle to indicate a new message

image

Options:
Use a larger font 5x7 or 5x9 font for better readability or a font that is available on most platforms to render the text.
Larger red badge for better alignment options

@reichert621
Copy link
Collaborator

got it! maybe we can start off simple with something like Slack, and just show a red dot when there are unread messages... I think that will look nicer for the time being

@arjenrschat
Copy link
Author

The number is removed from the badge

@reichert621
Copy link
Collaborator

thanks @arjenrschat -- can you share a screenshot of how the latest code looks in both light and dark mode?

Arjen Schat added 2 commits December 2, 2020 09:42
	Added data-react-helmet property to the link, this forces Helmet to override the existing icon
Removed Canvas rendering
Added logo with unread badge
@arjenrschat
Copy link
Author

Here you go.

Old vs new in dark mode
image
image

Light theme
image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants