-
Notifications
You must be signed in to change notification settings - Fork 389
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(boards2): implement next boards version - WIP #2901
Draft
ilgooz
wants to merge
53
commits into
master
Choose a base branch
from
devx/feature/boardsv2
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov ReportAll modified and coverable lines are covered by tests ✅ 📢 Thoughts on this report? Let us know! |
ilgooz
force-pushed
the
devx/feature/boardsv2
branch
from
October 4, 2024 13:04
be049e7
to
baf9821
Compare
Boards v2 package and realm API experimentation <details><summary>Contributors' checklist...</summary> - [ ] Added new tests, or not needed, or not feasible - [ ] Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory - [ ] Updated the official documentation or not needed - [ ] No breaking changes were made, or a `BREAKING CHANGE: xxx` message was included in the description - [ ] Added references to related issues and PRs - [ ] Provided any useful hints for running manual tests - [ ] Added new benchmarks to [generated graphs](https://gnoland.github.io/benchmarks), if any. More info [here](https://github.com/gnolang/gno/blob/master/.benchmarks/README.md). </details> --------- Co-authored-by: İlker G. Öztürk <ilker@ilgooz.com> Co-authored-by: Denys Sedchenko <denis0051@gmail.com>
7 tasks
jeronimoalbi
changed the title
feat(boardsv2): add boardsv2 - WIP
feat(boards2): implement next boards version - WIP
Nov 11, 2024
Co-authored-by: Manfred Touron <94029+moul@users.noreply.github.com> Co-authored-by: Jae Kwon <53785+jaekwon@users.noreply.github.com> Co-authored-by: Jeff Thompson <jeff@thefirst.org> Co-authored-by: Hariom Verma <hariom.verma@tendermint.com> Co-authored-by: Morgan <morgan@morganbaz.com> Co-authored-by: Albert Le Batteux <contact@albttx.tech> Co-authored-by: Guilhem Fanton <8671905+gfanton@users.noreply.github.com> Co-authored-by: Blake <104744707+r3v4s@users.noreply.github.com> Co-authored-by: Jeff Thompson <jeff@berty.tech> Co-authored-by: Leon Hudak <33522493+leohhhn@users.noreply.github.com> Co-authored-by: Poroburu <poroburu@gmail.com> Co-authored-by: deelawn <dboltz03@gmail.com> Co-authored-by: grepsuzette <350354+grepsuzette@users.noreply.github.com> Co-authored-by: jon roethke <waymobetta@users.noreply.github.com>
Refactors the code copied from `gno.land/r/demo/boards` to simplify it and to have it ready before introducing the new features.
Use correct package name for boards2 realm.
Related to #3139 Permissioner interface is defined based on Jae's idea to handle permissioned tasks. --------- Co-authored-by: Jae Kwon <53785+jaekwon@users.noreply.github.com>
🛠 PR Checks SummaryAll Automated Checks passed. ✅ Manual Checks (for Reviewers):
Read More🤖 This bot helps streamline PR reviews by verifying automated checks and providing guidance for contributors and reviewers. ✅ Automated Checks (for Contributors):No automated checks match this pull request. ☑️ Contributor Actions:
☑️ Reviewer Actions:
📚 Resources:Debug
|
This is an initial implementation to unblock features that depend on board permissions.
Add flagging support for boards2 realm. Closes #3146
## Description This PR adjusts display of flagged comments with flow defined in #3480. Now, flagged comments will be hidden but children replies still be visible. ### Demo ![image](https://github.com/user-attachments/assets/78dae965-bed7-4fd8-a52e-404afa8bf20a) > [!IMPORTANT] > The "comment is hidden" message is actually italic, but [italic font styles are broken](#3535) in Gnoweb ## Other Changes In addition to that: * Fixed Reply URL arguments. * Added Flag thread/comment URL. * Started adopting `strings.Builder` instead of string concatenation. CC @jeronimoalbi Closes: #3480
…lies (#3606) Replies are soft deleted by replacing their body with a deleted message to keep sub comments Related to #3583 (review)
The PR simplifies the implementation of a couple public boards2 realm functions and change them to be up to date with the latest permission handling changes. These changes also allow a creator of a thread to edit it without permission, or creators of a reply/comment to delete the reply. Also creators of a thread are allowed to delete it for now. This behavior might change in future PRs.
Implement pagination for boards, threads and replies. Closes #3200, #3539 CC @jeronimoalbi @salmad3
Follow up to discussion #3616 (comment)
Add a missing filetests for `CreateBoard()` function. Related to #3623 This covers all tests for the function: - Creation success - Fail w/ empty board name - Fail w/ existing board name - Fail w/ non user call - Fail w/ an address as board name - Fail because name is registered and not owned in `users` realm - Fail w/ short name - Creation success with owned name registered in `users` realm - Fail for non realm DAO member
Add a missing filetests for `RenameBoard()` function. Related to #3623. This covers all tests for the function: - Rename success by default board owner - Fail w/ empty board name - Fail w/ existing board name - Fail when renaming unexisting board - Fail w/ an address as board name - Rename success by another board owner - Fail because name is registered and not owned in `users` realm - Fail w/ short name - Rename success with owned name registered in `users` realm - Fail for non board DAO member
Add missing filetests for `InviteMember()` function. Related to #3623 This covers all tests for the function: - Invite to realm success - Fail when admin invites a new realm owner - Success when admin invites a new realm admin - Fail w/ invalid invite role - Invite to board success - Fail w/ existing user - Fail for non member (unauthorized)
Add missing filetests for `RemoveMember()` function. Related to #3623 This covers all tests for the function: - Success removing a realm member - Fail for non member (unauthorized) - Fail w/ unexisting user
Add missing filetests for `ChangeMemberRole()` function. Related to #3623 This covers all tests for the function: - Successful role change for realm member - Successful role change for board member - Fail for an admin removing an owner role - Fail for an admin changing a role to owner - Success changing a role to owner by another owner - Fail when role doesn't exist - Fail when user is not found - Fail for non member (unauthorized)
Add missing filetests for`HasMemberRole()` and `IsMember()` functions. Related to #3623 This covers all tests for the function: - Successfully check valid member - Successfully check non member
Add missing filetests for `CreateThread()` function. Related to #3623 This covers all tests for the function: - Successfully create a thread - Fail because board is not found - Fail because user has no permission to create a thread - Fail w/ empty title - Fail w/ empty body
Add missing filetests for `EditThread()` function. Related to #3623 This covers all tests for the function: - Successfully edit a thread - Fail w/ empty title - Fail w/ empty body - Fail because board is not found - Fail because thread is not found - Fail because user has no permission to edit a thread - Successfully edit a thread using a user with permission to delete
Add missing filetests for `FlagThread()` function. Related to #3623 This covers all tests for the function: - Successfully flag a thread - Fail because board is not found - Fail because user has no permission to flag a thread - Fail because thread is not found - Fail because default flag threshold of 1 is exceeded - Successfully flag a thread using a user with permission to flag
Add missing filetests for `DeleteThread()` function. Related to #3623 This covers all tests for the function: - Successfully delete a thread - Fail because board is not found - Fail because thread is not found - Fail because user has no permission to delete a thread - Successfully delete a thread using a user with permission to delete
Add missing filetests for `GetBoardIDFromName()` function. Related to #3623 This covers all tests for the function: - Successfully get ID by name - Fail because name is not found
Add missing filetests for `CreateReply()` function. Related to #3623 This covers all tests for the function: - Successfully create a reply - Fail because board is not found - Fail because thread is not found - Fail because parent reply is not found - Fail because thread is hidden - Fail creating sub-reply because thread is hidden - Fail creating sub-reply because parent reply is hidden - Fail because user has no permission to create a reply - Fail w/ empty body - Successfully create a sub-reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.