Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

formDialog doesn't have item hints and thus misses validation error messages #2781

Closed
e1fueg0 opened this issue Feb 14, 2022 · 2 comments
Closed
Labels
bug Something isn't working

Comments

@e1fueg0
Copy link

e1fueg0 commented Feb 14, 2022

Describe the bug:

dialog.formDialog looks very similar to widget.Form but, as the code is different, there's a difference:
widget.Form considers FormItem.HintText and creates helperOutput text widgets for items, and then it uses the helperOutputs to show validation errors if they occur.
dialog.NewForm uses its own code and thus it misses HintText and helperOutput, and thus validation error messages are missed.

To Reproduce:

Steps to reproduce the behaviour:

  1. Run fyne_demo.
  2. Go to Widgets/Form tab.
  3. Enter aaaa to the Email field and click to another field.
  4. The text Your full name will be replaced with not a valid email.
  5. Go to Dialogs tab and click the Form Dialog button.
  6. Try to reproduce the behavior there.

Device (please complete the following information):

  • OS: Windows
  • Version: 10
  • Go version: 1.17.2, 1.18beta2
  • Fyne version: 2.1.2
@e1fueg0 e1fueg0 added the unverified A bug that has been reported but not verified label Feb 14, 2022
@andydotxyz
Copy link
Member

I'm not sure this is quite accurate. The output for validation should be present if there is HintText or Validation set.
However it is indeed possible that the Form dialog gets this wrong, will need further consideration.

@andydotxyz
Copy link
Member

Yeah, it looks like the Form dialog isn't re-using the Form widget code like it should and/or replicate the space reserved for validation errors.

@andydotxyz andydotxyz added bug Something isn't working and removed unverified A bug that has been reported but not verified labels Feb 15, 2022
@andydotxyz andydotxyz removed this from the Bowmore Release (early 2022) milestone Jun 3, 2022
@Jacalz Jacalz added this to the Cragganmore Release (v2.3) milestone Dec 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants