taipy icon indicating copy to clipboard operation
taipy copied to clipboard

[🐛 BUG] [UX] input, number, date controls don't validate on focus out event

Open FabienLelaquais opened this issue 1 year ago • 9 comments

What went wrong? 🤔

The input control (as well as number, data, ...) does not trap the Focus Out event that should trigger the equivalent of pressing the Enter key

Expected Behavior

See description.

All input, number, date should be impacted. login probably...

Acceptance Criteria

  • [ ] Ensure new code is unit tested, and check code coverage is at least 90%.
  • [ ] Create related issue in taipy-doc for documentation and Release Notes.

Code of Conduct

  • [X] I have checked the existing issues.
  • [ ] I am willing to work on this issue (optional)

FabienLelaquais avatar Oct 11 '24 12:10 FabienLelaquais

Hi @FabienLelaquais, I'd love to work on this issue. Could you please assign it to me?

kart2004 avatar Oct 11 '24 13:10 kart2004

I have assigned you this issue @kart2004 !

FlorianJacta avatar Oct 11 '24 14:10 FlorianJacta

Hi @FabienLelaquais, I'd love to work on this issue. Could you please assign it to me?

could you please tell how are you working on this issue

Anudhyan avatar Oct 12 '24 04:10 Anudhyan

I guess all you have to do is add an event handler to the 'onBlur' attribute of the TextField component used by the input control. That would be in frontend/taipy-gui/src/components/Taipy/Input.tsx. This should act just like 'onChange'.

FabienLelaquais avatar Oct 12 '24 06:10 FabienLelaquais

@AlexandreSajus @FabienLelaquais Hey please assign the issue to me

TecHAyusH6476 avatar Oct 12 '24 14:10 TecHAyusH6476

This issue has been assigned already, @TecHAyusH6476 & @Anudhyan. Sorry

FabienLelaquais avatar Oct 12 '24 16:10 FabienLelaquais

This issue has been assigned already, @TecHAyusH6476 & @Anudhyan. Sorry

It's ok . I just wanted to know how to approach this issue, which you already clarified. Thanks

Anudhyan avatar Oct 12 '24 16:10 Anudhyan

What went wrong? 🤔

The input control (as well as number, data, ...) does not trap the Focus Out event that should trigger the equivalent of pressing the Enter key

Expected Behavior

See description.

All input, number, date should be impacted. login probably...

Acceptance Criteria

  • [ ] Ensure new code is unit tested, and check code coverage is at least 90%.
  • [ ] Create related issue in taipy-doc for documentation and Release Notes.

Code of Conduct

  • [x] I have checked the existing issues.
  • [ ] I am willing to work on this issue (optional)

Faizalimam990 avatar Oct 14 '24 13:10 Faizalimam990

Assing me this issue

Faizalimam990 avatar Oct 14 '24 13:10 Faizalimam990

Is this issue worked on ?

Heisen47 avatar Oct 17 '24 12:10 Heisen47

I can assign this issue but this is already worked on by other contributors @Heisen47

FlorianJacta avatar Oct 17 '24 12:10 FlorianJacta

I can assign this issue but this is already worked on by other contributors @Heisen47

I am a newbie but I am still trying my best

Anudhyan avatar Oct 17 '24 14:10 Anudhyan

Please try to assign this issue to me if possible.

developervick avatar Oct 23 '24 08:10 developervick

@developervick A PR is open, do you want to collaborate on this issue?

FlorianJacta avatar Oct 23 '24 12:10 FlorianJacta

To address the issue of input fields not triggering actions on focusout, I propose adding an event listener to detect the focusout event for all relevant inputs (e.g., number, date fields). This listener would trigger the same function as pressing Enter, ensuring the expected action occurs when focus is lost. I'll ensure thorough unit tests for these handlers, aiming for 90% coverage. This approach should improve user experience across input fields. Would love to hear your feedback!

I am willing to work on this issue @jrobinAV

hustler0109 avatar Oct 28 '24 11:10 hustler0109

@hustler0109, Thank you for your help. You can propose your PR to solve the issue. You can also collaborate with the other assignees having a look at their PRs and help us reviewing them.

jrobinAV avatar Oct 30 '24 14:10 jrobinAV

This issue has been labelled as "🥶Waiting for contributor" because it has been inactive for more than 14 days. If you would like to continue working on this issue, please add another comment or create a PR that links to this issue. If a PR has already been created which refers to this issue, then you should explicitly mention this issue in the relevant PR. Otherwise, you will be unassigned in 14 days. For more information please refer to the contributing guidelines.

github-actions[bot] avatar Nov 14 '24 09:11 github-actions[bot]

This issue has been unassigned automatically because it has been marked as "🥶Waiting for contributor" for more than 14 days with no activity.

github-actions[bot] avatar Nov 28 '24 09:11 github-actions[bot]

The proposal: a new Boolean property called validate_on_blur that, if True, will consider the blur event as a validation. We could test if the value really changed.

FabienLelaquais avatar Nov 29 '24 14:11 FabienLelaquais

Why is it not just another action key? Date range should also be impacted!

FlorianJacta avatar Dec 02 '24 08:12 FlorianJacta

"Why is it not just another action key?" What do you mean? "Date range should also be impacted!": you mean date, time and date_range right? That's not yet done despite the issue description. But it will, yes.

FabienLelaquais avatar Dec 02 '24 08:12 FabienLelaquais

Adding to the list of action_keys something like click_event. In your on_action callback, you will be able to know what to do when you receive the action key pressed in the payload

FlorianJacta avatar Dec 02 '24 08:12 FlorianJacta

You may not receive a key at all. Like you click on a button...

FabienLelaquais avatar Dec 02 '24 09:12 FabienLelaquais

Clicking is a kind of key and so is clicking on a button; this is what I would have said

FlorianJacta avatar Dec 02 '24 09:12 FlorianJacta