Skip to content

feat(client): add user-settable Tab order property to focusable widgets#41894

Closed
sebastianiv21 wants to merge 1 commit into
releasefrom
claude/agitated-cray-5d71ba
Closed

feat(client): add user-settable Tab order property to focusable widgets#41894
sebastianiv21 wants to merge 1 commit into
releasefrom
claude/agitated-cray-5d71ba

Conversation

@sebastianiv21

@sebastianiv21 sebastianiv21 commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Description

Adds an optional Tab order property (integer ≥ 1) to the General section of all focusable widgets, letting builders control keyboard Tab navigation order in fixed-layout apps (editor canvas and deployed view).

How it works

  • The property value flows to a data-taborder attribute on the .positioned-widget wrapper (PositionedComponentLayerPositionedContainer).
  • The Tab handler (useWidgetFocus/tabbable.ts) now applies HTML tabindex semantics per candidate set: widgets with an explicit order come first (ascending, ties broken by position), followed by widgets without one in the existing position-based order.
  • Backward compatible by construction: all new logic is gated on "at least one candidate has a valid data-taborder". When no widget has a value (i.e., every existing app), the original sortWidgetsByPosition code path runs unchanged — no DSL migration needed. Invalid values (0, negatives, non-integers, bad bindings) are treated as unset.
  • Modal focus trap, container descent, parent-canvas recursion, and per-canvas scoping are preserved; auto-layout is unaffected (Tab handler already disabled there).

Scope

  • One shared config (src/widgets/sharedPropertyPaneConfig.ts) appended to the General section of 24 files covering 26 widgets (BaseInputWidget covers Input/Currency/Phone via inheritance).
  • Skipped: deprecated v1 widgets and non-focusable widgets (Text, Rate).

Testing

  • Rewrote the tabbable.test.ts stub with 11 tests: legacy-regression gate (output identical to position sorting when no orders set), explicit ordering, HTML-style interleaving, shift-Tab reverse, ties, invalid values, entry ordering (canvas/modal), and per-canvas scoping. All pass.
  • Type check and lint clean on touched files.

Fixes #Issue Number

Automation

/ok-to-test tags="@tag.All"

🔍 Cypress test results

Tip

🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/27435141159
Commit: fce0bd2
Cypress dashboard.
Tags: @tag.All
Spec:


Fri, 12 Jun 2026 19:34:09 UTC

Communication

Should the DevRel and Marketing teams inform users about this change?

  • Yes
  • No

🤖 Generated with Claude Code

Adds an optional "Tab order" property (integer >= 1) to the General
section of all focusable widgets so builders can control keyboard Tab
navigation order in fixed-layout apps.

The value flows to a data-taborder attribute on the positioned widget
wrapper, and the Tab handler now follows HTML tabindex semantics per
candidate set: widgets with an explicit order come first (ascending,
ties broken by position), followed by the rest in the existing
position-based order. When no widget on a canvas has a value set, the
original position-based code path runs unchanged, so existing apps
behave exactly as before with no DSL migration needed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: d16abbdb-ce36-4ece-a905-e6c14ef1df04

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/agitated-cray-5d71ba

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 and usage tips.

@sebastianiv21

Copy link
Copy Markdown
Contributor Author

/build-deploy-preview skip-tests=true

@sebastianiv21 sebastianiv21 added the ok-to-test Required label for CI label Jun 12, 2026
@github-actions

Copy link
Copy Markdown

Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/27435145447.
Workflow: On demand build Docker image and deploy preview.
skip-tests: true.
env: ``.
PR: 41894.
recreate: .
base-image-tag: .

@github-actions

Copy link
Copy Markdown

🔴🔴🔴 Cyclic Dependency Check:

This PR has increased the number of cyclic dependencies by 1, when compared with the release branch.

Refer this document to identify the cyclic dependencies introduced by this PR.

You can view the dependency diff in the run log. Look for the check-cyclic-dependencies job in the run.

@github-actions

Copy link
Copy Markdown

Deploy-Preview-URL: https://ce-41894.dp.appsmith.com

@sebastianiv21 sebastianiv21 deleted the claude/agitated-cray-5d71ba branch June 15, 2026 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ok-to-test Required label for CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant