lit / lit/lit.dev

[playground] Loading examples should honor new view mode

Open
#1,014 1 comment 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.