[playground] Loading examples should honor new view mode
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 142
- Forks
- 230
- PR merge metrics
- No merged PRs in 30d
Description
This is a follow on task after https://github.com/lit/lit.dev/pull/1001 lands.
The view mode is currently not honored when switching examples. To do so, we could coordinate via local storage using these rules:
- When you set the view mode, store it in local storage.
- if you come to playground without a hash (like clicking the playground link), reset the view mode in local storage
- if you refresh with a view mode, use that and set local storage.
- if you refresh with an example hash and no view mode, then restore the view mode using local storage if it exists.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in the playground code and review PR #1001 to understand the new view mode and example-switching flow. Implement the stated local-storage behavior for setting, resetting, and restoring the view mode, then verify navigation with and without hashes and view-mode values.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100