Skip to content

Move SegmentEditor.getSegmentData to API file and rename parameter#24199

Merged
caddoo merged 2 commits intoux-326-2from
ux-326-3
Mar 10, 2026
Merged

Move SegmentEditor.getSegmentData to API file and rename parameter#24199
caddoo merged 2 commits intoux-326-2from
ux-326-3

Conversation

@tzi
Copy link
Copy Markdown
Contributor

@tzi tzi commented Mar 10, 2026

Description

Improve #23885 by respecting coding convention:

  • APIs are in the API files
  • segment definition are sent through a segment parameter.

Checklist

  • [✔] I have understood, reviewed, and tested all AI outputs before use
  • [✔] All AI instructions respect security, IP, and privacy rules

Review

@tzi tzi added this to the 5.9.0 milestone Mar 10, 2026
@tzi tzi added the not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. label Mar 10, 2026
@tzi tzi force-pushed the ux-326-3 branch 3 times, most recently from b683825 to 22c8602 Compare March 10, 2026 13:34
@tzi tzi marked this pull request as ready for review March 10, 2026 18:46
@tzi tzi requested a review from a team March 10, 2026 19:34
@caddoo caddoo merged commit 97ee83a into ux-326-2 Mar 10, 2026
49 of 51 checks passed
@caddoo caddoo deleted the ux-326-3 branch March 10, 2026 21:54
@caddoo
Copy link
Copy Markdown
Contributor

caddoo commented Mar 11, 2026

@tzi I've approved and merged, although the test files are a bit odd, the API is being tested in ControllerTest.php

Can you do a follow up PR to tidy this, so that the API tests are isolated, system tests should be enough.

caddoo pushed a commit that referenced this pull request Mar 11, 2026
* Initiate the Segment Management Page

Add 'All Visits at the top'

Reorder segments: fixed > selected > starred > others

Add highlighted styles to fixed and selected segments

Allow star/unstar segments

Reorder data

Add view, edit, and delete actions

Synchronize UI between the editor panel and the management page

Align number to the right

Add right management

Use translation for the page description

Implement the search segment

Add tooltip on view action

Add a create segment button

Add sparkline

UX Meeting feedback

Add a menu entry into the Administration menu + colored evolution

Fix range selection

Update evolution tooltip

Add manage segment button

Remove tooltip on sparkline when using a custom range

Reorder administration menu and add an outlink icon

Use generic table tooltip instead of custom ones

Fix PHPCS

Fix PHP errors

Update the Scheduled Reports help box about segment

Move JavaScript in a separate file and fix a bug when we unstar selected segment

Bugfix: not all users are allowed to create segments

Change translation key since the parameters changed

No need to have write access to be able to see the segment management page

Fix UI feedback on failing star/unstar api calls

First round of Stefan’s feedback

* Update UI screenshots and fix tests

Update UI screenshots

Update UI Screenshots

* Only display data for pre-processed segments

* Fix the tooltip synchronisation after segment star state change

* Revert UI Screenshot change

* Create Dashboard link with an accessible idSite

* Build dashboard link on the client side

* Handle string enable_only_idsite

* Add tests on title, order, and synchronisation

* Add test on edit button

* Update UI screenshot

* Redesign real-time segment notice after team feedback

* Consolidate and add more tests

* Create back-end Fixture for #23885 (#24161)

* Create back-end Fixture

* Feedback from @sgiehl

* Update expected screenshots

* More Stable SegmentSelectorEditor test

* Feedback from @chippison

* Make listeners return unsubscribe handlers to prevent duplicate handlers

* Vue build

* Fix - Allow to remove 'All Visits' from comparisons

* restore browser-trigger archiving state in SegmentEditor ControllerTest teardown

* Do not update TagManager

* Load data for the ManageSegmentPage line by line from front-end asynchronous calls

* Securize segment data/delete flows and stabilize async ManageSegmentPage tests

* Sanitize segment-data errors and test sequential loading after row failure

* Fix tests

* stabilize UI tests

* add new segment management page to whats new list (#24189)

* stabilize UI tests

* Small back-end optimisation

* Fix front-end user right to star/edit/delete segment

* Fix segment search in segment panel

* Move SegmentEditor.getSegmentData to API file and rename parameter (#24199)

* SegmentEditor.getSegmentData API moved to the API file and renamed parameter

* Fix evolution icons

---------

Co-authored-by: Nathan Gavin <nathangavin987@gmail.com>
chippison pushed a commit that referenced this pull request Mar 16, 2026
* Initiate the Segment Management Page

Add 'All Visits at the top'

Reorder segments: fixed > selected > starred > others

Add highlighted styles to fixed and selected segments

Allow star/unstar segments

Reorder data

Add view, edit, and delete actions

Synchronize UI between the editor panel and the management page

Align number to the right

Add right management

Use translation for the page description

Implement the search segment

Add tooltip on view action

Add a create segment button

Add sparkline

UX Meeting feedback

Add a menu entry into the Administration menu + colored evolution

Fix range selection

Update evolution tooltip

Add manage segment button

Remove tooltip on sparkline when using a custom range

Reorder administration menu and add an outlink icon

Use generic table tooltip instead of custom ones

Fix PHPCS

Fix PHP errors

Update the Scheduled Reports help box about segment

Move JavaScript in a separate file and fix a bug when we unstar selected segment

Bugfix: not all users are allowed to create segments

Change translation key since the parameters changed

No need to have write access to be able to see the segment management page

Fix UI feedback on failing star/unstar api calls

First round of Stefan’s feedback

* Update UI screenshots and fix tests

Update UI screenshots

Update UI Screenshots

* Only display data for pre-processed segments

* Fix the tooltip synchronisation after segment star state change

* Revert UI Screenshot change

* Create Dashboard link with an accessible idSite

* Build dashboard link on the client side

* Handle string enable_only_idsite

* Add tests on title, order, and synchronisation

* Add test on edit button

* Update UI screenshot

* Redesign real-time segment notice after team feedback

* Consolidate and add more tests

* Create back-end Fixture for #23885 (#24161)

* Create back-end Fixture

* Feedback from @sgiehl

* Update expected screenshots

* More Stable SegmentSelectorEditor test

* Feedback from @chippison

* Make listeners return unsubscribe handlers to prevent duplicate handlers

* Vue build

* Fix - Allow to remove 'All Visits' from comparisons

* restore browser-trigger archiving state in SegmentEditor ControllerTest teardown

* Do not update TagManager

* Load data for the ManageSegmentPage line by line from front-end asynchronous calls

* Securize segment data/delete flows and stabilize async ManageSegmentPage tests

* Sanitize segment-data errors and test sequential loading after row failure

* Fix tests

* stabilize UI tests

* add new segment management page to whats new list (#24189)

* stabilize UI tests

* Small back-end optimisation

* Fix front-end user right to star/edit/delete segment

* Fix segment search in segment panel

* Move SegmentEditor.getSegmentData to API file and rename parameter (#24199)

* SegmentEditor.getSegmentData API moved to the API file and renamed parameter

* Fix evolution icons

---------

Co-authored-by: Nathan Gavin <nathangavin987@gmail.com>
# Conflicts:
#	tests/UI/expected-screenshots/UIIntegrationTest_period_select_date_range_click.png
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.

Development

Successfully merging this pull request may close these issues.

2 participants