rowy icon indicating copy to clipboard operation
rowy copied to clipboard

Feat:Email validation regex field added along with default values

Open RajGM opened this issue 3 years ago • 1 comments

Signed-off-by: Raj Gaurav Maurya [email protected]

RajGM avatar Sep 17 '22 07:09 RajGM

@htuerker @harinij

RajGM avatar Sep 18 '22 02:09 RajGM

This PR only adds the text field to save the custom regex to the column config. ~It does not do any validation on data. @harinij is that within the scope of the original issue (#799)?~

Edit: we have exiting behavior that validates any field if it has the config.validationRegex field set, so no further implementation is required in this PR.

notsidney avatar Sep 26 '22 06:09 notsidney

@RajGM is attempting to deploy a commit to the Rowy Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Oct 02 '22 15:10 vercel[bot]

Hi @notsidney It's working now. Working

RajGM avatar Oct 02 '22 15:10 RajGM

Thanks, it works when I manually update the regex (such as adding a space at the end) then saving.

The issue is that having that as the default value in the UI implies that that setting has already been set and that clicking “Update” will set it. However, reading the code, it’s only set when there is an input to the text field, so it has to be typed in first.

I don’t think it’s a good idea to have it as the default value, but rather have a button next to it that says “Use standard regex” or something similar that sets the regex. This makes sure the user doesn’t think the regex is set but it’s not working.

notsidney avatar Oct 03 '22 05:10 notsidney

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Updated
rowy-typedoc ⬜️ Ignored (Inspect) Nov 29, 2022 at 0:26AM (UTC)

vercel[bot] avatar Nov 28 '22 16:11 vercel[bot]

Hi @notsidney In the latest push, I made some changes; the standard regex is copied to the clipboard, and the user pastes it on the input. Now it's working as expected. Also, the regex works if the page is reloaded or the application restarts. Unnecessary refs are deleted as well.

RajGM avatar Nov 28 '22 16:11 RajGM

@RajGM What’s the benefit of copying to the clipboard instead of updating the value in state directly? The user would have to click the button then click on the text field then paste. I already provided a working suggestion that would have resolved this issue.

notsidney avatar Nov 29 '22 00:11 notsidney

Ok, let me directly implement the changes into state using https://www.npmjs.com/package/jotai

RajGM avatar Nov 29 '22 10:11 RajGM