Skip to content

Fix no-field message when All tab is selected#104

Open
VrtxOmega wants to merge 1 commit into
KaotoIO:1.xfrom
VrtxOmega:fix-no-field-found-all-tab-3281
Open

Fix no-field message when All tab is selected#104
VrtxOmega wants to merge 1 commit into
KaotoIO:1.xfrom
VrtxOmega:fix-no-field-found-all-tab-3281

Conversation

@VrtxOmega

@VrtxOmega VrtxOmega commented Jun 11, 2026

Copy link
Copy Markdown

Description

Addresses downstream issue KaotoIO/kaoto#3281.

When the form empty state is shown while the selected tab is already All, NoFieldFound currently still prompts users to switch to the All tab. This keeps the existing switch action for Required / Modified, but renders a plain no-results message when All is already selected.

Type of Change

  • Bug fix
  • New feature
  • Improvement
  • Documentation update
  • Other (please describe)

How Has This Been Tested?

  • corepack yarn test src/form/Form/NoFieldFound.test.tsx --runInBand
  • corepack yarn test --runInBand
  • corepack yarn build:lib
  • corepack yarn prettier --check src/form/Form/NoFieldFound.tsx src/form/Form/NoFieldFound.test.tsx
  • corepack yarn eslint src/form/Form/NoFieldFound.tsx src/form/Form/NoFieldFound.test.tsx

Checklist

  • I have read the Contributing Guidelines.
  • I have followed the coding style and conventions of the project.
  • I have tested my changes and ensured that they work as expected.
  • I have updated any relevant documentation.
  • I have added tests that prove my fix or feature works.

Summary by CodeRabbit

  • Bug Fixes

    • Improved "no fields found" messaging to avoid redundant suggestions when already viewing all fields.
    • Updated alert text to display contextually appropriate messages based on the current tab selection.
  • Tests

    • Added test coverage for tab-switch suggestion behavior when the All tab is selected.

@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 85203d59-5db3-4d5c-981d-ee1d95cd8d40

📥 Commits

Reviewing files that changed from the base of the PR and between 5257757 and b8284e5.

📒 Files selected for processing (2)
  • src/form/Form/NoFieldFound.test.tsx
  • src/form/Form/NoFieldFound.tsx

📝 Walkthrough

Walkthrough

NoFieldFound now checks if the All tab is already selected and adjusts its Alert messaging: when All is selected, it shows "No fields found" without a tab-switch prompt; when another tab is selected, it shows "No {tab} fields found" with a "switch to All" button. A test case validates the All-tab-selected scenario.

Changes

No Field Found Tab Awareness

Layer / File(s) Summary
Conditional All tab messaging and test
src/form/Form/NoFieldFound.tsx, src/form/Form/NoFieldFound.test.tsx
Component derives isAllTabSelected from context and varies the Alert title between "No fields found" (All selected) and "No {selectedTab} fields found" (other tabs), conditionally rendering the "switch to All" button only when needed. Test covers the All-tab-selected scenario and validates no button appears.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related issues

Poem

🐰 A form field search that's now aware,
When All tabs bloom, no switch we dare,
Smart messaging fits each state with care,
Tests confirm the logic's fair,
The interface whispers: pick with flair. ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly reflects the main change: modifying the no-field message behavior when the All tab is already selected.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install failed. For unrecoverable errors, disable the tool in CodeRabbit configuration.


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.

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.

1 participant