Skip to content

Conversation

@apata
Copy link
Contributor

@apata apata commented Dec 8, 2025

Changes

  • Segment filters are displayed to anyone that can see the dashboard filtered by the segment, including for a personal segment applied on a public dashboard

Tests

  • Automated tests have been added

Changelog

  • Entry has been added to changelog

Documentation

  • This change does not need a documentation update

Dark mode

  • The UI has been tested both in dark and light mode

@apata apata added the preview label Dec 8, 2025
@github-actions
Copy link

github-actions bot commented Dec 8, 2025

Preview environment👷🏼‍♀️🏗️
PR-5935

@apata apata requested a review from a team December 8, 2025 12:01
})
}

export function canExpandSegment({
Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry I don't have the full context here but in what case would the user be able to see the dashboard but not expand the segment at all?

In other words, why isn't canExpandSegment always true?

Copy link
Contributor

Choose a reason for hiding this comment

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

From @metmarkosaric's comment here it seems like whenever a segment is shown to the user they should be able to expand it. So I'm questioning the need to have any conditional logic for expanding at all.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks! From my perspective, seeing the contents of a segment and expanding it to the filters bar are different actions.

Expanding puts the constituent filters on the filters bar (and in URL) which also exposes the Update | Save a copy | Delete | Close segment menu.

Of that menu, many user roles (think :public or :viewer looking at a site segment) wouldn't be able to take particular actions. We'd have to bring the messy conditions in Plausible.Segments to the FE to conditionally enable these buttons, or risk disappointing users (makes changes, clicks Save, gets 403).

Also, in Limited Views, the way I've implemented the unremovable segment in the FE wouldn't work if we allow :public role to expand the segment.

I do think it'd be good to allow anyone to expand and save a copy for example. It will be easier to do with the LV dashboard though.

@aerosol
Copy link
Member

aerosol commented Dec 12, 2025

So is that change about not displaying the red warning?

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants