Skip to content

Add dropdowns instead of chips#87

Open
RKBoss6 wants to merge 8 commits intoespruino:masterfrom
RKBoss6:master
Open

Add dropdowns instead of chips#87
RKBoss6 wants to merge 8 commits intoespruino:masterfrom
RKBoss6:master

Conversation

@RKBoss6
Copy link
Contributor

@RKBoss6 RKBoss6 commented Feb 3, 2026

Adds dropdowns instead of chips as per BangleApps #4150. Also adds a new sort method, 'explore', which is a random shuffle so users can explore new apps that are otherwise buried beneath more installed apps. The PR also implements dropdown menu aligning, so if it goes over the edge, it aligns to the other side instead for seamless UX

RKBoss6 and others added 2 commits January 22, 2026 17:45
Added shuffling of apps in 'Explore' mode when not sorted by relevance.
@gfwilliams
Copy link
Member

Thanks - is the available for testing somewhere?

Please can you sort out the lint warnings? The padding, but also chips in chips.indexOf(searchValue) not being defined doesn't seem great.

Can you rename explore to random as well? I think many users would assume that Explore was something more complex than random ordering, and we'll likely get complaints when just clicking Install/Update/etc on an app will cause the list to be updated and will re-order everything.

I'm also a little concerned about the autoAlignMenu function - are you sure we can't just achieve what we need to using bare CSS? We've managed to make it this far without needing anything, and every time I've used JS for alignment it's usually come back to haunt me at some point.

@RKBoss6
Copy link
Contributor Author

RKBoss6 commented Feb 3, 2026

Hi! This is available for testing on my app loader. As for auto align, I tried looking in a bunch of places to see about it, and there's just no way we can get something like that in pure css that works in all platforms. The align feature reacts to resizing the webpage, and has worked really well for all the times I've tested it, so I think it'll be fine. It's a good point about the explore option, I can change that!

Copilot AI review requested due to automatic review settings February 4, 2026 17:38
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

Updates the app loader library UI to use dropdown menus (instead of chip controls) for filtering/sorting, adds a new “explore”/randomized sorting mode, and introduces automatic dropdown menu alignment to avoid viewport overflow.

Changes:

  • Switch filter/sort UI logic from chip-based selection to dropdown-based selection (anchors/menu items).
  • Add a random shuffle sort mode for “Explore” browsing.
  • Auto-align dropdown menus to the left/right depending on available viewport space.

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

js/index.js Outdated
Comment on lines 675 to 676
sortToggle.innerHTML = '';
sortToggle.innerHTML += '<svg class="inline-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="size-6"><path fill-rule="evenodd" d="M6.97 2.47a.75.75 0 0 1 1.06 0l4.5 4.5a.75.75 0 0 1-1.06 1.06L8.25 4.81V16.5a.75.75 0 0 1-1.5 0V4.81L3.53 8.03a.75.75 0 0 1-1.06-1.06l4.5-4.5Zm9.53 4.28a.75.75 0 0 1 .75.75v11.69l3.22-3.22a.75.75 0 1 1 1.06 1.06l-4.5 4.5a.75.75 0 0 1-1.06 0l-4.5-4.5a.75.75 0 1 1 1.06-1.06l3.22 3.22V7.5a.75.75 0 0 1 .75-.75Z" clip-rule="evenodd" /></svg>';
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

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

The injected SVG markup has duplicate class attributes (class="inline-icon" and class="size-6"). Duplicate attributes are invalid HTML and typically cause one of the class values to be dropped, which can break styling. Combine these into a single class attribute.

Copilot uses AI. Check for mistakes.
js/index.js Outdated
Comment on lines 746 to 748
filterToggle.innerHTML = '';
filterToggle.innerHTML += '<svg class="inline-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="size-6"><path fill-rule="evenodd" d="M3.792 2.938A49.069 49.069 0 0 1 12 2.25c2.797 0 5.54.236 8.209.688a1.857 1.857 0 0 1 1.541 1.836v1.044a3 3 0 0 1-.879 2.121l-6.182 6.182a1.5 1.5 0 0 0-.439 1.061v2.927a3 3 0 0 1-1.658 2.684l-1.757.878A.75.75 0 0 1 9.75 21v-5.818a1.5 1.5 0 0 0-.44-1.06L3.13 7.938a3 3 0 0 1-.879-2.121V4.774c0-.897.64-1.683 1.542-1.836Z" clip-rule="evenodd" /></svg>';
filterToggle.innerHTML += activeFilterAnchor.textContent;
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

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

The injected SVG markup has duplicate class attributes (class="inline-icon" and class="size-6"). Duplicate attributes are invalid HTML and typically cause one of the class values to be dropped, which can break styling. Combine these into a single class attribute.

Copilot uses AI. Check for mistakes.
RKBoss6 and others added 2 commits February 4, 2026 12:54
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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