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

Improve User Creation Form #1111

Merged
merged 24 commits into from
Sep 21, 2023
Merged

Improve User Creation Form #1111

merged 24 commits into from
Sep 21, 2023

Conversation

elias-ba
Copy link
Contributor

@elias-ba elias-ba commented Sep 14, 2023

Notes for the reviewer

This PR proposes code for improving how we render error messages in our forms and prepares for using the NewInput module as replacement to our old Form module.

Related issue

Fixes #731

Review checklist

  • I have performed a self-review of my code
  • I have verified that all appropriate authorization policies have been implemented and tested
  • If needed, I have updated the changelog
  • Product has QA'd this feature

@codecov
Copy link

codecov bot commented Sep 15, 2023

Codecov Report

Patch coverage: 85.10% and project coverage change: +0.46% 🎉

Comparison is base (b10383e) 88.92% compared to head (a6da383) 89.38%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1111      +/-   ##
==========================================
+ Coverage   88.92%   89.38%   +0.46%     
==========================================
  Files         186      186              
  Lines        5335     5342       +7     
==========================================
+ Hits         4744     4775      +31     
+ Misses        591      567      -24     
Files Changed Coverage Δ
lib/lightning/projects/project_credential.ex 66.66% <ø> (ø)
lib/lightning/projects/project_user.ex 80.00% <ø> (ø)
lib/lightning/workflows/workflow.ex 100.00% <ø> (ø)
lib/lightning_web.ex 66.66% <ø> (ø)
lib/lightning_web/controllers/changeset_json.ex 100.00% <ø> (ø)
...ightning_web/live/auth_providers/form_component.ex 96.07% <ø> (ø)
lib/lightning_web/live/components/jobs.ex 0.00% <0.00%> (ø)
...ning_web/live/components/project_deletion_modal.ex 92.30% <ø> (ø)
...ghtning_web/live/components/user_deletion_modal.ex 97.43% <ø> (ø)
...eb/live/credential_live/google_sheets_component.ex 99.14% <ø> (ø)
... and 26 more

... and 1 file with indirect coverage changes

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

@elias-ba elias-ba changed the title Improve user creation form Improve User Creation Form Sep 15, 2023
Copy link
Member

@stuartc stuartc left a comment

Choose a reason for hiding this comment

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

@elias-ba well done 👏 this was a massive set of changes... It's looking great, excited for the rest of them to match the new stuff!

I have some comments on prefixing the fields name to all the error messages. So not rejecting right now - but I think we can solve it a little differently.

lib/lightning_web/live/components/form.ex Outdated Show resolved Hide resolved
lib/lightning/accounts/user.ex Outdated Show resolved Hide resolved
@elias-ba
Copy link
Contributor Author

@elias-ba well done 👏 this was a massive set of changes... It's looking great, excited for the rest of them to match the new stuff!

I have some comments on prefixing the fields name to all the error messages. So not rejecting right now - but I think we can solve it a little differently.

Hey @stuartc and @NickOpenFn this is looking now much better. I have introduced usage of gettext to translate Ecto errors to more humanized errors. Let me know if you need anymore change.

@stuartc stuartc merged commit fb2011a into main Sep 21, 2023
7 of 8 checks passed
@stuartc stuartc deleted the 731-user-without-password branch September 21, 2023 12:33
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.

Creating a new user without a password fails and there is no user feedback
2 participants