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

Feedback Form: Render it within both dashboard templates instead of redirecting #984

Open
kasugaijin opened this issue Sep 18, 2024 · 8 comments
Assignees

Comments

@kasugaijin
Copy link
Collaborator

We have the Feedback link in the Staff Dashboard, and the Adopter Foster Dashboard, but this redirects to a new page. Instead, we should render this form within each dashboard layout. You'll probably want two new controllers to handle this. Look at the Organizations::AdopterFosterer::FaqController as an example.

@kasugaijin kasugaijin added the Ready Make a comment to get assigned. label Sep 18, 2024
@Aaryanpal
Copy link
Contributor

@kasugaijin this too

@kasugaijin kasugaijin removed the Ready Make a comment to get assigned. label Sep 19, 2024
@kasugaijin
Copy link
Collaborator Author

@Aaryanpal how's this going?

@Aaryanpal
Copy link
Contributor

WIP
@kasugaijin Sorrry for Late Response.
I was out for some work.
Resuming it Now

@kasugaijin
Copy link
Collaborator Author

@Aaryanpal no worries! Thanks for the update.

@Aaryanpal
Copy link
Contributor

Aaryanpal commented Oct 8, 2024

Hi @kasugaijin,

I'd like to propose a refactoring of our current feedback feature implementation. Here's an overview of the current situation and my proposed changes:

Current Implementation:

  • Controller name: DevContactsController
  • Handles feedback features for both staff and adopters
  • Current URL path: http://localhost:3000/alta/feedback/new

Proposed Changes:

  1. Rename the controller to FeedbackController to better reflect its purpose and follow Rails naming conventions
  2. Consolidate all feedback-related logic into this single controller with renaming the DevContactsMailer to FeedbackMailer
  3. Maintain the existing URL structure (/alta/feedback/new)

Rationale:

  • The current controller name (dev_contacts_controller) doesn't clearly communicate its purpose
  • After reviewing the codebase, I don't see a compelling reason to maintain separate controllers for staff and adopter feedback

Please let me know your thoughts on this proposed refactoring. I'm happy to provide more detailed implementation plans if needed.

@kasugaijin
Copy link
Collaborator Author

kasugaijin commented Oct 8, 2024

Hey @Aaryanpal I appreciate the initiative! I think what you propose makes sense. The ony thing to handle differently if we use a single controller is the layout - we will want to use the dashboard layout if the link in the footer is clicked, and the adopter foster layout if the link in the adopter foster dash side nav if clicked...easy enough to handle with params and a before_action on the controller.

@Aaryanpal
Copy link
Contributor

For Staff it will look like this

image

For Adopter it look something like this

image

Here's a rephrased version as a message to a dev:


I've noticed that the two sections have different styles in the layout. To better align them with the overall design, do you think it would be better to create a separate controller to manage the styles more cleanly? Or should we handle the styling directly within the ERB? Also, do you think it makes sense to adjust the position of the "Feedback" heading to the top-left for better alignment with the design and remove the sub-heading ( Found a bug? Want to request a feature? Contact our dev team with the form below.) as we didn't had one in every options?

Let me know your thoughts!

Aaryanpal added a commit to Aaryanpal/pet-rescue that referenced this issue Oct 9, 2024
- Added Feedback Controller and Feedback Mailer To Handle Feedback for staff and adopter
- Remove DevContactsController and DevContactsMailer
- Fix the test
Aaryanpal added a commit to Aaryanpal/pet-rescue that referenced this issue Oct 9, 2024
- Added Feedback Controller and Feedback Mailer To Handle Feedback for staff and adopter
- Remove DevContactsController and DevContactsMailer
- Fix the test
@kasugaijin
Copy link
Collaborator Author

For Staff it will look like this

image

For Adopter it look something like this

image

Here's a rephrased version as a message to a dev:

I've noticed that the two sections have different styles in the layout. To better align them with the overall design, do you think it would be better to create a separate controller to manage the styles more cleanly? Or should we handle the styling directly within the ERB? Also, do you think it makes sense to adjust the position of the "Feedback" heading to the top-left for better alignment with the design and remove the sub-heading ( Found a bug? Want to request a feature? Contact our dev team with the form below.) as we didn't had one in every options?

Let me know your thoughts!

Yeah that's what I was thinking in the original issue description - that two controllers would handle this more cleanly. Ideally, we do not have the Feedback Form title in the center on these dashboard scoped pages. The title should live in the header for each dashboard check the other pages under both dashboards to see how their headers are set with breadcrumbs). We should also move the shared components of the page (description and form) into a partial that can be shared between all three views (the form accessed via the footer, the form accessed via the two dashboards).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants