Skip to content

chore: change favicon from ess to generic - #1550

Merged
yoganandaness merged 5 commits into
developfrom
copilot/make-favicon-dynamic
Jun 4, 2026
Merged

chore: change favicon from ess to generic#1550
yoganandaness merged 5 commits into
developfrom
copilot/make-favicon-dynamic

Conversation

Copilot AI commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Description

Updated the favicon file (favicon.ico) with new content. Facilities who would require to use their own logo as a favicon can replace the favicon.ico with the respective logo during build time.

Motivation and Context

Ensures the public favicon file is up-to-date.

How Has This Been Tested

  • Favicon displays correctly in browser tabs
  • No console errors or warnings related to favicon loading

Fixes

N/A

Changes

  • apps/frontend/public/favicon.ico: Updated binary content
  • apps/frontend/public/manifest.json: Updated "name" property to "Users' Office"

Depends on

N/A

Tests included/Docs Updated?

  • I have added tests to cover my changes.
  • All relevant doc has been updated

Add FAVICON_FILENAME setting that allows each deployment to configure
its own favicon, similar to HEADER_LOGO_FILENAME for the logo.

- Add FAVICON_FILENAME to SettingsId enum
- Add database migration (0212) to create the setting
- Add DynamicFavicon component that updates the favicon from settings
- Configure ESS and STFC environments with their favicon filenames
- Move favicon files to /public/images/ for consistency
- Update index.html and manifest.json references
Copilot AI changed the title feat: make favicon dynamic via settings (like the logo) Make favicon dynamic via settings, matching the logo pattern Jun 1, 2026
Copilot AI requested a review from yoganandaness June 1, 2026 12:21
@zacharyjhankin

zacharyjhankin commented Jun 1, 2026

Copy link
Copy Markdown
Collaborator

Seems like the wrong favicon flashes on the screen before its loading. If we remove it from the manifest and index.html would it let the browsers cache the correct one to show up? I am having a hard time testing because it feels like my browser remembers the wrong one when it shouldn't,

link.type = 'image/x-icon';
link.rel = 'shortcut icon';
link.href = '/images/' + faviconFilename;
document.getElementsByTagName('head')[0].appendChild(link);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Wouldn't 100% of the time the link[rel*='icon'] be found and then you're adding a second one here: appendChild(link);

because its here:

<link rel="shortcut icon" href="/images/ess-favicon.ico" />

@zacharyjhankin zacharyjhankin Jun 1, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I do appear to be wrong and there isn't two of them in the HEAD. Because link acts as a pointer

document.querySelector("link[rel*='icon']") ||
document.createElement('link');
link.type = 'image/x-icon';
link.rel = 'shortcut icon';

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

new version is just "icon"

@zacharyjhankin

Copy link
Copy Markdown
Collaborator

Can we have an image in the default too settings as well

DO
$$
BEGIN
IF register_patch('AddFaviconFilenameSetting.sql', 'yoganandaness', 'Add favicon filename to settings', '2026-06-01') THEN

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

shouldn't that say copilot???

@yoganandaness
yoganandaness force-pushed the copilot/make-favicon-dynamic branch 3 times, most recently from d2abfc1 to 7a0102a Compare June 2, 2026 14:51
@yoganandaness
yoganandaness force-pushed the copilot/make-favicon-dynamic branch from 7a0102a to 9ea589c Compare June 2, 2026 14:53
@yoganandaness
yoganandaness marked this pull request as ready for review June 2, 2026 14:56
@yoganandaness
yoganandaness requested a review from a team as a code owner June 2, 2026 14:56
@yoganandaness
yoganandaness requested review from Bhaswati1148 and removed request for a team June 2, 2026 14:56
@yoganandaness
yoganandaness requested review from TCMeldrum, bolmsten and zacharyjhankin and removed request for yoganandaness June 2, 2026 14:56
@yoganandaness

Copy link
Copy Markdown
Contributor

@zacharyjhankin Reverting the old changes and here is the new approach. Requesting for review again.

@zacharyjhankin

zacharyjhankin commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator

lgtm,

Though to be honest the copilot PR was good too? Did the AI do it all by itself?

image

@zacharyjhankin

Copy link
Copy Markdown
Collaborator

The title should be make the favicon generic

@yoganandaness yoganandaness changed the title Make favicon dynamic via settings, matching the logo pattern chore: make favicon dynamic via settings and matching the logo pattern Jun 4, 2026
@yoganandaness yoganandaness changed the title chore: make favicon dynamic via settings and matching the logo pattern chore: change favicon from ess to generic Jun 4, 2026

@enthusiastio enthusiastio left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍

@jekabs-karklins jekabs-karklins left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good

@yoganandaness
yoganandaness enabled auto-merge (squash) June 4, 2026 10:46
@yoganandaness
yoganandaness merged commit 71db3b6 into develop Jun 4, 2026
22 checks passed
@yoganandaness
yoganandaness deleted the copilot/make-favicon-dynamic branch June 4, 2026 11:34
Copilot AI added a commit that referenced this pull request Jun 4, 2026
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.

5 participants