Open lenikadali opened 1 month ago
Thank you for opening this pull request with us! Be sure to follow our Pull Request Practices. Let us know if you have any questions on Slack.
Hey @lenikadali do you need any help here?
Hey @lenikadali do you need any help here?
Hi 👋🏿
Thanks for checking in here 🙌🏿 The plan is to try out your suggestions either today or tomorrow and see how it goes 🤞🏿
So the view is being rendered https://github.com/ifmeorg/ifme/blob/main/app/views/categories/new.html.erb. So you’ll want to do it in the form that is being rendered with React. So you’ll need to update the value of
new_category_props
on the Rails side. I've attempted to do that in this commit 8b9f8e2You’ll want to do something like the Moments form where you can add a new Strategy from in there. This isn’t about adding a link to the index page.
Oh. Then what did this statement mean in the issue description 🤔?
Desired Behavior
- Go to the https://www.if-me.org/categories/category-name-slug page
- Add two buttons "New Moment" and "New Strategy" aligned right of the Category name heading
Also, I noticed that the documentation for the version used of React on Rails is now not easily accessible. Maybe it could be worth it to first upgrade React on Rails as per this ticket and then attempt this one since it would be easier to reference the documentation as we work on this.
Ohhh sorry I think I misunderstood / forgot about this ticket was asking for even though I wrote it haha.
Yes so what you want to do is modify the form for the show.html.erb
page. When you click "New Moment" or "New Strategy" it will automatically have that category pre-checked in their respective new.html.erb
forms.
Yeah, we should upgrade React on Rails! It doesn't block this work, but I agree! There's a ticket to do that already with the latest version of React. https://github.com/ifmeorg/ifme/issues/2115
Description
Adds the ability to create a new Strategy or Moment from an individual Category page.
Corresponding Issue
2300