Skip to content

fix(journeys-admin): show analytics date range dropdown without filter button (NES-1434) - #9432

Merged
tanflem merged 5 commits into
mainfrom
esthershin/nes-1434-analytics-overlay-unrelated-icon-excess-spacing-near-filter
Aug 25, 2026
Merged

fix(journeys-admin): show analytics date range dropdown without filter button (NES-1434)#9432
tanflem merged 5 commits into
mainfrom
esthershin/nes-1434-analytics-overlay-unrelated-icon-excess-spacing-near-filter

Conversation

@Estherqa

@Estherqa Estherqa commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

What & why

Resolves NES-1434.

On the Analytics Overlay toolbar, switching analytics on showed an unrelated three-line filter icon and a separate Filter button that had to be clicked to reveal the date-range dropdown. The icon looked disconnected and the spacing between it and the label was too wide.

This removes the icon and the Filter button entirely and shows the date-range dropdown (defaulting to All time) as soon as the overlay is switched on — one less click to filter.

Changes

  • AnalyticsOverlaySwitch.tsx — drop the standalone FilterIcon, the Filter button, and the now-unused showFilter state; render AnalyticsOverlayDateRangeSelect directly when analytics is enabled.
  • AnalyticsOverlaySwitch.spec.tsx — update the two tests that clicked the Filter button to expect the dropdown to appear immediately.

Analytics data loading is unchanged — the query was already gated on the switch + a valid date range, never on the Filter button.

Testing

  • npx vitest run --config apps/journeys-admin/vitest.config.mts AnalyticsOverlaySwitch.spec.tsx — 4/4 pass.

Summary by CodeRabbit

  • New Features

    • Date-range controls now appear immediately when analytics are enabled.
    • Analytics settings use a simpler, more consistent toggle experience.
  • Bug Fixes

    • Removed the separate filter step before selecting an analytics date range.
    • Updated analytics behavior to match the improved date-range workflow.

@linear

linear Bot commented Aug 3, 2026

Copy link
Copy Markdown

NES-1434

NES-1801

@CLAassistant

CLAassistant commented Aug 3, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 82250ba7-4600-4980-bb0e-18493a8275c3

📥 Commits

Reviewing files that changed from the base of the PR and between a74f1d3 and cd5cc54.

📒 Files selected for processing (2)
  • apps/journeys-admin/src/components/Editor/Slider/JourneyFlow/AnalyticsOverlaySwitch/AnalyticsOverlaySwitch.spec.tsx
  • apps/journeys-admin/src/components/Editor/Slider/JourneyFlow/AnalyticsOverlaySwitch/AnalyticsOverlaySwitch.tsx
🚧 Files skipped from review as they are similar to previous changes (2)
  • apps/journeys-admin/src/components/Editor/Slider/JourneyFlow/AnalyticsOverlaySwitch/AnalyticsOverlaySwitch.tsx
  • apps/journeys-admin/src/components/Editor/Slider/JourneyFlow/AnalyticsOverlaySwitch/AnalyticsOverlaySwitch.spec.tsx

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


Walkthrough

The analytics overlay now uses one derived enabled state for analytics queries, the switch, and date-range controls. The date-range selector appears directly when analytics are enabled. Tests now validate this behavior without the former filter-button interaction.

Changes

Analytics overlay

Layer / File(s) Summary
Centralize analytics state and date-range rendering
apps/journeys-admin/src/components/Editor/Slider/JourneyFlow/AnalyticsOverlaySwitch/AnalyticsOverlaySwitch.tsx
The component removes filter-button state and uses analyticsEnabled for queries, switch state, and date-range rendering.
Update analytics overlay interaction tests
apps/journeys-admin/src/components/Editor/Slider/JourneyFlow/AnalyticsOverlaySwitch/AnalyticsOverlaySwitch.spec.tsx
Tests verify that the date-range selector appears after analytics are enabled and configure custom ranges without opening a filter button.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to cd5cc

This localized change makes the analytics date-range dropdown appear immediately when the overlay is enabled and removes an unrelated filter control; no actionable merge-blocking risk remains beyond normal checks and review.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: showing the analytics date-range dropdown without the filter button.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch esthershin/nes-1434-analytics-overlay-unrelated-icon-excess-spacing-near-filter

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@nx-cloud

nx-cloud Bot commented Aug 3, 2026

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit cd5cc54

Command Status Duration Result
nx run journeys-admin-e2e:e2e ✅ Succeeded 32s View ↗
nx run-many --target=vercel-alias --projects=jo... ✅ Succeeded 1s View ↗
nx run-many --target=upload-sourcemaps --projec... ✅ Succeeded 12s View ↗
nx run-many --target=deploy --projects=journeys... ✅ Succeeded 1m 39s View ↗

💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗


☁️ Nx Cloud last updated this comment at 2026-08-25 01:00:51 UTC

@github-actions
github-actions Bot temporarily deployed to Preview - journeys-admin August 3, 2026 04:06 Inactive
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects.

Name Status Preview Updated (UTC)
journeys-admin ✅ Ready journeys-admin preview Tue Aug 25 12:58:46 NZST 2026

@github-actions
github-actions Bot temporarily deployed to Preview - journeys-admin August 3, 2026 04:12 Inactive
…r button (NES-1434)

Show the date-range dropdown as soon as the Analytics Overlay is switched on, removing the unrelated filter icon and the extra Filter button click.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Estherqa
Estherqa force-pushed the esthershin/nes-1434-analytics-overlay-unrelated-icon-excess-spacing-near-filter branch from 77700db to 75d8349 Compare August 3, 2026 22:18
@github-actions
github-actions Bot temporarily deployed to Preview - journeys-admin August 3, 2026 22:20 Inactive
@Estherqa Estherqa self-assigned this Aug 4, 2026
@Estherqa
Estherqa requested a review from jianwei1 August 4, 2026 03:25
@Estherqa Estherqa changed the title Analytics Overlay – Unrelated icon & excess spacing near Filter button fix(journeys-admin): show analytics date range dropdown without filter button Aug 4, 2026
@Estherqa Estherqa changed the title fix(journeys-admin): show analytics date range dropdown without filter button fix(NES-1801): add spacing between gallery images and Load More button in Image panel Aug 4, 2026
@Estherqa Estherqa changed the title fix(NES-1801): add spacing between gallery images and Load More button in Image panel fix(journeys-admin): show analytics date range dropdown without filter button (NES-1434) Aug 4, 2026
@Estherqa
Estherqa marked this pull request as ready for review August 4, 2026 03:56
@github-actions
github-actions Bot temporarily deployed to Preview - journeys-admin August 4, 2026 03:57 Inactive
@github-actions
github-actions Bot temporarily deployed to Preview - journeys-admin August 10, 2026 02:32 Inactive
jianwei1
jianwei1 previously approved these changes Aug 10, 2026
@tanflem
tanflem enabled auto-merge August 12, 2026 04:26
…nalytics-overlay-unrelated-icon-excess-spacing-near-filter

# Conflicts:
#	apps/journeys-admin/src/components/Editor/Slider/JourneyFlow/AnalyticsOverlaySwitch/AnalyticsOverlaySwitch.spec.tsx
@coderabbitai

coderabbitai Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@tanflem
tanflem added this pull request to the merge queue Aug 25, 2026
Merged via the queue into main with commit a3a115a Aug 25, 2026
25 checks passed
@tanflem
tanflem deleted the esthershin/nes-1434-analytics-overlay-unrelated-icon-excess-spacing-near-filter branch August 25, 2026 02:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants