-
-
Notifications
You must be signed in to change notification settings - Fork 101
Bookmark Command #634
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
Bookmark Command #634
Conversation
Thank you for your contribution, and welcome to the project! |
Thank you! |
Ran the checks for you, so you can be aware of issues early on. Feel free to ping me whenever you want me to run them again. ^^ |
Ah ok great. Im gonna fix them real quick |
I made everything sonarlint compliant and the tests passed locally. Should be fine now. I dont neccesairily agree with the switch statement changes but hey. |
isn't this command is supposed to work in dms too?? and if not u can set the command visibility to guild no need to handle that explicitly |
that would be ideal yes. should be as simple as making it a GLOBAL command instead of GUILD. |
Yes it does already work in DMs. I also handled trying to add a bookmark in a DM |
application/src/main/java/org/togetherjava/tjbot/commands/help/BookmarksCommand.java
Outdated
Show resolved
Hide resolved
Ok. I have now added sorting by activity and thats all i wanted to add. The UI still looks the same. |
there are extra empty lines in ur code at places like, between methods, between fields, etc. it'd be nice if u can look for them and fix it |
I did this on purpose. It makes the code more organized in my opinion. Like having an extra newline between static things, grouping methods and stuff like that. I think it makes it much more readable. |
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'll do a full review tomorrow, but just submitting this for now
application/src/main/java/org/togetherjava/tjbot/commands/help/BookmarksCommand.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/togetherjava/tjbot/commands/help/BookmarksHelper.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/togetherjava/tjbot/commands/help/BookmarksCommand.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/togetherjava/tjbot/commands/help/BookmarksCommand.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/togetherjava/tjbot/commands/help/BookmarksCommand.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/togetherjava/tjbot/commands/help/BookmarksCommand.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/togetherjava/tjbot/commands/help/BookmarksHelper.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/togetherjava/tjbot/commands/help/BookmarksHelper.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/togetherjava/tjbot/commands/help/BookmarksHelper.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/togetherjava/tjbot/commands/help/BookmarksCleanupRoutine.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/togetherjava/tjbot/commands/help/BookmarksCleanupRoutine.java
Outdated
Show resolved
Hide resolved
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.
mh. do it like this:
- limit the bookmarks per user to 500.
- delete bookmarks for an user if they leave the guild
- delete bookmarks for threads that are deleted (not archived, deleted)
- write a warning message in modauditlog if the total amount of bookmarks exceeds 1 million
- totally block creation of new bookmarks for everyone once the total amount exceeds 1_100_000 bookmarks
disk space isnt really a concern for us. we just have to prevent that someone exploits it and spams us to death (gigabytes, terrabytes)
this should do the trick and is easier than expiration
and better ux, since the user doesnt have to keep their bookmarks alive
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.
for better ux, i think the pagination should display 10 embeds, not just one.
no, y? |
then also state a solution for delete thing rn user can scroll through each bookmark and delete one they want by clicking the delete button, how'll this work with 10 embeds? |
whats the point of keeping bookmarks for an user who is gone? they cant use the bookmarks anymore since they are not part of the server. they cant click the channel links, the channels are effectively dead for them. we need to do housekeeping, otherwise the database keeps growing indefinitely. |
this is a good point. in general, i am voting for a that said, i am unsure about a really good ux for a personally, i think making the delete-flow a bit more cumbersome is worth the price. the like, u need a decent way of getting a quick overview of all ur 100 bookmarks. and clicking "next" 100 times certainly isnt. |
but deleting bookmarks with commands is also really annoying. |
Days since messing up my commit history: 0 |
application/src/main/java/org/togetherjava/tjbot/commands/help/BookmarksCommand.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/togetherjava/tjbot/commands/help/BookmarksCommand.java
Show resolved
Hide resolved
application/src/main/java/org/togetherjava/tjbot/commands/help/BookmarksCommand.java
Outdated
Show resolved
Hide resolved
...ication/src/main/java/org/togetherjava/tjbot/commands/help/BookmarksPaginatorInteractor.java
Outdated
Show resolved
Hide resolved
make a package coz u have multiple files |
* BookmarksPaginationHandler -> BookmarksListRemoveHandler * RequestWithPagination -> Request
- Moved to own package - Improved code design - Naming changes
Zabuzards rework has been merged dd85945 |
Everything resolved and no conflicts anymore. We should be able to merge now |
Closes (#570)
/bookmarks add [note]
command/bookmarks list
command/bookmarks remove
commandScreenshots:







(2 entries a page for demonstrating purposes)