Skip to content

fix: enable submit button based on form state in NamespaceForm#4991

Merged
markphelps merged 2 commits into
flipt-io:v2from
Yashh56:fix/ValidationNameSpace
Nov 5, 2025
Merged

fix: enable submit button based on form state in NamespaceForm#4991
markphelps merged 2 commits into
flipt-io:v2from
Yashh56:fix/ValidationNameSpace

Conversation

@Yashh56

@Yashh56 Yashh56 commented Nov 4, 2025

Copy link
Copy Markdown
Contributor

Fix: #2546

This PR improves the responsiveness and reliability of the NamespaceForm by making validation and button states update instantly.

Key Changes:

  • Enabled real-time validation on change, blur, and mount.

  • Used setFieldValue to instantly sync field updates and trigger validation.

  • Added local isButtonEnabled state to update the submit button instantly.

  • Simplified button logic and cleaned up redundant code for better readability.

Demo:

Flipt._.default.default.-.Brave.2025-11-04.14-38-31.mp4

@Yashh56
Yashh56 requested a review from a team as a code owner November 4, 2025 09:18
@dosubot dosubot Bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Nov 4, 2025
@github-actions

github-actions Bot commented Nov 4, 2025

Copy link
Copy Markdown
Contributor

👋 Hi @Yashh56! Thanks for your contribution to this project.

It looks like one or more of your commits are missing a DCO (Developer Certificate of Origin) sign-off. The DCO is a simple way for you to certify that you have the right to submit this code under the project's license.

How to fix this:

# For future commits, use the -s flag
git commit -s -m "Your commit message"

# To sign off on existing commits in this PR
git rebase HEAD~$(git rev-list --count origin/v2..HEAD) --signoff
git push --force-with-lease

The -s flag adds this line to your commit message:
Signed-off-by: Your Name <[email protected]>

📋 View the failing DCO check for more details

For more information about the DCO, visit: https://developercertificate.org/

@dosubot

dosubot Bot commented Nov 4, 2025

Copy link
Copy Markdown

Related Documentation

Checked 4 published document(s) in 1 knowledge base(s). No updates required.

How did I do? Any feedback?  Join Discord

@Yashh56
Yashh56 force-pushed the fix/ValidationNameSpace branch from 2a5f420 to ffedb21 Compare November 4, 2025 09:22

@markphelps markphelps left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

lgtm! one nitpick : would you mind removing emojis from the comments?

Comment thread ui/src/components/namespaces/NamespaceForm.tsx Outdated
Comment thread ui/src/components/namespaces/NamespaceForm.tsx Outdated
@codecov

codecov Bot commented Nov 4, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.31%. Comparing base (cb01e3d) to head (61727d5).
⚠️ Report is 1 commits behind head on v2.

Additional details and impacted files
@@            Coverage Diff             @@
##               v2    #4991      +/-   ##
==========================================
+ Coverage   59.84%   60.31%   +0.47%     
==========================================
  Files         136      136              
  Lines       13394    13394              
==========================================
+ Hits         8015     8079      +64     
+ Misses       4700     4631      -69     
- Partials      679      684       +5     
Flag Coverage Δ
integrationtests 34.87% <ø> (+1.54%) ⬆️
unittests 51.35% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Yashh56
Yashh56 requested a review from markphelps November 4, 2025 17:07
Comment thread ui/src/components/namespaces/NamespaceForm.tsx Outdated
@Yashh56
Yashh56 requested a review from erka November 4, 2025 17:59

@erka erka left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

give it a try

Comment thread ui/src/components/namespaces/NamespaceForm.tsx Outdated
Comment thread ui/src/components/namespaces/NamespaceForm.tsx Outdated
@Yashh56
Yashh56 force-pushed the fix/ValidationNameSpace branch from a28a2cb to 1a7b599 Compare November 4, 2025 18:25
@Yashh56

Yashh56 commented Nov 4, 2025

Copy link
Copy Markdown
Contributor Author

Hey @erka, Thanks For Reviewing the PR, I fixed these issue Please Review it once more.

@Yashh56
Yashh56 requested a review from erka November 4, 2025 18:30
@erka

erka commented Nov 4, 2025

Copy link
Copy Markdown
Contributor

@Yashh56 could you sign your commits? Please follow these instructions

@Yashh56
Yashh56 force-pushed the fix/ValidationNameSpace branch from 1a7b599 to 61727d5 Compare November 4, 2025 18:47
@erka erka added the v2 Flipt v2 label Nov 4, 2025

@erka erka left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@Yashh56 thank you for your contribution!

@markphelps
markphelps merged commit e425ef8 into flipt-io:v2 Nov 5, 2025
26 checks passed
@github-project-automation github-project-automation Bot moved this to Done in Flipt V2 Nov 5, 2025
@Yashh56
Yashh56 deleted the fix/ValidationNameSpace branch November 6, 2025 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L This PR changes 100-499 lines, ignoring generated files. v2 Flipt v2

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Namespace input validation not updating button until clicking outside of input

3 participants