-
-
Notifications
You must be signed in to change notification settings - Fork 829
feat: add user customisable default archive display behaviour #1505
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: add user customisable default archive display behaviour #1505
Conversation
"bookmark_click_action": { | ||
"title": "Bookmark Click Action", | ||
"open_external_url": "Open Original URL", | ||
"open_bookmark_details": "Open Bookmark Details" | ||
}, | ||
"archive_display_behaviour": { | ||
"title": "Archive Display Mode", | ||
"show": "Show up in tags and lists", | ||
"hide": "Hide in tags and lists" | ||
} |
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.
thought it might be a little nicer to nest related text for each setting instead of having them all flat. but im totally fine to revert this change as well
I only finished the initial user settings implementation, but I think we can already discuss a little about the choice of text to see if it accurately describes what we want to do. Let me know if the text could be improved to more accurately describe the feature. @jl-678 |
@@ -101,9 +101,16 @@ | |||
"interface_lang": "Interface Language", | |||
"user_settings": { | |||
"user_settings_updated": "User settings have been updated!", | |||
"boomark_click_action": "Bookmark Click Action", |
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.
typo fix
- boomark_click_action
+ bookmark_click_action
query={{ listId: list.id }} | ||
query={{ | ||
listId: list.id, | ||
includeArchived, |
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.
here, if we pass archived: false
when !includeArchived
, we can avoid all the changes to trpc. If includeArchived
is true
, we don't need to pass any filtering by archive
, so we pass undefined
8a88cf0
to
ddea05f
Compare
packages/trpc/routers/users.test.ts
Outdated
@@ -95,6 +95,7 @@ describe("User Routes", () => { | |||
await expect(() => user2Caller.users.list()).rejects.toThrow(/FORBIDDEN/); | |||
}); | |||
|
|||
// TODO may want to add a test for `archiveDisplayBehaviour` as well |
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.
are you strict with requiring tests? ^^
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 it's fine, the tests are mostly testing the edit/get functionality not the specific setting
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.
Looks good to me! Did some small changes (e.g. nuqs), but other than that, this is ready to be merged!
packages/trpc/routers/users.test.ts
Outdated
@@ -95,6 +95,7 @@ describe("User Routes", () => { | |||
await expect(() => user2Caller.users.list()).rejects.toThrow(/FORBIDDEN/); | |||
}); | |||
|
|||
// TODO may want to add a test for `archiveDisplayBehaviour` as well |
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 it's fine, the tests are mostly testing the edit/get functionality not the specific setting
Not sure if I should comment here, but I have been playing with this feature and notice that the setting is not maintained between sessions. Is that expected behavior? |
@jl-678 the global user setting is persisted. The list override is ephemeral as designed. You can set the default global setting to hide as always |
Awesome, thank you. |
Summary
Archive Display Behaviour
query
to conditionally hide archived bookmarks•••
menuPossible Further Improvements
•••
menu or in the search bar to let the users know that a filter is appliedScreenshots
fixes #697