Skip to content

fix: make vite example channel selection bookmarkable#2997

Open
oliverlaz wants to merge 1 commit intomasterfrom
fix/vite-bookmarkable-channel
Open

fix: make vite example channel selection bookmarkable#2997
oliverlaz wants to merge 1 commit intomasterfrom
fix/vite-bookmarkable-channel

Conversation

@oliverlaz
Copy link
Member

@oliverlaz oliverlaz commented Mar 10, 2026

🎯 Goal

Make the Vite example channel selection bookmarkable and shareable by syncing the active channel with the URL.

🛠 Implementation details

  • Read a channel query param in the Vite example and pass it to ChannelList.customActiveChannel.
  • Sync the active channel back into the URL with history.replaceState while preserving existing params like token and user_id.
  • Fall back to the first channel when customActiveChannel is missing or invalid.
  • Add coverage for the customActiveChannel fallback behavior.
  • Add the shared matchMedia Jest polyfill and missing React imports needed for the exercised test path.

🎨 UI Changes

N/A. This changes URL state only.

@github-actions
Copy link

Size Change: +1 B (0%)

Total Size: 428 kB

Filename Size Change
./dist/cjs/index.js 214 kB +1 B (0%)
ℹ️ View Unchanged
Filename Size
./dist/audioProcessing-BbOs2wMd.js 1.32 kB
./dist/Channel-iBbX1_YS.js 20.2 kB
./dist/ChannelPreview-CXRaPTt0.js 13.6 kB
./dist/cjs/emojis.js 2.97 kB
./dist/cjs/experimental.js 3.7 kB
./dist/cjs/mp3-encoder.js 1.27 kB
./dist/css/index.css 41.3 kB
./dist/css/v2/emoji-mart.css 1.84 kB
./dist/css/v2/emoji-replacement.css 300 B
./dist/css/v2/index.css 39.4 kB
./dist/css/v2/index.layout.css 22.8 kB
./dist/limits-CxyAOSJp.js 65.2 kB

compressed-size-action

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.

1 participant