-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Refactor error messages in Ruby on Rails forms to get rid of "dynamic_form" gem #8545
Comments
I've made a first-timers-only issue from one of these! See how it looks to perform one of these updates by seeing this commit: |
Hey can I try working on this? |
Hi @stacytonui -- sure, can you choose one from the checklist above, and open a pull request with that one file change, similar to eada0c0 ? And link to it from here? Thank you so much! |
Okay let me work on the first one |
@jywarren apologies for the first PR, my repo wasn't synced with the main one |
@jywarren I'd like to work on the second one in plots2/app/views/users/_edit_form.html.erb if you can reserve it for me :) Will make a PR. |
Can I give this a shot with plots2/app/views/map/edit.html.erb ? |
Hi, @diorshelton - I'd love your help - but unfortunately the map/edit.html.erb file is the one I opened up a "first-timers-only" issue for and reserved for @Asu1996 here - #8546 Would you be willing to take on a different one from the list, or from the search results above? Your code looks great! Thank you for your understanding! @noi5e I'll check out yours now, thank you too! |
Hi, @jywarren can I work on question.html.erb? |
@jywarren Yes, will reply to you in the PR, thank you! |
Yes, that would be great!!! |
@jywarren - Looks like there are two instances in post.html.erb: plots2/app/views/editor/post.html.erb Line 66 in a591541
plots2/app/views/editor/post.html.erb Line 72 in a591541
Happy to give these a shot if that's okay! |
…lab#8545 (publiclab#8553) * refactor error message * change @model to @user
…lab#8545 (publiclab#8553) * refactor error message * change @model to @user
…lab#8545 (publiclab#8553) * refactor error message * change @model to @user
…lab#8545 (publiclab#8553) * refactor error message * change @model to @user
…lab#8545 (publiclab#8553) * refactor error message * change @model to @user
…lab#8545 (publiclab#8553) * refactor error message * change @model to @user
We use the
dynamic_form
gem in many places for reasons that we can't even remember -- so if we try to remove that gem, as we did in #4575, tests fail. So let's fix this all and then circle back to that pull request to finish up!Let's go through the uses of this gem everywhere we can find it and replace it with a more modern and standard form syntax! They look like this, using the
error_messages
property of theform_for
block:But they should look like this:
We can search to find where changes should be made, and the simpler of these may potentially be good first-timers-only issues, although if updating these cause tests to need updating too, that could be a potential barrier for a newcomer, so let's be sure to support people well in these!
Here are many instances that could be broken out into their own issues:
https://github.com/publiclab/plots2/search?q=error_messages&unscoped_q=error_messages
plots2/app/views/features/new.html.erb
Line 10 in c60aaab
plots2/app/views/users/_edit_form.html.erb
Line 5 in c60aaab
plots2/app/views/editor/question.html.erb
Line 68 in c60aaab
(we can keep adding links to instances in this list, as they are completed and checked off!)
The text was updated successfully, but these errors were encountered: