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

Feature: Move Dashboard project solutions to Hotwire. #3967

Merged
merged 1 commit into from
Jul 21, 2023

Conversation

KevinMulhern
Copy link
Member

Because:

  • We are replacing our React components with Hotwire.

This commit:

  • Adds a title slot to project submission items - we display the lesson title when on the dashboard and the solutions users name when on a lesson page.
  • Adds a users project submissions controller - when updating a solution from the dashboard we need to use a user specific endpoint to ensure the correct solution item is returned.
  • Automatically like your own project when it is created - We need to disable liking your own submissions, at least for now:
    • The likes endpoint needs to return a full item component at the moment to allow sorting to work. This conflicts with needing different item titles on the dashboard and lesson pages. We'll be able to enable again soon ™️. The next phase of this project is to add a sorting feature to the solutions list, we'll be able to update just the like counter when that is built.
    • The compromise is to automatically like your project so nobody ever has to see their project sitting at 0 - kind of like how Reddit handles new posts.
  • A few performance improvements by preloading lesson and user solutions when fetching solutions.

@KevinMulhern KevinMulhern self-assigned this Jul 14, 2023
@KevinMulhern KevinMulhern added the Type: Enhancement Involves a new feature or enhancement request label Jul 14, 2023
@KevinMulhern KevinMulhern temporarily deployed to odin-review-app-pr-3967 July 14, 2023 00:12 Inactive
@KevinMulhern KevinMulhern force-pushed the feature/convert-user-solutions-to-hotwire branch from 08af4cd to 355ae5f Compare July 14, 2023 14:05
@KevinMulhern KevinMulhern temporarily deployed to odin-review-app-pr-3967 July 14, 2023 14:05 Inactive
@ChargrilledChook ChargrilledChook self-requested a review July 16, 2023 02:10
@ChargrilledChook
Copy link
Member

@KevinMulhern Few conflicts on this one

@KevinMulhern KevinMulhern force-pushed the feature/convert-user-solutions-to-hotwire branch from 355ae5f to f62041e Compare July 16, 2023 20:26
@KevinMulhern KevinMulhern temporarily deployed to odin-review-app-pr-3967 July 16, 2023 20:32 Inactive
@KevinMulhern
Copy link
Member Author

Thanks @ChargrilledChook, those should be sorted now.

@ChargrilledChook ChargrilledChook temporarily deployed to odin-review-app-pr-3967 July 18, 2023 00:08 Inactive
@KevinMulhern KevinMulhern force-pushed the feature/convert-user-solutions-to-hotwire branch from f62041e to f252410 Compare July 21, 2023 14:13
@KevinMulhern KevinMulhern temporarily deployed to odin-review-app-pr-3967 July 21, 2023 14:19 Inactive
Because:
* We are replacing our React components with Hotwire.

This commit:
* Adds a title slot to project submission items - we display the lesson title when on the dashboard and the solutions users name when on a lesson page.
* Adds a users project submissions controller - when updating a solution from the dashboard we need to use a user specific endpoint to ensure the correct solution item is returned.
* Automatically like your own project when it is created - We need to disable liking your own submissions, at least for now:
  * The likes endpoint needs to return a full item component at the moment to allow sorting to work. This conflicts with needing different item titles on the dashboard and lesson pages. We'll be able to enable again soon ™️. The next phase of this project is to add a sorting feature to the solutions list, we'll be able to update just the like counter when that is built.
  * The compromise is to automatically like your project so nobody ever has to see their project sitting at 0 - kind of like how Reddit handles new posts.
* A few performance improvements by preloading lesson and user solutions when fetching solutions.
@KevinMulhern KevinMulhern force-pushed the feature/convert-user-solutions-to-hotwire branch from f252410 to 8979109 Compare July 21, 2023 16:41
@KevinMulhern KevinMulhern temporarily deployed to odin-review-app-pr-3967 July 21, 2023 16:41 Inactive
Copy link
Member

@CouchofTomato CouchofTomato left a comment

Choose a reason for hiding this comment

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

Reviewed on mobile so apologies if I missed anything in the review

@KevinMulhern KevinMulhern merged commit 0c188c5 into main Jul 21, 2023
@KevinMulhern KevinMulhern deleted the feature/convert-user-solutions-to-hotwire branch July 21, 2023 20:08
Mclilzee pushed a commit to Mclilzee/theodinproject that referenced this pull request Aug 2, 2023
…#3967)

Because:
* We are replacing our React components with Hotwire.

This commit:
* Adds a title slot to project submission items - we display the lesson
title when on the dashboard and the solutions users name when on a
lesson page.
* Adds a users project submissions controller - when updating a solution
from the dashboard we need to use a user specific endpoint to ensure the
correct solution item is returned.
* Automatically like your own project when it is created - We need to
disable liking your own submissions, at least for now:
* The likes endpoint needs to return a full item component at the moment
to allow sorting to work. This conflicts with needing different item
titles on the dashboard and lesson pages. We'll be able to enable again
soon ™️. The next phase of this project is to add a sorting feature to
the solutions list, we'll be able to update just the like counter when
that is built.
* The compromise is to automatically like your project so nobody ever
has to see their project sitting at 0 - kind of like how Reddit handles
new posts.
* A few performance improvements by preloading lesson and user solutions
when fetching solutions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Involves a new feature or enhancement request
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants