Repository navigation
Fix missing search box dimensions on prerendered pages - #63
Merged
Merged
Conversation
✅ Deploy Preview for device-database-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Collaborator
|
good catch! regardless, i'll approve this once i've applied the policy change on the server 🙏 |
Member
Author
|
That’s right, I missed that, thanks for checking. |
PhilipTrauner
approved these changes
Oct 12, 2026
PhilipTrauner
left a comment
Collaborator
There was a problem hiding this comment.
loosened the cors policy of the dimensions endpoint, this can go in!
caching also works as expected, which is nice 😁
thanks!
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.
The search box loads its dimensions (categories and manufacturers) from the API while the page is rendered. Prerendered pages (
how-it-works,about,editorial-stance,imprint) render at build time. The Docker build has noAPI_AUTHORITY, so the request fails and these pages ship withdimensions="null".On those pages, the search dropdown:
Device results, quick filters and the browse page were unaffected. Netlify builds can reach the API at build time, so the bug only showed up on the Docker deployment.
Fix
When
dimensionsis null,<device-search>now fetches it in the browser after the page loads. Pages rendered on request are unchanged and make no extra request.Testing
Reproduce with a build that can't reach the API, then run the server with the real one:
On http://localhost:4399/how-it-works, the search dropdown shows Category and Manufacturer suggestions again.