Skip to content

Conversation

@DominikB2014
Copy link
Contributor

@DominikB2014 DominikB2014 commented Dec 5, 2025

  1. Add ability to disable removeFilter option, this is currently done when the dashboard is prebuilt, and a filter exists in it's prebuilt config.
  2. when a temporary filter is being edited, we now continue to push it's updated value into the temporaryFilters query param instead of globalFilters so that the new filter is correctly applied. We now flag temporary filters with isTemporary: true to make it much easier to distinguish between temporary and non-temporary once we combine them all

@DominikB2014 DominikB2014 requested a review from a team as a code owner December 5, 2025 21:44
@linear
Copy link

linear bot commented Dec 5, 2025

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Dec 5, 2025
onRemoveFilter: (filter: GlobalFilter) => void;
onUpdateFilter: (filter: GlobalFilter) => void;
searchBarData: SearchBarData;
disableRemoveFilter?: boolean;
Copy link
Contributor

Choose a reason for hiding this comment

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

Bug: NumericFilterSelector ignores disableRemoveFilter prop

The NumericFilterSelector component doesn't destructure or use the disableRemoveFilter prop from GenericFilterSelectorProps, even though the PR adds this prop to disable removing filters from prebuilt dashboards. As a result, numeric filters on prebuilt dashboards will always show the "Remove Filter" button (rendered at line 294-301), defeating the intended protection for prebuilt dashboard filters. The prop is correctly added to FilterSelector but is missing from NumericFilterSelector.

Fix in Cursor Fix in Web

<Fragment>
{activeGlobalFilters.map(filter => (
<GenericFilterSelector
disableRemoveFilter={
Copy link
Contributor

Choose a reason for hiding this comment

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

Bug: Release filter change clears temporary filters from URL

When the release filter is changed via ReleasesSelectControl, the handler calls onDashboardFilterChange without including TEMPORARY_FILTERS. The new code in detail.tsx always sets filterParams[TEMPORARY_FILTERS] - when it's not provided, it defaults to ['']. This overwrites any existing temporaryFilters in the URL, effectively clearing temporary filters when users change the release filter. Before this PR, the TEMPORARY_FILTERS key wasn't set in filterParams, so existing URL values were preserved. The fix requires the release handler to separate and pass temporary filters like updateGlobalFilters does.

Additional Locations (1)

Fix in Cursor Fix in Web

Copy link
Member

@Ahmed-Labs Ahmed-Labs left a comment

Choose a reason for hiding this comment

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

I tested global filters in non-prebuilt dashboards and it seems that unsaved changes don't get picked up (changes get pushed to url params but no save button pops up)

tag: Tag;
// The raw filter condition string (e.g. 'tagKey:[values,...]')
value: string;
isTemporary?: boolean;
Copy link
Member

Choose a reason for hiding this comment

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

With this new isTemporary field, would it be worth using it as the main separator between global/temp filters instead of using a new temporary filters parameter?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants