-
Notifications
You must be signed in to change notification settings - Fork 397
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
78
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.
+7,683
−0
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! |
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
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
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
Add missing filetests for `EditReply()` function. Related to #3623 This covers all tests for the function: - Successfully edit of a reply - Successfully edit of a sub-reply - Fail because board is not found - Fail because thread is not found - Fail because parent reply is not found - Fail when edited by a user that is not the creator of the reply - Fail when reply is hidden because is flagged - Fail w/ empty body
Add missing filetests for `FlagReply()` function. Related to #3623 This covers all tests for the function: - Successfully flag a reply - Fail because board is not found - Fail because thread is not found - Fail because reply is not found - Fail because default flag threshold of 1 is exceeded - Fail because user has no permission to flag a reply - Successfully flag a thread using a user with permission to flag
Add missing filetests for `DeleteReply()` function. Related to #3623 This covers all tests for the function: - Successfully delete a reply - Fail because board is not found - Fail because thread is not found - Fail because reply is not found - Successfully delete a sub-reply - Fail because user has no permission to delete a reply - Successfully delete a reply using a user with permission to delete
* Add `CreateRepost` tests: * sequential repost * repost flagged Related to: #3623 CC @salmad3 @jeronimoalbi
…#3724) This enables each board to use a flagging threshold different than the default of 1. Threshold specifies how many flags are required for a thread or comment to be hidden.
Removing these asserts allows realms to interact with the boards which is convenient when implementing custom permissions/DAO to support custom features. An example case could be a realm that publishes tutorials which could implement the permissions and have a feature where after a tutorial is published would create a thread within a tutorials board to deal with discussions or questions related to it.
…3754) PR also adds a couple of other small cleanup changes: - Use `boardID` instead of `bid` in public realm functions - Remove private boards legacy code - Simplify flag instantiation
Realm permissions should have minimal permissions. Boards should be treated as independent communities. At this point it makes sense to only have two roles for the boards realm permissions, owners and admins, where admins can only create boards. Owners are the ones that can manage members in addition to be able to create new boards. Realm permissions could have more roles and permissions in the future when new features are introduced.
The default permissions implementation is an implementation of the `Permissions` interfaces that is used by default when creating new boards and also used as the default realm permissions. The original idea is to be able to switch the implementation for a custom one allowing boards to customize the board interaction rules, or to be able to switch the realm implementation for a different one that uses another DAO with different board creation rules for example. This is an idea that still requires further discussions and refinement. This PR removes the default permission creation options which at this point makes no sense given that we don't have a boards2 package and default permissions are only used within the realm.
THis was discussed at some point but it turns out is not going to be used by Boards2.
PR add missing options that link to Gnoweb help forms to allow easy generation of `gnokey` commands. It also introduces new menus using a simplistic Markdown to simulate sub-menus to avoid extensive menu entries that require specific permissions to execute. Board List Menu: <img width="429" alt="Screenshot 2025-02-23 at 18 40 44" src="https://github.com/user-attachments/assets/2118572f-254b-4cf9-95de-a3453df70eb8" /> Board Menu: <img width="413" alt="Screenshot 2025-02-23 at 18 40 57" src="https://github.com/user-attachments/assets/2c3bcd08-4bfa-4292-8329-588596ec3c91" /> <img width="443" alt="Screenshot 2025-02-23 at 18 41 05" src="https://github.com/user-attachments/assets/9b5e4990-4fa7-4d65-a98b-082b7295c7fd" />
Permissions interface allows assigning different permissions implementation to the boards2 realms and to individual boards. This interface may use a DAO to deal with members and governance. It would be convenient to be able to switch the permissions interface to allow each board to have a custom implementation that enforces custom rules. Apart from individual boards it's also convenient to be able to assign a custom implementation for boards realm permissions which for example might want to use a different DAO.
PR adds two new views to list realm or board members: - `/r/nt/boards2/v1:members` - `/r/nt/boards2/v1:BOARD_NAME/members` Views list the member address and assigned role.
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.