Skip to content

feat(widget)!: rename useRecommendedRoute to showSingleRoute#743

Merged
chybisov merged 1 commit into
mainfrom
feature/emb-389-config-rename-show-single-route
May 26, 2026
Merged

feat(widget)!: rename useRecommendedRoute to showSingleRoute#743
chybisov merged 1 commit into
mainfrom
feature/emb-389-config-rename-show-single-route

Conversation

@chybisov
Copy link
Copy Markdown
Member

Which Linear task is linked to this PR?

EMB-389 — Wave 1, item #6

Why was it implemented this way?

useRecommendedRoute is a boolean toggle that hides the route selector and shows only one route. The name implies it controls route priority (which is actually what routePriority does), but its effect is to collapse the UI to a single route view.

Verified the two semantics are distinct:

  • routePriority → which route to rank first (passed to the SDK).
  • useRecommendedRoute / showSingleRoute → whether to hide the route selector and show only the recommended one (Routes.tsx:42, useWideVariant.ts:12).

showSingleRoute matches the actual effect.

Alternatives considered:

  • hideRouteSelector — describes the consequence, not the intent.
  • disableRouteSelection — implies the selector is interactive but disabled, which is misleading.
  • singleRoute: boolean — terser but loses the verb that hints at the UI behavior.

Visual showcase

N/A — pure rename. Smoke test confirms the playground loads with widget mounted.

Checklist before requesting a review

  • I have performed a self-review and testing of my code.
  • This pull request is focused and addresses a single problem.
  • If this PR modifies the Widget API or adds new features that require documentation, I have updated the documentation in the public-docs repository.

Breaking change

Migration:
```diff

  • useRecommendedRoute: true,
  • showSingleRoute: true,
    ```

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 25, 2026

E2E Examples — failures

The following example(s) failed:

  • nft-checkout
  • vite-iframe-wagmi

See the workflow run for Playwright reports and logs.

@chybisov chybisov changed the title Rename useRecommendedRoute to showSingleRoute feat(widget)!: rename useRecommendedRoute to showSingleRoute May 25, 2026
The flag controls whether the widget shows only the recommended route
and hides the route selector — not the route priority order. Rename
makes the semantics clearer.

Refs EMB-389
@chybisov chybisov force-pushed the feature/emb-389-config-rename-show-single-route branch from 38ebee1 to 4185abe Compare May 25, 2026 14:06
@chybisov chybisov merged commit 79daeb6 into main May 26, 2026
19 of 21 checks passed
@chybisov chybisov deleted the feature/emb-389-config-rename-show-single-route branch May 26, 2026 12:28
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.

2 participants