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

5594-single-membership-error-messages #6089

Merged
merged 17 commits into from
Jun 9, 2023

Conversation

alishaevn
Copy link
Contributor

@alishaevn alishaevn commented Jun 5, 2023

Fixes

Summary

move and consolidate the "work form edit" related errors to the flash message.

Demo

before after
koppie image image
hyrax image image

Guidance for testing, such as acceptance criteria or new user interface behaviors:

Type of change (for release notes)

  • Bug Fixes
  • Valkyrie Progress

Detailed Description

before this change, the flash message would show an error above the form AND there would be another error message that showed within the form. these messages would be for the same reason. instead, this commit shows unique error messages above the form only.

@samvera/hyrax-code-reviewers

alishaevn and others added 3 commits June 5, 2023 16:35
before this commit, the flash message would show an error above the form AND there would be another error messa
ge that showed within the form. these messages would be for the same reason. instead, this commit shows unique error m
essages above the form only.

ref: #5594

co-authored-by: rob <rob@scientist.com>
now that we are passing the GenericWorkForm instead of the SimpleForm::FormBuilder to the error partials in flash_msg.html.erb, #object is no longer an available method
@alishaevn alishaevn marked this pull request as ready for review June 6, 2023 17:13
@alishaevn alishaevn requested a review from blancoj June 6, 2023 17:13
alishaevn and others added 2 commits June 7, 2023 09:05
…_message_types`.

this reduces the duplication of knowledge between the work form helper and flash message. it will also allow for better future debugging.

co-authored-by: jeremy <jeremy.n.friesen@gmail.com>
@alishaevn alishaevn force-pushed the 5594-single-membership-error-messages branch from 74bd469 to 72a92dd Compare June 7, 2023 15:18
@alishaevn alishaevn requested a review from jeremyf June 7, 2023 16:52
@alishaevn alishaevn force-pushed the 5594-single-membership-error-messages branch from 300a5e4 to 9e78b4f Compare June 9, 2023 16:04
@@ -97,112 +97,5 @@ def form_file_set_select_for(parent:)
hash[presenter.title_or_label] = presenter.id
end
end

##
# This helper retrieves errors based on form type.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

since we're no longer rendering error messages from "app/views/hyrax/base/_form.html.erb", these methods are no longer called.

…rently.

although Hyrax::GenericWorkForm could not be found in koppie when I ran the specs locally with ruby v3.2.1, it was found in the ci pipeline with ruby v2.7.x. I do not know the reason for the difference, but instead of handling the koppie app one way, and hyrax another....we will just search for one version of the class and fall back to the other.
@alishaevn
Copy link
Contributor Author

"spec/services/hyrax/collections/collection_member_service_spec.rb:203" is failing in the ruby3-2 pipeline only. it does not fail for me locally. I ssh'd into the pipeline and it failed twice, but did not on the third time. (unsure if the success was related to putting a byebug in the code and first confirming that new_member wasn't already a part of collection2.)

I ran the pipeline in ci again, and again it has failed. 😞

@alishaevn alishaevn requested a review from dlpierce June 9, 2023 21:05
@alishaevn alishaevn merged commit e5024c6 into main Jun 9, 2023
@alishaevn alishaevn deleted the 5594-single-membership-error-messages branch June 9, 2023 21:21
@dlpierce dlpierce added the notes-valkyrie Release Notes: Valkyrie specific label Aug 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
notes-valkyrie Release Notes: Valkyrie specific
Projects
None yet
5 participants