Skip to content

Home rows, YouTube-style song page, top bar search and player fixes - #92

Merged
LingFeng-bbben merged 52 commits into
mainfrom
feat/home-song-page-redesign
Nov 22, 2026
Merged

LingFeng-bbben merged 52 commits into
mainfrom
feat/home-song-page-redesign

Conversation

@anqtal

@anqtal anqtal commented Nov 22, 2026 •

Copy link
Copy Markdown
Member

Follow-up to #91 (squash-merged partway through this work). Contains everything on the branch since then.

Home page

  • Rows in order: personal picks (logged-in only), recently active (with View all → search page), recent uploads, the four 7-day rankings (plays, rating, comments, downloads) as separate rows, collections.
  • The old all-charts / recommendation tabs with sort menu and pagination are replaced by rows; recommendation impressions are still reported.
  • Collections use playlist-style tiles (large cover, stacked layers, chart count) in the same row layout as charts; rows share TileRow.
  • Prev/next buttons removed (rows scroll natively on touch, drag/scroll on desktop); first collection no longer starts misaligned after returning to the home page.

Song page

  • Phones: player flush under the top bar at full width; tabs are overview / comments / leaderboard / chart file; action row cannot widen the page on narrow phones.
  • Desktop: the player is a full-width 5:3 rectangle, aligned with the vote/download/collect/share row and tags directly below it; difficulty is a vertical list at the top of the sidebar; comments only show under the preview tab; tighter top spacing; sidebar section renamed to chart info.
  • Radar has less empty space; ID/HASH sit right under the play count.
  • The collection heart is now Subscribe everywhere, with the same toast (mentions MajPlay).

Player

  • System media controls (lock screen / Control Center / notification): title, artist, cover, position, play/pause, seek, ±10s. Scrubbing confirmed on iPhone.
  • Recovers on iOS after backgrounding even when the AudioContext still reports running.
  • Hit sounds: notes a few ms apart no longer cut each other off; EX/break hold tails play the judge sound like Play.
  • Fullscreen: bottom counters sit above the control bar; on touch, a tap toggles the controls. Larger counters on wide desktop players.

Header and search

  • Desktop top bar has a permanent search box with suggestions; phones get a search button that opens the search over the top bar.
  • Phone top bar buttons share one 40px style.
  • Suggestions redesigned (field chips, two-line operator hints); the search page drops its visible results heading.
  • Toasts keep the rounded style on phones; the logo easter egg toasts stack and start below the top bar.

Checks

Typecheck, lint, i18n check and 322 unit tests pass. Layouts were checked in the browser at phone and desktop sizes. Not verified on a real device: tap-to-toggle fullscreen controls, and the signed-in avatar in the phone top bar.

🤖 Generated with Claude Code

anqtal and others added 30 commits November 22, 2026 21:24
react-toastify's <=480px rules set border-radius: 0, a 100vw container and pin it to the screen edge, which beat our variable-based radius. Override them so phones get the same pill, inset from the bottom/top edges and safe areas.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
It closed after 500ms, right after its enter animation, so taps on phones looked like they did nothing. Show it for 1.5s and reuse one toast id so repeated taps restart it instead of stacking.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ds too

Play's HoldDrop.End() always plays a plain tap judge (IsBreak/IsEX = false) when a hold ends; MajView only did this for plain holds, so EX and break hold tails were silent.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…few ms apart

Merging same-frame sound requests extended the kept event's length to the later note, which turned one-shot sounds (length 0 = play to the end) into ~11ms clips that were stopped almost immediately. Only sustained sounds (the touch hold riser) get their length extended now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On phones the preview player sits flush under the top bar, full width with square corners, and stays pinned there while playing. Below it come the title and actions, then tabs for overview (the sidebar's chart details), comments, chart file and scores; switching tabs never hides the player. Desktop is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The player now scrolls away with the page like the rest of the content; drop the playing-state callback that only existed for pinning.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The tab bar's own mb-6 stacked with the mobile column gap, leaving 40px before the tab content; drop the margin so only the 1rem gap remains.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… running

After Safari comes back from the background, a context that has played can report state 'running' while its clock never advances, so the previous state-based check never fired and play/seek/restart stayed dead until reload. Now any backgrounding marks the context, and the next tap on play always swaps in a fresh one (reusing decoded audio); on return, if the clock does not move within 0.5s while playing, the UI drops back to paused.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On phones the compact vote control joins the header action row and the sidebar vote panel is hidden; desktop keeps the panel in the sidebar.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The viewBox reserved room for the maximum score of 200 on the vertical axes, leaving large blank bands for typical charts. Reserve about 166 instead; higher scores still draw thanks to overflow-visible.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e it

Pass size md through ChartVoteBadge so the like/dislike control is a 36px bordered pill, aligned with download/collect/share.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Report title, artist, cover, play state and position through the Media Session API and handle play, pause, seek and ±10s skip from the lock screen / Control Center / notification. Because Web Audio alone does not count as playing media, a silent looping <audio> runs alongside playback (first started inside the play tap).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ow scrubbing

iOS takes the Now Playing position and scrubber from the playing <audio> element, not from setPositionState, so the 1s silent loop showed 0:00 when paused and could not be dragged. Use a silent track as long as the chart and keep its position, rate and play state aligned with the preview.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…he home page

