fix(preprod): Fix search project selection#106951
Merged
Conversation
runningcode
approved these changes
Jan 26, 2026
Contributor
runningcode
left a comment
There was a problem hiding this comment.
LGTM! thanks for the explanation
dashed
pushed a commit
that referenced
this pull request
Jan 26, 2026
To correctly autofill attribute values we need to select the correct projects. How to get the 'selected' projects depends on what part of the site we're on. - on the project settings page there is only one project, put as the slug in the URL. - on most explore and dashboard projects the project is in the query string. There could be a generic hook which would do the correct thing in either case but currently you have to use different code depending on which context you are in: For query string projects we do: ``` usePageFilters(); ``` For projects pages we do: ``` useProjectSettingsOutlet(); ``` Convert PreprodSearchbar to take project ids as an augment so it can be used in either place.
dashed
pushed a commit
that referenced
this pull request
Jan 26, 2026
To correctly autofill attribute values we need to select the correct projects. How to get the 'selected' projects depends on what part of the site we're on. - on the project settings page there is only one project, put as the slug in the URL. - on most explore and dashboard projects the project is in the query string. There could be a generic hook which would do the correct thing in either case but currently you have to use different code depending on which context you are in: For query string projects we do: ``` usePageFilters(); ``` For projects pages we do: ``` useProjectSettingsOutlet(); ``` Convert PreprodSearchbar to take project ids as an augment so it can be used in either place.
JonasBa
pushed a commit
that referenced
this pull request
Jan 27, 2026
To correctly autofill attribute values we need to select the correct projects. How to get the 'selected' projects depends on what part of the site we're on. - on the project settings page there is only one project, put as the slug in the URL. - on most explore and dashboard projects the project is in the query string. There could be a generic hook which would do the correct thing in either case but currently you have to use different code depending on which context you are in: For query string projects we do: ``` usePageFilters(); ``` For projects pages we do: ``` useProjectSettingsOutlet(); ``` Convert PreprodSearchbar to take project ids as an augment so it can be used in either place.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
To correctly autofill attribute values we need to select the correct projects.
How to get the 'selected' projects depends on what part of the site we're on.
There could be a generic hook which would do the correct thing in either case but currently you have to use different
code depending on which context you are in:
For query string projects we do:
For projects pages we do:
Convert PreprodSearchbar to take project ids as an augment so it can be used in either place.