Skip to content

Conversation

@jeronimoalbi
Copy link
Member

@jeronimoalbi jeronimoalbi commented Sep 29, 2025

The gno.land/p/gnoland/boards package is intended to be a part of Boards2 realm.
It would allow making the realm smaller by defining common types within the package.
A follow up PR would refactor Boards2 realm to use this package.

Types are kept minimal so specific logic related to saving or deleting is implemented by the realm.
Package initially had support for deleting and saving but it was removed in favor of a more light weight and less opinionated boards package.

The original idea of having a generic Post type that can represent a thread, repost or reply is kept within the package.

Repost, flagging and replies support are optional features for Post which could be initialized when needed by the realm that imports boards package. A storage interface and a default implementations are available for each one of these.

@Gno2D2
Copy link
Collaborator

Gno2D2 commented Sep 29, 2025

🛠 PR Checks Summary

All Automated Checks passed. ✅

Manual Checks (for Reviewers):
  • IGNORE the bot requirements for this PR (force green CI check)
Read More

🤖 This bot helps streamline PR reviews by verifying automated checks and providing guidance for contributors and reviewers.

✅ Automated Checks (for Contributors):

🟢 Maintainers must be able to edit this pull request (more info)
🟢 Pending initial approval by a review team member, or review from tech-staff

☑️ Contributor Actions:
  1. Fix any issues flagged by automated checks.
  2. Follow the Contributor Checklist to ensure your PR is ready for review.
    • Add new tests, or document why they are unnecessary.
    • Provide clear examples/screenshots, if necessary.
    • Update documentation, if required.
    • Ensure no breaking changes, or include BREAKING CHANGE notes.
    • Link related issues/PRs, where applicable.
☑️ Reviewer Actions:
  1. Complete manual checks for the PR, including the guidelines and additional checks if applicable.
📚 Resources:
Debug
Automated Checks
Maintainers must be able to edit this pull request (more info)

If

🟢 Condition met
└── 🟢 And
    ├── 🟢 The base branch matches this pattern: ^master$
    └── 🟢 The pull request was created from a fork (head branch repo: jeronimoalbi/gno)

Then

🟢 Requirement satisfied
└── 🟢 Maintainer can modify this pull request

Pending initial approval by a review team member, or review from tech-staff

If

🟢 Condition met
└── 🟢 And
    ├── 🟢 The base branch matches this pattern: ^master$
    └── 🟢 Not (🔴 Pull request author is a member of the team: tech-staff)

Then

🟢 Requirement satisfied
└── 🟢 If
    ├── 🟢 Condition
    │   └── 🟢 Or
    │       ├── 🟢 User jefft0 already reviewed PR 4821 with state APPROVED
    │       ├── 🔴 At least 1 user(s) of the team tech-staff reviewed pull request
    │       └── 🔴 This pull request is a draft
    └── 🟢 Then
        └── 🟢 Not (🔴 This label is applied to pull request: review/triage-pending)

Manual Checks
**IGNORE** the bot requirements for this PR (force green CI check)

If

🟢 Condition met
└── 🟢 On every pull request

Can be checked by

  • Any user with comment edit permission

@codecov
Copy link

codecov bot commented Sep 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@jeronimoalbi jeronimoalbi changed the title WIP feat(boards2): add gno.land/p/gnoland/boards2 package WIP feat(boards2): add gno.land/p/gnoland/boards package Oct 2, 2025
@jeronimoalbi jeronimoalbi changed the title WIP feat(boards2): add gno.land/p/gnoland/boards package feat(boards2): add gno.land/p/gnoland/boards package Oct 2, 2025
Removed because this type of functionality must be implemented by the
realm to keep package smaller and less opinionated.
Removed because this type of functionality must be implemented by the
realm to keep package smaller and less opinionated.

Also, implementing save repost would require a reference to where boards
are stored or a reference to the original board instead of
OriginalBoardID field, to be able to get the original thread which would
be required to implement save for a repost.
@jeronimoalbi jeronimoalbi marked this pull request as ready for review October 6, 2025 08:36
@Gno2D2 Gno2D2 added the review/triage-pending PRs opened by external contributors that are waiting for the 1st review label Oct 6, 2025
Comment on lines +11 to +12
// NewReply creates a new reply to a thread or another reply.
func NewReply(parent *Post, creator address, body string) (*Post, error) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something to consider here could be to maybe define NewReply(), NewThread() and NewRepost() in the Boards2 realm, because they have logic which could be considered realm related if you think of boards package as a generic minimal package.

It might be helpful to hear second opinions.

Copy link
Contributor

@jefft0 jefft0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR has tests which pass. This is based on existing realm. No conflicts with master. CI checks pass. Ready for core devs to review.

@Gno2D2 Gno2D2 removed the review/triage-pending PRs opened by external contributors that are waiting for the 1st review label Oct 22, 2025
Setters allows modifying post or board properties when instances are
saved within another realm. This is required in those cases because
instances are readonly tainted when getted from other realm, for
example data realms.

Metadata adds optional flexibility to devs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🧾 package/realm Tag used for new Realms or Packages.

Projects

Status: No status
Status: Triage

Development

Successfully merging this pull request may close these issues.

3 participants