With cached data Swiper was created before the shadow bleed was measured; it updates slidesOffsetBefore but keeps the old translate, so the row started 60px left of the content column. Remount it when the bleed changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every row can be swiped, dragged or scrolled sideways now, so the step buttons and their slide logic are gone, along with the unused Previous/Next strings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The vote pill plus three buttons were wider than narrow phones, which stretched the whole page so the browser zoomed out, cutting off the left edge and pushing Share off screen. Tighten button padding and gaps so the row fits at 375px, and let it scroll sideways on narrower screens instead of overflowing the page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The row now always shows the top 10 by plays over the last 7 days, with a one-line hint instead of the four sort switches; the unused sort strings are removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…media session hook

The 4kHz 8-bit silent WAV may not play on iOS, which leaves Web Audio (no duration) as Now Playing and greys out the scrubber; use 8kHz 16-bit PCM. The silent track now also takes the real length as soon as it is known instead of keeping a 10-minute placeholder until the next tap. Drop the leftover try/catch wrappers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Instead of one row with four sort tabs (or only the plays ranking), the home page now has four rows: most played, top rated, most discussed and most downloaded over the last 7 days.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The paged list under the home rows (all charts with sort menu / personal recommendations) becomes two rows like the ones above: Recently active, with View all linking to the empty search page, and Personal picks, shown only when logged in. Recommendation impressions are still reported, now from the row tiles. Legacy /?search= links still redirect to the search page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
In native-scroll mode the wrapper clips vertically, and its old 16/40px allowance was smaller than the 60px shadow, leaving a visible edge; the negative margins also never applied because the global unlayered ul { margin: 0 } beat the utilities. Give 64px above and below with important negative margins, and make the container and wrapper ignore pointer events (cards stay interactive) so the bleed area does not block the header link or the next row.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The heart on collection cards and the Subscribe button on the collection page hit the same favorites API under two names. Cards now use the same bell/check icon, labels and toasts as the page button, and subscribing says the collection will show up in MajPlay after signing in.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… as charts

The collections row now uses the same large-cover tiles and row as the chart rows, with a YouTube-style stack above the cover, the chart count in the corner and a subscribe button on the cover. The row layout is shared through TileRow, and the shadow-bleed workarounds for the old wide cards are gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… uploads

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The iPhone Now Playing scrubber was draggable with 3bfa7fe and greyed out after e443ac2 (8kHz 16-bit WAV, length-update effect, dropped try/catch). Go back to the version that worked on device until the cause is pinned down.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The like/dislike control and Download/Collect/Share now sit directly below the preview player on desktop (in the preview tab), replacing the header buttons and the sidebar vote panel. Phones keep them under the title, which is already below the player.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The player was a centered square narrower than the content column, so the action row and comments below did not line up with it. On desktop it now spans the column at 5:3 (capped at 84% of the viewport height), with the board centered over the blurred cover; phones keep their own sizing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
anqtal and others added 22 commits November 22, 2026 23:22
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ertical list

On desktop the difficulty switcher leaves the header and becomes a vertical list (name left, level right) at the top of the sidebar; phones keep the horizontal segmented tabs in the header.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Tags (author and player tags plus Manage tags) leave the sidebar and sit directly below the vote/download/collect/share row: under the player on desktop, under the buttons in the header on phones.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ol bar

In fullscreen the controls overlay the bottom of the screen and covered the Tap/Hold/Slide/Touch/Break counter; lift it above the bar.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The rectangular desktop player leaves about 200px beside the board, so the counters go from 12px to 15px; windows under 64rem keep the old size.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The search box already shows the query, so the "<query> results" heading is gone (kept as a screen-reader-only page title) along with the blank space above it and the unused ResultsFor string.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…screens

In fullscreen a single tap on the board now toggles the control bar (after the double-tap window, so a double tap still only plays/pauses); touches no longer re-show the bar on every pointerdown, while mouse movement and taps on the bar itself keep it alive as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The button opens the same SearchBox (with suggestions) as the home and search pages just under the top bar; Enter or picking a suggestion goes to the search page, and clicking outside, Escape or navigating closes it. It sits next to the menu button on phones so it does not crowd the centered logo.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The search box now takes over the whole top bar row (same height and opaque background) with a close button, instead of floating translucently over the page under the bar, which looked bad on phones.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Search and language were borderless, the account button was 38px wide and the signed-in avatar was a bare circle. On phones they now all match the menu button (40x40 rounded box, same border and background, 18px icons, avatar 28px inside), with the same 6px spacing on both sides. Desktop keeps its styles.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On desktop the search no longer covers the whole top bar: a 36px input opens just left of the search button and the rest of the bar stays visible; the button closes it again. Phones keep the full-bar search.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Icons sit in small tinted squares, the matched field (title, artist, designer, uploader, tag) is a small chip instead of faint right-aligned text that often got cut off, and operator hints show the operator over a full-width description line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Desktop now shows the search input (with suggestions) in the top bar at all times instead of behind a button; phones keep the search button that takes over the bar. The leftward expand animation is no longer needed and is removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…vider

Top bar to title drops from 31px to 15px and the header divider to tabs/sidebar from 20px to 12px; the phone layout keeps its own spacing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… top bar

Repeated taps now stack a toast each again (the fixed toast id only restarted one), and top-centre toasts open below the fixed top bar instead of covering it, on phones and desktop alike.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ficulty

Rename 谱面资料 / Chart details to 谱面信息 / Chart info (ja/ko already said info) and draw the same divider between the difficulty list and the info block as between the other sidebar sections.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The action row stretched every item, so the vote group's border grew while its two buttons did not, leaving a gap beside the highlighted downvote. Only the three action buttons share the spare width now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@LingFeng-bbben
LingFeng-bbben merged commit 4c16d0b into main Nov 22, 2026
2 checks passed
@LingFeng-bbben
LingFeng-bbben deleted the feat/home-song-page-redesign branch November 22, 2026 12:51
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