Update Browse Breweries#95
Merged
Merged
Conversation
Deploying openbrewerydb-sveltekit with
|
| Latest commit: |
28f4399
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://6ec33517.openbrewerydb-sveltekit.pages.dev |
| Branch Preview URL: | https://update-browse.openbrewerydb-sveltekit.pages.dev |
…enhance navigation active states
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.
Updating the Browse Breweries page to incorporate By Country and also improve some UI stuff.
From
PLAN.mdfileObjective
Update the browsing URLs for the "By State" and "By Type" sections on the
/breweries/browsepage to follow the correct dynamic route formats, fix general pagination state preservation, optimize layout alignment, and introduce high-fidelity frontend filter control tags with proper spacing.Completed Steps
/breweries/[country]) and states (/breweries/[country]/[state]).src/lib/data/state-country-mapping.jsonfor all 188 state/provinces to support/breweries/[country]/[state]links on the browse page.beergarden,micro,brewpub) should remain global rather than scoped to the US, so they route to the main/breweries?by_type=[type]endpoint. This allows users to browse these types across all countries.src/routes/breweries/browse/+page.ts(to load and attach country names to each state object using the static JSON mapping) andsrc/routes/breweries/browse/+page.svelte(to construct the updated, correct link URLs for states and types).@/home/chris/projects/openbrewerydb-sveltekit/src/routes/breweries/+page.sveltewhere changing pages on filtered listings (like/breweries?by_type=brewpub) dropped the filter search parameters. Imported Svelte 5pagestate from$app/stateand preserved all existing search params on page changes.@/home/chris/projects/openbrewerydb-sveltekit/src/routes/breweries/+page.svelte(both top and bottom sections) on desktop view and kept them centered on mobile. This delivers a consistent, polished layout across all directory-style pages in the app.@/home/chris/projects/openbrewerydb-sveltekit/src/routes/breweries/+page.svelte:max-w-7xl mx-auto px-4wrappers on the active filters row since the main page's SvelteKit layout is already enclosed in amax-w-7xl mx-auto px-4container. This completely resolves the horizontal alignment offset, making the badge row align perfectly with the table's left border.by_typeorby_statefiltering) instead of only textual search query, which balances the top pagination row beautifully with symmetrical text on the left and buttons on the right.mb-8andmb-6margins) to add professional vertical breathing room.