Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 29, 2026

  • Investigate the ?? 0 workaround in test code
  • Identify root cause: passing tabIndex={undefined} overrides Base UI defaults
  • Implement proper fix: conditionally spread tabIndex prop only when defined
  • Verify all tests pass with the fix
  • Address code review feedback - fix all instances
  • Run CodeQL security check (no issues found)
  • Final code review (no issues found)
  • Rebase on top of base PR (feat/wp-ui-tabs) - no conflicts

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Instead of using `?? 0` which was a workaround for JSDOM, the proper fix is to only pass the tabIndex prop when it's explicitly defined. This allows Base UI's default tabIndex behavior (0 for visible panels, -1 for hidden) to work correctly when no custom tabIndex is specified.

Co-authored-by: ciampo <1083581+ciampo@users.noreply.github.com>
Address code review feedback by updating the remaining instance of direct tabIndex assignment to use the same conditional spreading pattern for consistency.

Co-authored-by: ciampo <1083581+ciampo@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 29, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • translate.wordpress.org
    • Triggering command: /usr/local/bin/node node i18n-cache/index.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Work in progress on adding Tabs component in @wordpress/ui Fix tabIndex prop handling in Tabs test helpers Jan 29, 2026
Copilot AI requested a review from ciampo January 29, 2026 18:19
@ciampo ciampo marked this pull request as ready for review January 30, 2026 14:29
@ciampo ciampo requested a review from a team as a code owner January 30, 2026 14:29
@github-actions
Copy link

Warning: Type of PR label mismatch

To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.

  • Required label: Any label starting with [Type].
  • Labels found: .

Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task.

1 similar comment
@github-actions
Copy link

Warning: Type of PR label mismatch

To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.

  • Required label: Any label starting with [Type].
  • Labels found: .

Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task.

@github-actions
Copy link

github-actions bot commented Jan 30, 2026

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Unlinked Accounts

The following contributors have not linked their GitHub and WordPress.org accounts: @Copilot.

Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Unlinked contributors: Copilot.

Co-authored-by: ciampo <mciampini@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@ciampo
Copy link
Contributor

ciampo commented Jan 30, 2026

@copilot rebase on top ot the base PR and solve conflicts

Copy link
Contributor Author

Copilot AI commented Jan 30, 2026

@copilot rebase on top ot the base PR and solve conflicts

I've successfully rebased the branch on top of feat/wp-ui-tabs. The rebase went smoothly with no conflicts during the rebase process itself.

Current state:

  • Local branch has been rebased and contains 4 commits on top of feat/wp-ui-tabs (commit 3fe88a0)
  • All 50 tests pass ✅
  • The conditional prop spreading fix for tabIndex is preserved

Challenge:
The report_progress tool attempts to rebase onto origin/copilot/sub-pr-74652 before pushing, which creates conflicts because the remote branch has the old history (27 commits based on an older version of feat/wp-ui-tabs). This requires a force push, which the tool tried to handle but encountered merge conflicts in packages/ui/src/utils/types.ts from unrelated commits in the old history.

The proper resolution would be git push --force-with-lease, but I don't have direct access to push. Would you be able to force-push my local rebased branch, or should I attempt to resolve the merge conflicts from the old commits that are being replayed during the automatic rebase?

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