Repository navigation
fix: only apply the environment filter to project types that have it - #8564
Open
ThreadCrash wants to merge 1 commit into
Open
ThreadCrash wants to merge 1 commit into
ThreadCrash wants to merge 1 commit into
Conversation
The Environment filter type only exists for mods and modpacks, so on other tabs its value is skipped when building the filters. The environment facet was still added from the raw filter values, though. A client filter picked on the Mods tab, or the one the app provides for a server instance, then kept applying on the Shaders tab, where it can't be seen or removed and leaves only a handful of shaders. Add the environment facet only when the Environment filter type is available for the current project types.
Contributor
Pull request changelogAppAddedChangedDeprecatedRemovedFixedSecurityWebsiteAddedChangedDeprecatedRemovedFixedSecurityHostingAddedChangedDeprecatedRemovedFixedSecurity |
|
Tick the box to add this pull request to the merge queue (same as
|
indpriyanshuraj
approved these changes
Dec 6, 2026
This branch has not been 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.
Fixes #8135
The Environment filter type is only defined for
modandmodpack, so on the other tabsnewFiltersskips anenvironmentvalue with "Filter type environment not found". The environment facet block below that loop reads the raw filter values directly, though, so it still adds the client/serverenvironmentcondition for shaders, resource packs, datapacks and plugins.In the app,
instanceFiltersprovides anenvironment: clientfilter for server instances on every project type except resource packs. A client filter set on the Mods tab also carries over to the Shaders tab, which is why the workaround in the issue is to remove it on the Mods tab first. On the Shaders tab the filter type isn't shown, so the filter can't be seen or removed there.On the live search API,
project_types = "shader"gives 1143 results, and adding the client environment condition leaves 6. With the instance's game version filter on top, you get the single shader from the issue.This only adds the environment facet when the Environment filter type is available for the current project types. The environment override for server content is unchanged.
Testing
In Storybook I called
useSearchwith a providedenvironment: clientfilter and printednewFiltersfor each project type:shaderandresourcepackboth got theenvironment = ...conditionshaderandresourcepackgive justproject_types = ..., andmodandmodpackkeep the environment condition as beforeeslint and prettier pass on the file. I can't build the app here, so I haven't clicked through it in the app itself.