Skip to content

Comments

Make changes to options when exporting in CSV and TSV #24045

Open
chippison wants to merge 32 commits into5.x-devfrom
dev-14698
Open

Make changes to options when exporting in CSV and TSV #24045
chippison wants to merge 32 commits into5.x-devfrom
dev-14698

Conversation

@chippison
Copy link
Contributor

@chippison chippison commented Feb 3, 2026

Description

DEV-14698

When exporting a report in CSV and TSV, we would want to:

  • Remove/Hide the 'Expand subtables' option
  • Pre-select 'Flatten report'

For other formats ('JSON', 'RSS', 'XML', 'HTML')

  • We always show 'Expand subtables' option
  • Initially this will be ticked
    • First time you select a report format above, the 'Expand subtables' option is ticked.
    • This will 'remember' what your choice was, and will reset the 'Expand subtables' option to this value when ever you select a report format that allows this option until you change it again
  • This is an enforced UI change so that we can show this option without pre-selecting it when report format is changed from default ('TSV' where this option is hidden) to a report format which allows 'Expand subtables' option

NOTE:
CSV/TSV exports do not support expanded subtables, so we always export the flattened table for these formats. This changes the output from top‑level referrers to flattened subtable rows and removes goal‑specific columns that aren’t present in the flattened export. The new fixtures (tests/UI/expected-screenshots/ReportExporting_Referrers.getWebsites_exported.csv.txt and tests/UI/expected-screenshots/ReportExporting_Referrers.getWebsites_exported.tsv.txt) reflect the intended CSV/TSV behavior.

Acceptance Criteria

Should only happen when a datatable to be exported has subtables. We don't change behaviour when table has no subtable

  • Test that when CSV or TSV format is chosen as the export format, 'Expand subtables' option should not be shown and 'Flatten report' is selected
  • 'Expand subtables' should be shown and selected if it is any other option is chosen.

Checklist

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

Review

@chippison chippison added this to the 5.8.0 milestone Feb 3, 2026
@chippison chippison force-pushed the dev-14698 branch 2 times, most recently from 55d6aaf to d0d793a Compare February 5, 2026 01:40
@chippison chippison marked this pull request as ready for review February 5, 2026 03:39
@chippison chippison requested a review from a team February 5, 2026 03:39
@chippison chippison force-pushed the dev-14698 branch 4 times, most recently from a7823d0 to 0f29af8 Compare February 15, 2026 23:25
nathangavin
nathangavin previously approved these changes Feb 19, 2026
Copy link
Contributor

@nathangavin nathangavin left a comment

Choose a reason for hiding this comment

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

Looks good to me, meets the requirements and the logic for determining flat vs expanded makes sense.

Copy link
Member

Choose a reason for hiding this comment

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

This one looks invalid. Flatten report is chosen, but in the export link there is no flat=1, but expanded=1

Copy link
Contributor Author

@chippison chippison Feb 20, 2026

Choose a reason for hiding this comment

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

Nice catch @sgiehl!

…e expand option to be true when it is other formats
… our new logic.

we also don't want to change default behaviour if the data does not have a subtable
…nd subtable option w/o forcing the user to change selection if it has added some selections
This is helpful for exporting RowEvolution data.
…stead of defaulting to 'option_flat' being ticked
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants