Add URL hash state persistence for raw CSS input#223
Draft
bartveneman wants to merge 2 commits intomainfrom
Draft
Add URL hash state persistence for raw CSS input#223bartveneman wants to merge 2 commits intomainfrom
bartveneman wants to merge 2 commits intomainfrom
Conversation
- Integrate HashState into the raw CSS form tab so the textarea content is automatically encoded in the URL hash as the user types - Auto-switch to the "Paste CSS" tab on page load when a hash is present, pre-populating the textarea from the encoded state - Add default_tab prop to InputModeSwitcher to support the initial tab selection - Preserve the URL hash on raw CSS form submission instead of clearing it https://claude.ai/code/session_016foMJWiaAwuMiU4VcrL5AV
✅ Deploy Preview for projectwallace ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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
This PR adds the ability to persist and share raw CSS input through URL hash state, allowing users to share their CSS analysis via URL without exposing sensitive query parameters.
Key Changes
default_tabprop to allow dynamic tab selection based on URL state, usinguntrack()to prevent reactivity issues during initializationHashStateto manage raw CSS persistence in the URL hashurlandprettify)untrackimport from Svelte for proper reactive state handlingImplementation Details
raw_hash_stateis initialized with an empty CSS string and automatically syncs with the textarea inputinitial_tabis determined by checking if the hash state contains CSS data, defaulting to 'url' tab otherwisehttps://claude.ai/code/session_016foMJWiaAwuMiU4VcrL5AV