-
-
Notifications
You must be signed in to change notification settings - Fork 199
Add support for dietary restrictions on member profiles #2312
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
Conversation
add bottom margin to vertical collections to match other form input types.
Ensure margin above and below the view invitation button is consistent
Show/hide the "Other dietary restrictions" text field on the member details form depending on whether "Other" is ticked in the list of dietary restriction checkboxes.
The main purpose for this is to handle excluding display of the enum entry for "other" and appending the "other dietary restrictions" to the end of the list when appropriate. Also handles applying `humanize` to enum entries and using an initial uppercase letter for all displayed values.
can use the `class_names` helper to conditionally add the `d-none` class instead of using the ternary operator.
switch focus to the "other dietary restrictions" text input when checking the check box for "Other".
Allow long "other dietary restrictions" to wrap onto multiple lines. Otherwise spills over into the column where the tutorial, note etc. are displayed.
I was running into a `TypeError: can't quote Array (TypeError)` error when running this migration and at first I thought using `change_table` instead of `add_column` seemed to help. In actuality the error still occurs when this migration is run as part of a sequence of multiple migrations, but the migration runs successfully when run on its own. However, the issue seems to be fixed in Rails 7.1 so: - can switch this to use `add_column` which is clearer in terms of the intent, and - wait until our Rails 7.1 upgrade is merged before shipping this
preparatory step for displaying dietary restrictions on profile.
update member profiles in admin to include dietary restrictions as part of this update @member to be a `MemberPresenter` to give access to displayed_dietary_restrictions.
update form used during signup to include fields for dietary restrictions.
matches how the names of the dietary restrictions are displayed when showing a profile.
…er into dietary-restrictions
add system tests to cover a member updating their details to add/remove dietary restrictions.
update text on the invite page to encourage updating member details with any dietary restrictions rather than emailing the organiser about them.
`shared_intro_4_html` is used now instead of `food`, `want_to_coach` isn't referenced from anywhere.
add test to cover display of attendees' dietary restrictions on the workshop admin page.
update student invite page to pass link for updating dietary restrictions rather than email address. follow up to 17f5020 (had previously made this change for coach invites but not students).
update spec to check expected dietary restrictions are displayed when viewing a member's profile.
update spec to check that dietary restrictions can be provided when filling in member details during signup.
update background colour used for skill badges on admin member profiles to match the colour used when a member views their own profile.
update dietary restriction badges to use text-break as well as text-wrap. this forces any long words without spaces to wrap onto multiple lines, prevening them overflowing into other columns in the layout.
Nice! very good, comprehensive solution for this feature. Maybe the improvements that don't relate to dietary restrictions could be moved into a separate PR to reduce the changes here and make reviewing a little bit easier. As you probably know my PR for the 'how you found us' section will create conflicts with this PR depending on which is merged first so I suppose we have to be mindful of that. You added a comprehensive solution for ticking 'other' and having the text input field appear conditionally whereas my implementation for 'how you found us' is simpler with a static input field so the user experience won't be consistent across these two parts of onboarding and updating their profile. I don't think this is a major issue but it raises the question of whether we want them to be consistent or not. |
Reverting this to make it part of a separate PR. This reverts commit 3fabf63.
Thanks for taking a look @davidmillen50 I just checked out a your "how you found us" branches (#2303 and #2328) and spotted a couple of suggestions that would be good to talk through before this gets merged, so maybe we can also run through anything that would make the 2 consistent at the same time? Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only have a very minor suggestion
Couple of questions here from @mroderick and a conflict on locales before I can give it a tick @mikej! |
Co-authored-by: Morgan Roderick <20321+mroderick@users.noreply.github.com>
Add the ability for members to specify any dietary restrictions on their profile and then display these on the workshop admin page in the list of members who are attending.
The main highlights are: