-
-
Notifications
You must be signed in to change notification settings - Fork 54
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
feat: archive and restore wishes #183
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have some UX concerns with this. I think as a user I would want separate archives for each year rather than piling them all together. I'm also concerned with how this will interact with multiple wishlists in the future, like I might want a feature to make a private "Sam's Wishlist (2025)" and move all of the items from "Sam's Wishlist" to it.
I'm also concerned about the table of buttons being overwhelming. Maybe we could hide some of them inside a meatball/kebab menu? I'm thinking the edit, delete, move top, move bottom, and archive buttons could all be hidden behind a button.
@Wingysam, I don't think anything done here makes the migration to multiple lists any harder. In fact, I can see the Wishlist page actually being the same even when multiple wish lists are supported. A user object just has n lists and a list would have n items (of which those items are either active or archived. The routing to open a list can just be updated to load a specific list from the Wishlists page, but still load the page that we have today (and that's extended here).
I think that's also fair. I think that could be resolved as part of #154. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good so far!
I'd like to have the stashing of buttons in a menu merged before this to avoid making the table look too complicated in the mean time.
br | ||
details | ||
summary= lang('WISHLIST_ARCHIVED_ITEMS') | ||
if global._CC.config.wishlist.table |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this could be turned into a mixin with a couple of ifs for archive vs unarchive rather than duplicated. Something like +wishlist(groupType, groupItems)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's a very good idea. I've had a go at implementing this in b088c7b
@Wingysam what about something like this? Top row is what it looks like when you've clicked on the hamburger, second row is what it looks like "normally". Hovering over each icon gives to the localized text of what the icon represents (though I think they do a good job at representing what they mean). The only thing that I have noticed with my change is that the up/down actions now error. Top and bottom work, but the individual moves don't. You're pretty handy with that stuff, would you mind taking a look? Also, mobile view: |
@Wingysam better? |
This change adds support for archiving (and restoring) wishes into a "hidden" list. This can be super useful for tidying up a wish list for items that you have received, or items that aren't a priority for you right now, but might be something that you want to be able to reference in the future so don't want to completely remove.
When in table mode (the default) and viewing your own wish list a new "Archive" option is available:
When clicked, a "Successfully archived item" messages flashes up and the item is removed from the wishlist. In a new, collapsed section titled "Archived items" all of the items archived are now visible:
Clicking the restore icon will remove the item from the archived list and make it visible again on the main wishlist. Clicking delete, will prompt you to make sure, and then delete the item like before (this prompt is also added to the delete action from the main wishlist):
The same functionality exists when using card mode:
Also updated is the Wishlists page counts and details. The
totals()
function is expanded to report active and archived items. The counts on the progress bar, and the details list below only show progress towards "active" items (those not archived):An option
AUTO_ARCHIVE_PEDGES
is also added. This might help with #170 but don't expect it to be widely used. When an item is pledged for someone, it will be automatically archived.In my opinion, releasing this closes #164.