Skip to content

Conversation

@RKBoss6
Copy link
Contributor

@RKBoss6 RKBoss6 commented Dec 31, 2025

This just increases match compatibility even if an app sets the src to be 'Slack*'. This is made to fix the issue at PR #4108

Also updated the generate.js file, as I only added colors for the previous icons I added to the lib.js in #4105
I also added more documentation and warning to help others not make this mistake

RKBoss6 and others added 6 commits December 31, 2025 18:00
Added warning about modifying Lib.js file to README.
Screen for special characters at the end of an app name and remove them for better matching.
Clarify instructions regarding icon generation and character removal.
Copilot AI review requested due to automatic review settings December 31, 2025 23:13
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR enhances the message icons library to handle special characters in app names (e.g., Slack*Slack) and addresses missing color definitions from a previous PR. The changes improve icon matching compatibility when apps are marked with special characters.

Key Changes:

  • Adds regex-based special character screening at the end of app names (*!?.-_ and whitespaces)
  • Backfills missing color definitions for recently added icons (adp, duolingo, roborock, shortcuts)
  • Improves documentation and warnings to prevent future mistakes with manual lib.js modifications

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
apps/messageicons/metadata.json Version bump from 0.13 to 0.14
apps/messageicons/lib.js Adds special character trimming logic and alphabetizes color definitions
apps/messageicons/icons/generate.js Updates generator to produce the new special character trimming code and includes missing color definitions
apps/messageicons/README.md Adds documentation about special character handling and strengthens warnings about not modifying lib.js
apps/messageicons/ChangeLog Documents the new special character screening feature in version 0.14

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Collaborator

@bobrippling bobrippling left a comment

Choose a reason for hiding this comment

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

Shall let @gfwilliams do the main review as it's a core app, but a few things I noticed :)

RKBoss6 and others added 2 commits January 2, 2026 12:13
Co-authored-by: Rob Pilling <[email protected]>
Co-authored-by: Copilot <[email protected]>
@gfwilliams
Copy link
Member

Thanks, although IMO I don't think we should be trying to filter out special chars. For instance by filtering out - you've now stopped corona-warn and f-droid from working, and by stripping whitespace you've stopped all the apps with spaces in the description from working.

... given the only reason for this is for filtering out the* which #4108 adds, and I'm not too fond of that, I think we should just not put the star in.

If you wanted to strip out that code and keep the colour changes that'd be good though.

@RKBoss6
Copy link
Contributor Author

RKBoss6 commented Jan 5, 2026

Could we only strip end characters that are special instead?

@gfwilliams
Copy link
Member

I just think it's a slippery slope - the messageicons lib should really just take app name (ideally more of an ID) and return an icon, not try and perform other functions.

I don't really get why you wanted the * shown anyway - most apps will be fine, and those that aren't, someone will complain and we'll have to add an exception - but the * won't really make a difference to them apart from being a slight annoyance in the case that it had guessed correctly

@RKBoss6
Copy link
Contributor Author

RKBoss6 commented Jan 7, 2026

Ok, just updated this to only change the icon color bug fixes, and added a new health icon. I removed the character filtering. I think this can be merged, although I still want to do some testing to #4108 before we merge that too.

@gfwilliams
Copy link
Member

Thanks! Looks great!

@gfwilliams gfwilliams merged commit 484bec2 into espruino:master Jan 8, 2026
1 check passed
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.

3 participants