Skip to content

Conversation

@RKBoss6
Copy link
Contributor

@RKBoss6 RKBoss6 commented Dec 2, 2025

Along with BangleApps #4078, changes the UI to feel cleaner and fixes bugs with how the favorites are displayed.

Description

As I was making a PR to improve favorites handling here, I noticed certain visual discrepancies and errors, such as a number above the 100s favorited often clipping past the icon and becoming less readable as a result, so I decided to somewhat modernise the interface to feel fresh, as well as fix layout bugs and errors.

It is up on my personal app loader, if anyone wants to take a look. It doesn't have this updated script to go along with it, so it won't have the pills and updated favorite buttons yet. To see those, look in the screenshots section. What's up right now on my app loader is what the main. app loader will look like after BangleApps #4078 is merged. Anyone is welcome to pop in, take a look, and share what you think!

This PR, along with BangleApps #4078:

  • Adds more rounded edges
  • Adds padding between app tiles
  • Rounds the search bar and borders
  • Moves the favorites count from inside the icon to beside it, for better readability
  • Adds an animation when you favorite/unfavorite an app to help the UI feel more fluid
  • Adds a pill-shaped background of the app buttons (favorite, install, open IDE, etc.)
  • Adds rounded corners and more padding to modals
  • Fixes alignment of device images in the select devices modal

This PR addresses the favorites count and buttons being displayed in a pill, along with the favorites count beside the icon, which can now animate.

This PR must be merged after BangleApps #4078 is merged, this handles js, while BangleApps #4078 handles the CSS, and is necessary to be merged later for a smooth change.

Screenshots

Before

Screenshot 2025-12-01 at 3 31 20 PM

After

Screenshot 2025-12-01 at 3 35 15 PM

Before

Screenshot 2025-12-01 at 3 33 01 PM

After

Screenshot 2025-12-01 at 3 33 34 PM

Favorites Animations

Screen.Recording.2025-12-01.at.3.36.54.PM.mov

@gfwilliams
Copy link
Member

Let's discuss on espruino/BangleApps#4078

@RKBoss6
Copy link
Contributor Author

RKBoss6 commented Dec 2, 2025

Alright, I'll convert this to a draft for now, and try to figure out if I can use my fork in the other PR

@RKBoss6 RKBoss6 marked this pull request as draft December 2, 2025 12:32
@RKBoss6 RKBoss6 marked this pull request as ready for review December 4, 2025 21:18
Copilot AI review requested due to automatic review settings December 4, 2025 21:18
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 modernizes the Bangle.js App Loader UI with visual improvements and fixes favorites handling bugs. It works in tandem with BangleApps #4078 which provides the accompanying CSS changes.

Key changes:

  • Refactored favorites display to show count beside the icon instead of inside it, preventing clipping issues
  • Added optimistic UI updates with animation for favoriting/unfavoriting apps
  • Restructured app tile HTML to use pill-shaped button containers
Comments suppressed due to low confidence (1)

js/index.js:505

  • Unused variable inDatabase.
  let inDatabase=SETTINGS.appsFavoritedThisSession.find(obj => obj.id === app.id);

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

js/index.js Outdated
if (button.classList && button.classList.contains("btn-favourite")) {
let favourite = SETTINGS.favourites.find(e => e == app.id);
changeAppFavourite(!favourite, app);
changeAppFavourite(!favourite, app, false);
Copy link
Member

Choose a reason for hiding this comment

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

This seems like an exact copy of what's on line 866 - is that right? If so maybe you could pull it out into a function to remove code duplication?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just consolidated it into one handleAppFavorites function. For consistency, would it be preferable if I make 'favorite' 'favourite' to match the existing spelling of things, or does it not matter that much?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Alright, I've just done it anyway, it will allow for easier debugging and more consistency in the future...

Refactor favorite handling into a separate function for better code organization and reusability.
@gfwilliams
Copy link
Member

Thanks! Sorry - one more - please can you change the indentation in handleFavotriteClick so we don't have all those lint warnings? https://github.com/espruino/EspruinoAppLoaderCore/pull/82/files

@RKBoss6
Copy link
Contributor Author

RKBoss6 commented Dec 8, 2025

Should be fixed now!

@gfwilliams
Copy link
Member

That's great, thanks! just merging

@gfwilliams gfwilliams merged commit 1a23f49 into espruino:master Dec 9, 2025
1 check passed
@RKBoss6 RKBoss6 deleted the uiChanges branch December 9, 2025 12:22
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.

2 participants