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

Replace favico.js with our simpler solution #100

Merged
merged 1 commit into from
Feb 29, 2016
Merged

Replace favico.js with our simpler solution #100

merged 1 commit into from
Feb 29, 2016

Conversation

xPaw
Copy link
Member

@xPaw xPaw commented Feb 24, 2016

This gives us greater control over the notification favicon (as it's separate image, we can do whatever we want with it), and removes a 800 line library.

This also makes favicon badges work in Chrome.

@@ -16,8 +16,7 @@
<link rel="stylesheet" href="css/style.css">
<link id="theme" rel="stylesheet" href="<%= theme %>">

<link rel="shortcut icon" href="img/favicon.png">
<link rel="icon" sizes="192x192" href="img/touch-icon-192x192.png">
Copy link
Member Author

Choose a reason for hiding this comment

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

This separate icon had to be removed because Chrome has some bizzare logic for selecting icons, and if you update the wrong icon, the notification badge won't be shown at all.

@astorije
Copy link
Member

@xPaw, the icon will be changed only when highlighted somewhere or someone talks to you in PM, correct? If so, could you make it red to match the highlight color? :)

@astorije astorije added Type: Bug Issues that report and PRs that solve any defects that cause unexpected behaviors. Type: Feature Tickets that describe a desired feature or PRs that add them to the project. labels Feb 25, 2016
@xPaw
Copy link
Member Author

xPaw commented Feb 25, 2016

@astorije I'm not a designer, so it was hard enough to get this color 😁 If someone can help, that would be nice.

@maxpoulin64
Copy link
Member

Looks good to me, tested on Chrome, Firefox and Chrome on Android with no side effect (apart that this one actually works). 👍

Otherwise, agreed with @astorije, it could be nice to have it red, maybe even bright red for visibility.

Thinking something like that: (I'm also terrible at colors)

favicon-no-bg
favicon-red

@xPaw
Copy link
Member Author

xPaw commented Feb 25, 2016

Yeah, brighter red would be much nicer.

@maxpoulin64
Copy link
Member

Like that?

favicon-red-2

@xPaw
Copy link
Member Author

xPaw commented Feb 25, 2016

That looks better, yes.

@astorije
Copy link
Member

@xPaw, can you integrate @maxpoulin64's version in the PR?

@xPaw
Copy link
Member Author

xPaw commented Feb 26, 2016

I will when I when I rebase next time. For now, tell me if there's anything needed to be changed.

@xPaw
Copy link
Member Author

xPaw commented Feb 27, 2016

Rebased with red icon.

@astorije
Copy link
Member

Works great on PMs and highlights, love it! Also, good job on getting rid of that library!!

A couple thoughts though:

  • No effect when being /invited, though it would be great to get notified!
  • As a user, I would expect the red favicon to disappear as soon as I enter the tab, not when I actually read the messages. So in a nutshell, red favicon means something happens off-focus, and goes back to blue when as soon as the tab/window is being focused. One nice side-effect of this is that the favicon never goes red if the window is in focus and the user gets notified. Does that make sense? Would that be easy to achieve?

@astorije astorije assigned maxpoulin64 and astorije and unassigned maxpoulin64 Feb 28, 2016
@xPaw
Copy link
Member Author

xPaw commented Feb 28, 2016

No effect when being /invited, though it would be great to get notified!

As simple as setting highlight to true in invite messages I believe.
EDIT: As it turns out, it produced completely broken notification in the browser.

As a user, I would expect the red favicon to disappear as soon as I enter the tab, not when I actually read the messages.

This changes the behaviour and I'm not sure it's for this PR.

@astorije
Copy link
Member

As simple as setting highlight to true in invite messages I believe.
EDIT: As it turns out, it produced completely broken notification in the browser.

Yep, noticed that too. Will try to fix that now.

This changes the behaviour and I'm not sure it's for this PR.

Agreed, although it would be really nice if we could improve that behavior soon :-)

👍 and merging!

astorije added a commit that referenced this pull request Feb 29, 2016
Replace favico.js with our simpler solution
@astorije astorije merged commit 8c3322b into thelounge:master Feb 29, 2016
@astorije
Copy link
Member

As simple as setting highlight to true in invite messages I believe.
EDIT: As it turns out, it produced completely broken notification in the browser.

Yep, noticed that too. Will try to fix that now.

Done in #127.

@xPaw xPaw deleted the favicon branch March 7, 2016 17:17
@astorije astorije added this to the 1.3.0 milestone Apr 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issues that report and PRs that solve any defects that cause unexpected behaviors. Type: Feature Tickets that describe a desired feature or PRs that add them to the project.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants