Repository navigation
Replace native select with custom sort menu component - #10
Merged
Merged
Conversation
Cards: every card now has the same four rows (artwork, one-line title, tags, track count and duration). The description is gone from the card; it is still in the dialog and still searchable. A title can carry several trailing "(…)" brackets, each its own tag, so records now have `tags` instead of `tag`; filtering, search and the tag chips follow, and the browser cache key moves to v2 (v1 entries are removed). Dialog: it has a set height and the layout fills it, so TIDAL's player always ends inside the padding. The artwork, details and actions scroll in their own column beside it, with the actions above the description. Sorting: Created, Updated or Title, each reversible. A menu lists the sort fields, a line, then the direction, worded to suit the field (Newest first / Oldest first, A–Z / Z–A). The button shows the current direction. The URL gains ?order=; old ?sort=newest and ?sort=az links still work. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q1hM7kWipKSvW8y4JtxKbH
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces the native HTML
<select>element for sorting with a custom, accessible dropdown menu built from radio buttons. This enables more sophisticated sorting options and improved UX while maintaining full keyboard and screen reader support.Key Changes
Sorting Logic
filter.js: Each sort now specifies its natural direction (asc/desc), value extractor, and comparison function, replacing simple comparator functionsorderparameter (asc/desc) toapplyView(), allowing users to reverse any sort directionnewest,updated,az) to 3 with explicit directions (created,updated,title)parseSort()andparseOrder()functions handle legacy URL parameters and validationUI Components
New sort menu component (
sort-menu.js): Custom dropdown built from fieldsets of radio buttons with:Updated HTML structure (
views/index.ejs): Replaced<select>with button + hidden menu containing radio button groupsComprehensive styling (
app.css):.sort-button: Toggle button with sort glyph and chevron.sort-menu: Positioned dropdown with frosted glass effect.sort-option: Radio button styled as clickable rows with checkmark indicatorsData Model Changes
Tags restructured: Changed from single
tagfield totagsarray throughout:parseTitle()now extracts multiple trailing parenthetical tagssearchText()includes all tagspopularTags()counts each playlist once per tag (case-insensitive)Cache versioning: Bumped from
v1tov2due to data structure changesGrid & Dialog Updates
margin-top: autofor consistent alignmentTesting
tags: []array formatImplementation Details
hiddenattribute with CSS transitions for smooth open/closeparseSort()translationhttps://claude.ai/code/session_01Q1hM7kWipKSvW8y4JtxKbH