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

Backend: Basic plumbing for bookmark feature #4308

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ChargrilledChook
Copy link
Member

@ChargrilledChook ChargrilledChook commented Jan 3, 2024

A (very rough) spike for a lesson bookmarking feature to gain feedback on whether it's valuable and worth polishing.

Would need more thought around design, UI and UX. Ideally bookmarks would live on the existing dashboard. Would need to consider other technical limitations too (should users only be able to bookmark n lessons? If yes, how does adding and removing look at the limit?)

But before needing to answer all those questions, we can get test the waters and see if there's any appetite for this

Notes:

  • Behind a bookmarks feature flag

Todo:

  • Feature spec
  • View component spec
  • Add to profile / dashboard
    • and / or to the bottom of the lesson page
  • General tidying and cruft removal
  • Transition animation
  • Ability to add / remove from the bookmark page
  • Turbo jankyness around flashes on page transitions
  • General design considerations
    • Add course / path prefix?
    • Button placement
    • Button size / styling
    • Discoverability
    • List styling / alignment

Add basic bookmark component

Add routes

Add title delegator to bookmark model

Add basic bookmark controller

Add bookmark to lessons controller

Add first pass basic bookmark button component

Placeholder basic bookmark index page

Add bookmark component to lesson buttons

Get button working roughly with turbo stream
@KevinMulhern KevinMulhern temporarily deployed to odin-review-app-pr-4308 January 3, 2024 03:52 Inactive
@ChargrilledChook ChargrilledChook temporarily deployed to odin-review-app-pr-4308 January 3, 2024 04:12 Inactive
<div class="flex items-center justify-center" id="bookmark-button">
<%= button_to create_or_destroy_path,
form_class: 'w-full h-full',
method: bookmarked? ? :delete : :post,
Copy link
Member Author

Choose a reason for hiding this comment

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

Would have preferred to keep the logic in the VC class with the rest of it, but putting it in a method didn't work for some reason 🤷

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 📋 Backlog / Ideas
Development

Successfully merging this pull request may close these issues.

2 participants