mikker / passwordless

🗝 Authentication for your Rails app without the icky-ness of passwords
MIT License
1.26k stars 85 forks source link

use form_with, requre email, handle rails 7 form redirect #128

Closed yshmarov closed 1 year ago

yshmarov commented 1 year ago

Hello @mikker ! I've been playing around with adding the gem, and noticed some minor things that could be improved. I hope my suggestions find you well:

mikker commented 1 year ago

Hey @yshmarov! Thank you for all these. Looks like decent additions.

How does form_with benefit styling? I imagine it'll add more or perhaps different ids and classes? Is this potentially a (very subtly and harmlessly) breaking change?

I can definitely see how it's nice to share translations however I fear bundling them in the gem will make it very hard to do updates as we'd have to wait for all translations to be ready before we can do breaking changes, etc... So maybe we can put the translations in the wiki here on GH instead?

It breaks my heart what's being done to your country and people. Rooting for you 💛💙

yshmarov commented 1 year ago

Thanks for your reply & support @mikker !

form_with is supposed to unify form_for and form_tag, that seem to be slowly going obsolete https://github.com/rails/rails/pull/26976

How does form_with benefit styling?

you don't have to apply id, data, class inside html_options

<%= form_with model: @post, id: “custom-id”, class: “custom-class” do |form| %>
<%= form_for @post, html: { id: “custom-id”, class: “custom-class” } do |form| %>

Is this potentially a (very subtly and harmlessly) breaking change?

I don't think so...

I can definitely see how it's nice to share translations however I fear bundling them in the gem will make it very hard to do updates as we'd have to wait for all translations to be ready before we can do breaking changes, etc... So maybe we can put the translations in the wiki here on GH instead?

Good point! You are right!

yshmarov commented 1 year ago

@mikker I don't see the Wiki tab available on the repo. It might be disabled?

mikker commented 1 year ago

Perfect 👌 I think the wiki is there now. I've created the first page.

yshmarov commented 1 year ago

@mikker looks like the wiki is not community-editable 🙃

Screenshot 2022-11-30 at 22 04 17
mikker commented 1 year ago

Sorry, try again!