Skip to content

fix(preprod): Fix search project selection#106951

Merged
chromy merged 1 commit intomasterfrom
chromy/2026-01-25-fix-search
Jan 26, 2026
Merged

fix(preprod): Fix search project selection#106951
chromy merged 1 commit intomasterfrom
chromy/2026-01-25-fix-search

Conversation

@chromy
Copy link
Contributor

@chromy chromy commented 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.

@chromy chromy requested a review from a team as a code owner January 26, 2026 11:22
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Jan 26, 2026
Copy link
Contributor

@runningcode runningcode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! thanks for the explanation

@chromy chromy merged commit aca9d2c into master Jan 26, 2026
65 of 67 checks passed
@chromy chromy deleted the chromy/2026-01-25-fix-search branch January 26, 2026 12:03
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.
@github-actions github-actions bot locked and limited conversation to collaborators Feb 10, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants