Commit 3ab42af
authored
Adds for later list items for members (#2020)
# What it does
This adds a saved for later page as well as buttons for adding/removing
items from a member's saved for later list.
I think this is a reasonable starting point for this feature and I'm
assuming it'll change a fair bit as we gather feedback before merging it
in (assuming we merge this in and don't just make a new PR, depending on
the feedback).
# Why it is important
I know some idea of this has been mentioned in stakeholder meetings
because some users will use holds to remind themselves of items they
need but don't otherwise have a way to save. So they make the hold and
then pass on the hold until they're ready to borrow it. This gives them
a place to save those items without messing with the loaning/holding
flow.
# UI Change Screenshot
I should note that users that are not signed in won't see any of these
buttons in the interface.
The for later page:
<img width="1004" height="966" alt="Screenshot 2025-11-01 at 5 16 14 PM"
src="https://github.com/user-attachments/assets/ac092e7f-1537-49cc-af50-762f1bef5138"
/>
The empty for later page:
<img width="988" height="259" alt="Screenshot 2025-11-01 at 5 15 15 PM"
src="https://github.com/user-attachments/assets/addd752f-7b88-4c71-8728-6e89d7fd08a8"
/>
The navigation:
<img width="256" height="272" alt="Screenshot 2025-11-01 at 5 22 59 PM"
src="https://github.com/user-attachments/assets/09fe5415-a281-436c-8298-4352e8323c15"
/>
Item details page when not wish listed:
<img width="1001" height="544" alt="Screenshot 2025-11-01 at 5 15 41 PM"
src="https://github.com/user-attachments/assets/8111d323-d6d6-41dc-8806-c2143e849327"
/>
Item details page when wish listed:
<img width="995" height="505" alt="Screenshot 2025-11-01 at 5 15 47 PM"
src="https://github.com/user-attachments/assets/47bd357c-55cf-4eab-af1f-f5ff830233d1"
/>
Items index page with a mix of wish listed and not wish listed items:
<img width="1033" height="806" alt="Screenshot 2025-11-01 at 5 15 29 PM"
src="https://github.com/user-attachments/assets/af15cfb6-7892-4e6d-8ab4-6d3951ae8ad4"
/>
# Implementation notes
~~I called it a "Wish List" but I don't think it would be so hard to
rename the concept. The public library refers to this feature as your
"For Later Shelf" but I wasn't sure that was right for this context. I
also thought about calling it "favorites" but to me that implied that it
would only be for tools you'd want to borrow over and over.~~
On the technical side, I implemented this with Turbo Streams so the
interface just automatically updates. If someone is browsing the site
without javascript turned on things should still work, they'll just be
redirected when they add or remove items.
In terms of styles I just use small buttons for adding/removing items.
The actual wish list page rips off a lot of markup from the index page.
I think a case could be made to make it a partial but imagine these
could end up diverging so I didn't want to start there.
**Update:** I've changed the model from `WishListItem` to
`ForLaterListItem`. Right now there isn't a `ForLaterList` model but I
think that would be simple enough to add later on (and convert the
current model into more of a join table). There are a lot of little UI
thinks to manage re multiple lists (when you click save is it a dropdown
of lists? a dialog? etc) so I think it's best to wait a bit on diving
into that.1 parent 4c164f0 commit 3ab42af
File tree
20 files changed
+448
-1
lines changed- app
- assets/stylesheets
- controllers
- account
- lib
- models
- views
- account/for_later_list_items
- items
- layouts
- config
- db
- migrate
- test
- controllers/account
- factories
- models
- system/account
20 files changed
+448
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
187 | 191 | | |
188 | 192 | | |
189 | 193 | | |
| |||
453 | 457 | | |
454 | 458 | | |
455 | 459 | | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
456 | 475 | | |
457 | 476 | | |
458 | 477 | | |
| |||
Lines changed: 54 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
21 | 25 | | |
22 | 26 | | |
23 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
17 | 21 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
50 | 53 | | |
51 | 54 | | |
52 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
25 | 27 | | |
26 | 28 | | |
27 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
0 commit comments