Skip to content

Replace Add New Tile button with unified Add dropdown#1956

Merged
kodiakhq[bot] merged 6 commits intomainfrom
feat/add-dropdown-button
Mar 23, 2026
Merged

Replace Add New Tile button with unified Add dropdown#1956
kodiakhq[bot] merged 6 commits intomainfrom
feat/add-dropdown-button

Conversation

@alex-fedotyev
Copy link
Copy Markdown
Contributor

@alex-fedotyev alex-fedotyev commented Mar 21, 2026

Summary

  • Replace the "Add New Tile" button and overflow "Add Section" menu item with a unified "Add" dropdown at the bottom of the dashboard
  • Dropdown contains "New Tile" and "New Section" — creative actions only
  • "Import Dashboard" stays in the overflow menu alongside Export, Delete, and other management actions
  • Follows the Grafana/Datadog pattern of a single entry point for adding content, which scales to future container types (tabs, groups)

Test plan

  • Click "Add" button at bottom of dashboard → dropdown opens upward with "New Tile" and "New Section"
  • Click "New Tile" → tile editor opens (same as before)
  • Click "New Section" → new section appears on dashboard
  • Overflow menu still contains "Import Dashboard" with contextual label
  • E2E tests pass (updated page object for two-click dropdown flow)

🤖 Generated with Claude Code

Move Add Section and Import Dashboard actions from the overflow menu
into a new dropdown at the bottom of the dashboard alongside New Tile,
reducing clicks for common dashboard editing actions.
@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 21, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hyperdx-oss Ready Ready Preview, Comment Mar 23, 2026 0:08am

Request Review

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Mar 21, 2026

⚠️ No Changeset found

Latest commit: db90c18

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 21, 2026

PR Review

✅ No critical issues found.

The change is clean and follows project patterns (Mantine Menu component, data-testid attributes, custom Button variants). The E2E page object correctly models the new two-click interaction, and Playwright's auto-waiting handles the menu item visibility without explicit waits.

One minor observation (non-blocking):

  • ⚠️ addSection() method is added to the page object but has no corresponding E2E test coverage — consider adding a test case that exercises the new section flow.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 21, 2026

E2E Test Results

All tests passed • 91 passed • 3 skipped • 982s

Status Count
✅ Passed 91
❌ Failed 0
⚠️ Flaky 2
⏭️ Skipped 3

Tests ran across 4 shards in parallel.

View full report →

@alex-fedotyev alex-fedotyev self-assigned this Mar 21, 2026
@alex-fedotyev alex-fedotyev marked this pull request as draft March 21, 2026 00:38
@alex-fedotyev alex-fedotyev marked this pull request as ready for review March 21, 2026 00:50
@alex-fedotyev
Copy link
Copy Markdown
Contributor Author

@claude - code review

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 21, 2026

Claude finished @alex-fedotyev's task in 1m 37s —— View job


Code Review

  • Gather context and understand request
  • Read changed files
  • Review code changes
  • Post final review

Overall this is a clean, focused change. The Mantine Menu wrapping is idiomatic and the variant logic is correctly preserved. A few things worth addressing:

Issues

1. data-testid semantic mismatch (DBDashboardPage.tsx:1796, DashboardPage.ts:97)

add-new-tile-button is now on the dropdown trigger button, not the actual "add tile" action. The locator addTileButton in the page object is now really "open the add-menu button". This is a naming mismatch that will confuse future test authors — someone reading await this.addTileButton.click() won't realize it just opens a dropdown.

Consider renaming the testid to add-dropdown-button on the trigger and updating the page object's field name accordingly. Fix this →

2. Missing addSection() page object method (DashboardPage.ts)

The add-new-section-button testid now lives inside the dropdown, requiring a two-click flow — but there's no addSection() helper in DashboardPage.ts to encapsulate this. Any future test that needs to add a section will have to re-implement the open-dropdown-then-click pattern inline. Fix this →

3. add-new-section-button testid name is stale (DBDashboardPage.tsx:1815)

The section item keeps the testid add-new-section-button but it's a Menu.Item, not a button. This is a minor inconsistency, but for consistency with add-new-tile-menu-item it should be add-new-section-menu-item.

Nits

  • onClick={() => onAddTile()} (line 1810) — the wrapper lambda is unnecessary; onClick={onAddTile} is equivalent.
  • The PR description and test plan (steps 6–8) still reference "Import Dashboard" as a dropdown item, but that was moved back to the overflow menu in commit 698716d0. Worth updating before merge to avoid confusing reviewers.

What's good

  • position="top" is the right choice for a bottom-of-page button — the dropdown opens upward as expected.
  • The primary/secondary variant logic is correctly preserved and unchanged from the original.
  • addTile() and createAndAddTile() in the page object are correctly updated to the two-click flow.
  • All 92 E2E tests pass.

@alex-fedotyev alex-fedotyev requested review from a team and bot-hyperdx and removed request for a team and bot-hyperdx March 21, 2026 01:29
@kodiakhq kodiakhq Bot merged commit c70429e into main Mar 23, 2026
13 of 14 checks passed
@kodiakhq kodiakhq Bot deleted the feat/add-dropdown-button branch March 23, 2026 12:11
knudtty pushed a commit that referenced this pull request Apr 16, 2026
## Summary
- Replace the "Add New Tile" button and overflow "Add Section" menu item with a unified "Add" dropdown at the bottom of the dashboard
- Dropdown contains "New Tile" and "New Section" — creative actions only
- "Import Dashboard" stays in the overflow menu alongside Export, Delete, and other management actions
- Follows the Grafana/Datadog pattern of a single entry point for adding content, which scales to future container types (tabs, groups)

## Test plan
- [x] Click "Add" button at bottom of dashboard → dropdown opens upward with "New Tile" and "New Section"
- [x] Click "New Tile" → tile editor opens (same as before)
- [x] Click "New Section" → new section appears on dashboard
- [x] Overflow menu still contains "Import Dashboard" with contextual label
- [x] E2E tests pass (updated page object for two-click dropdown flow)

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Copilot AI pushed a commit that referenced this pull request Apr 20, 2026
## Summary
- Replace the "Add New Tile" button and overflow "Add Section" menu item with a unified "Add" dropdown at the bottom of the dashboard
- Dropdown contains "New Tile" and "New Section" — creative actions only
- "Import Dashboard" stays in the overflow menu alongside Export, Delete, and other management actions
- Follows the Grafana/Datadog pattern of a single entry point for adding content, which scales to future container types (tabs, groups)

## Test plan
- [x] Click "Add" button at bottom of dashboard → dropdown opens upward with "New Tile" and "New Section"
- [x] Click "New Tile" → tile editor opens (same as before)
- [x] Click "New Section" → new section appears on dashboard
- [x] Overflow menu still contains "Import Dashboard" with contextual label
- [x] E2E tests pass (updated page object for two-click dropdown flow)

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: peter-leonov-ch <209667683+peter-leonov-ch@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants