Repository navigation
Open skins and drinks inside Profile's tabs - #185
Merged
Merged
Conversation
New skin, New drink and the wardrobe cards now open the editor or the item in place of the grid, under Profile's header and tabs, instead of on separate /profile/skins/* and /profile/drinks/* pages. The address is /profile?tab=skins&skin=new (or &skin=<id>, and &drink= for drinks). Opening one pushes a history entry, so Back returns to the grid; a submit replaces the editor's entry with the new item and reloads the wardrobe. The old addresses redirect, and Discord sign-in keeps the item in its return address. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Profile reads its tab and open item from useSearchParams, so the header's Profile link and other navigations close an open editor. Bounces with nothing to show replace the address instead of going back, so a repeated effect can't step back twice. Opening from a code wardrobe picks up a newly redeemed code's session, so returning to the wardrobe uses it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
Docs: TF-Minecraft/Docs#139 |
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
📒 Files selected for processing (17)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Only /drinks stays, because the in-game drink code message names it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch was successfully deployed
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.
New skin, New drink and the wardrobe cards now open inside the Skins or Drinks tab. Profile's header and tabs stay, instead of a separate narrower page with "← Profile".
What changes
/profile?tab=skins&skin=newis the skin editor, and&skin=<id>one skin's status. Drinks use&drink=. The editor or item replaces the grid, with ← Skins / ← Drinks back to it.useSearchParams). Back, Forward, the header's Profile link and the tabs all update the view.UploadFormandBrewFormtakeonSubmitted(id)instead of pushing a route. The editor and status code moved fromapp/profile/{skins,drinks}/{new,[id]}intoProfileItems.tsx, andProfileSubpageis gone.Removed addresses
/profile/skins/*,/profile/drinks/*,/skinsand/skins/<id>, and/drinks/<id>no longer exist and have no redirects. Only/drinksstill redirects to the Drinks tab, because TFMCWeb's/token create drinkmessage names it.Not changed
UploadForm, which is left as a follow-up./character/<id>/kits.Testing
npx vitest run(2,113 passed),npx tsc --noEmit,npx oxfmt --check,npx oxlint(only theset-state-in-effectwarnings the moved effects already had).Docs: TF-Minecraft/Docs (linked below).
🤖 Generated with Claude Code