Skip to content
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

[r/boards] initialize listing #3539

Open
6 tasks
salmad3 opened this issue Jan 17, 2025 · 0 comments
Open
6 tasks

[r/boards] initialize listing #3539

salmad3 opened this issue Jan 17, 2025 · 0 comments

Comments

@salmad3
Copy link
Member

salmad3 commented Jan 17, 2025

Context:

Listing provides a structured way to enumerate items (e.g., boards, threads, or other elements) within the boards realm. This issue focuses on listing setup, distinct from pagination (though they can be combined if needed).

Acceptance Criteria:

  • Initializes a Listing

    • Introduces a function (e.g., InitializeListing(name string, config ListingConfig) error) that:
      • Validates name (no duplicates, non-empty, valid characters).
      • Sets up necessary metadata (e.g., description, flags, etc.).
  • Unique Identifier

    • Ensures each listing has a unique key or identifier (string-based name, hash, or numeric ID) to differentiate multiple listings.
  • Listing Structure

    • Defines a core struct or object for the listing (e.g., Listing) holding:
      • Name or ID
      • Config (visibility, rules, or other settings)
      • References to items in the listing.
  • Role & Permissions Integration

    • Allows a listing to specify ownership (or a “super role”) for administrative actions.
    • Supports adding moderators or admins if the realm’s permission model requires fine-grained control.
  • Hook for Future Enhancements

    • The listing doesn't assume unbounded item retrieval. (If large, pagination will be used to avoid oversized responses.)
    • Remains flexible enough to integrate with flagging, advanced filters, or different data storage strategies (e.g., slice-based, map-based, or a potential data realm in the future).
  • Tests

    • Creating a new listing with valid and invalid names.
    • Verifying that only an authorized caller (e.g., listing owner or a designated admin) can initialize or configure the listing.
    • Confirming duplicates or collisions cause errors.
    • Checking that items can be referenced properly once the listing is created.

Notes:

  • This issue focuses on listing setup (naming, references, ownership) and can be addressed before pagination.
  • Additional fields like creation timestamps, listing descriptions, or advanced configuration can be layered on without changing the core initialization pattern.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant