Skip to content

[LWD] feat(desktop): add history button with cta support in topbar#15623

Open
mcayuelas-ledger wants to merge 1 commit intofeat/wallet40-hide-operation-listfrom
feat/wallet40-topbar-history-button
Open

[LWD] feat(desktop): add history button with cta support in topbar#15623
mcayuelas-ledger wants to merge 1 commit intofeat/wallet40-hide-operation-listfrom
feat/wallet40-topbar-history-button

Conversation

@mcayuelas-ledger
Copy link
Contributor

✅ Checklist

  • npx changeset was attached.
  • Covered by automatic tests.
  • Impact of the changes:
    • ...

📝 Description

Introduce History button in Topbar of W4

Screenshot 2026-03-20 at 14 45 51

❓ Context


🧐 Checklist for the PR Reviewers

  • The code aligns with the requirements described in the linked JIRA or GitHub issue.
  • The PR description clearly documents the changes made and explains any technical trade-offs or design decisions.
  • There are no undocumented trade-offs, technical debt, or maintainability issues.
  • The PR has been tested thoroughly, and any potential edge cases have been considered and handled.
  • Any new dependencies have been justified and documented.
  • Performance considerations have been taken into account. (changes have been profiled or benchmarked if necessary)

@mcayuelas-ledger mcayuelas-ledger requested a review from a team as a code owner March 20, 2026 14:39
Copilot AI review requested due to automatic review settings March 20, 2026 14:39
@live-github-bot live-github-bot bot added desktop Has changes in LLD translations Translation files have been touched labels Mar 20, 2026
@live-github-bot live-github-bot bot changed the title feat(desktop): add history button with cta support in topbar [LWD] feat(desktop): add history button with cta support in topbar Mar 20, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 20, 2026

Web Tools Build Status

Build Status Deployment
Web Tools Build ⏭️ Skipped
Native Storybook Build ⏭️ Skipped
React Storybook Build ⏭️ Skipped

@github-actions
Copy link
Contributor

github-actions bot commented Mar 20, 2026

⚠️ E2E tests are required

Changes detected require e2e testing before merge (even before asking for any review).

🖥️ Desktop

-> Run Desktop E2E

  • Select "Run workflow"
  • Branch: feat/wallet40-topbar-history-button
  • Device: nanoSP or stax

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new “History” action to the Desktop MVVM TopBar, with optional CTA-style rendering (icon + text) gated behind the Wallet40 operations list feature flag.

Changes:

  • Introduce a new useHistory hook and add a History slot to the TopBar slots list when shouldDisplayOperationsList is enabled.
  • Extend TopBar action types/UI to support an optional cta label, rendering a Button instead of an IconButton.
  • Add English i18n strings and add/update unit tests for the new History hook and CTA rendering.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
apps/ledger-live-desktop/static/i18n/en/app.json Adds topBar.history tooltip/CTA translation strings.
apps/ledger-live-desktop/src/mvvm/components/TopBar/types.ts Extends TopBar action type with cta?: string and adds Clock icon typing support.
apps/ledger-live-desktop/src/mvvm/components/TopBar/hooks/useTopBarViewModel.ts Adds History slot behind shouldDisplayOperationsList from useWalletFeaturesConfig("desktop").
apps/ledger-live-desktop/src/mvvm/components/TopBar/hooks/useHistory.ts New hook providing navigation + tooltip/CTA strings for the History action.
apps/ledger-live-desktop/src/mvvm/components/TopBar/hooks/tests/useTopBarViewModel.test.ts Updates tests to validate slot ordering/properties including the History slot.
apps/ledger-live-desktop/src/mvvm/components/TopBar/hooks/tests/useHistory.test.ts Adds unit tests for the new History hook behavior.
apps/ledger-live-desktop/src/mvvm/components/TopBar/components/tests/TopBarActionButton.test.tsx Adds tests ensuring CTA renders a text Button variant and click/disabled behavior works.
apps/ledger-live-desktop/src/mvvm/components/TopBar/components/TopBarActionButton.tsx Implements CTA support by switching between Button and IconButton.
.changeset/forty-bobcats-wonder.md Declares a minor desktop change for the new TopBar History button.

Comment on lines 57 to 59
return (
<div className="flex items-center gap-12">
<Tooltip onOpenChange={handleOpenChange}>
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

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

This MVVM component uses a raw <div> wrapper for layout. In src/mvvm/, UI code is expected to rely on the design system layout primitives (e.g., Lumen / shared layout components) rather than raw HTML containers so styling and accessibility stay consistent. Consider replacing this wrapper with an appropriate design-system layout component.

Copilot generated this review using guidance from repository custom instructions.
Comment on lines +92 to +95
const routeWrapper = route
? ({ children }: { children: React.ReactNode }) =>
createElement(MemoryRouter, { initialEntries: [route] }, children)
: undefined;
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

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

React.ReactNode is referenced in the routeWrapper type annotation, but React isn’t imported in this test file. This will fail TypeScript compilation; import type React / type ReactNode from react (or avoid the React. namespace) before using it.

Copilot uses AI. Check for mistakes.
@mcayuelas-ledger mcayuelas-ledger force-pushed the feat/wallet40-hide-operation-list branch 2 times, most recently from 90aa124 to afe72a7 Compare March 20, 2026 15:53
@mcayuelas-ledger mcayuelas-ledger force-pushed the feat/wallet40-topbar-history-button branch from bf447f5 to 1fd7317 Compare March 20, 2026 15:57
@sonarqubecloud
Copy link

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

Labels

desktop Has changes in LLD translations Translation files have been touched

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants