Skip to content

[CB] New and repeat passwords can be different#4234

Merged
devnaumov merged 11 commits intodevelfrom
8572-cb-new-and-repeat-passwords-can-be-different
Mar 31, 2026
Merged

[CB] New and repeat passwords can be different#4234
devnaumov merged 11 commits intodevelfrom
8572-cb-new-and-repeat-passwords-can-be-different

Conversation

@sergeyteleshev
Copy link
Copy Markdown
Contributor

@sergeyteleshev sergeyteleshev commented Mar 23, 2026

closes https://github.com/dbeaver/pro/issues/8572

Screen.Recording.2026-03-25.at.12.45.09.mov

return null;
});

function onPasswordBlur() {
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.

We already have passwordRepeatRef that basically doing the same. The native notification should appear on form save. This is behaviour we had before and it worked. Do we know what happend?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The issue was that executords didnt execute due to a lack of the form context

Also added the fix to keep the validity state actual because after the 1st fix above when we saved the form validity state was not actuall and form didnt allow to save it but passwords were equal at the same time

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.

I still don't understand what happened to original useContext(FormContext) and why we started to loose it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This behavior worked only for forms that were already wrapped with Form. So only for children
now I added this behavior also for parent forms

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.

While it's logical to add form as a property so it can be used in the same component with <Form/> and hook itself, I think this will not be obvious for developers and easily can be lost or misunderstood in refactoring

For example, when the hook is moved together with the input to the parent component with <Form/> developer can forget to add the form as an argument to this hook

Or when the developer decides to move the hook & input to a separate component, he can forget that he can omit this argument and will pass it to that new component as a prop

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Okay! Added check for that case

Comment thread webapp/packages/core-blocks/src/FormControls/useCustomInputValidation.ts Outdated
Comment thread webapp/packages/core-blocks/src/FormControls/useCustomInputValidation.ts Outdated
Wroud
Wroud previously approved these changes Mar 30, 2026
@devnaumov devnaumov merged commit 34b4556 into devel Mar 31, 2026
9 of 10 checks passed
@devnaumov devnaumov deleted the 8572-cb-new-and-repeat-passwords-can-be-different branch March 31, 2026 12:07
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.

4 participants