-
Notifications
You must be signed in to change notification settings - Fork 388
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: simplify boards2
implementation
#3115
Merged
jeronimoalbi
merged 21 commits into
gnolang:devx/feature/boardsv2
from
gnostudio:dev/prepare-boards2
Nov 13, 2024
Merged
feat: simplify boards2
implementation
#3115
jeronimoalbi
merged 21 commits into
gnolang:devx/feature/boardsv2
from
gnostudio:dev/prepare-boards2
Nov 13, 2024
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
Also changed the expression to validate board names to check that the name starts with three letters and ends with three numbers. This has been defined this way to match `users` realm implementation. See: gnolang#2827 In a next iteration we can support vanity names for boards, once vanity names are supported for the `users` realm.
This change simplifies the code and allow removing some private functions. The changeset also have minor semantic changes to the existing code.
Asserts were moved to specific functions which also removes duplication.
github-actions
bot
added
the
🧾 package/realm
Tag used for new Realms or Packages.
label
Nov 12, 2024
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## devx/feature/boardsv2 #3115 +/- ##
======================================================
Coverage 63.39% 63.39%
======================================================
Files 548 548
Lines 81329 81329
======================================================
+ Hits 51555 51561 +6
+ Misses 26320 26316 -4
+ Partials 3454 3452 -2 ☔ View full report in Codecov by Sentry. |
Board getter and ID incrementer were moved to `boards.gno` file.
Done to simplify realm code and remove redundancy.
The `DeletePost()` public function was confusing and in case of thread it required an argument to be zero. The generic post concept should not be exposed to users to keep the public realm API easy to understand.
This allows removing a lot of redundant code.
Returning "found" encourages users to check to avoid invalid memory access and also follows a pattern already stablished in Gno packages which is a good practice.
THis changeset removes the board url field and uses standard library functions to generate the relative board URL instead of using a hard-coded one.
jeronimoalbi
merged commit Nov 13, 2024
4c7d16b
into
gnolang:devx/feature/boardsv2
40 of 55 checks passed
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.
Refactors the code copied from
gno.land/r/demo/boards
to simplify it and to have it ready before introducing the new features.