Skip to content

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

Merged
PVinaches merged 1 commit into
KaotoIO:1.xfrom
VrtxOmega:fix-no-field-found-all-tab-3281
Jul 27, 2026
Merged

Fix no-field message when All tab is selected#104
PVinaches merged 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.

@PVinaches PVinaches left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hello! Thanks for the contribution! I appreciate your work on this PR. I'll be merging it shortly.

@PVinaches
PVinaches merged commit f76fee1 into KaotoIO:1.x Jul 27, 2026
1 check passed
@VrtxOmega

Copy link
Copy Markdown
Author

Thank you, Paloma—I really appreciate the review and merge. I’m glad this focused fix and its regression test are now in 1.x. My contribution workflow helped me trace the downstream report to the shared forms package and keep the patch limited to the All-tab empty state. Thanks again for taking the time to review it.

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