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

feat: simplify boards2 implementation #3115

Merged

Commits on Nov 12, 2024

  1. feat: add assertIsBoardName() function

    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.
    jeronimoalbi committed Nov 12, 2024
    Configuration menu
    Copy the full SHA
    3d0e592 View commit details
    Browse the repository at this point in the history
  2. feat: change ID types to have a Key() method

    This change simplifies the code and allow removing some private
    functions.
    
    The changeset also have minor semantic changes to the existing code.
    jeronimoalbi committed Nov 12, 2024
    Configuration menu
    Copy the full SHA
    45c971a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b078c3f View commit details
    Browse the repository at this point in the history
  4. feat: change public realm func to use asserts for anonymous fees

    Asserts were moved to specific functions which also removes duplication.
    jeronimoalbi committed Nov 12, 2024
    Configuration menu
    Copy the full SHA
    24546d2 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    fca2bf5 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    d066545 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    83a9393 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    e95177f View commit details
    Browse the repository at this point in the history
  9. chore: rename misc.gno to format.gno

    Board getter and ID incrementer were moved to `boards.gno` file.
    jeronimoalbi committed Nov 12, 2024
    Configuration menu
    Copy the full SHA
    9b514aa View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    bfce60d View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    5a84bdb View commit details
    Browse the repository at this point in the history
  12. feat: add mustGetBoard() function

    Done to simplify realm code and remove redundancy.
    jeronimoalbi committed Nov 12, 2024
    Configuration menu
    Copy the full SHA
    b3cb5db View commit details
    Browse the repository at this point in the history
  13. chore: semantic changes

    jeronimoalbi committed Nov 12, 2024
    Configuration menu
    Copy the full SHA
    3f1f4de View commit details
    Browse the repository at this point in the history

Commits on Nov 13, 2024

  1. refactor: split DeletePost into DeleteThread & DeleteReply

    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.
    jeronimoalbi committed Nov 13, 2024
    Configuration menu
    Copy the full SHA
    b4d35bf View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    318d3ef View commit details
    Browse the repository at this point in the history
  3. feat: add mustGetThread & mustGetReply funcs

    This allows removing a lot of redundant code.
    jeronimoalbi committed Nov 13, 2024
    Configuration menu
    Copy the full SHA
    c9b8a3a View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    44a8a35 View commit details
    Browse the repository at this point in the history
  5. refactor: change Post.GetReply to also return "found" boolean

    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.
    jeronimoalbi committed Nov 13, 2024
    Configuration menu
    Copy the full SHA
    69b0bed View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    5e15250 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    147945d View commit details
    Browse the repository at this point in the history
  8. refactor: change board URL to be dynamic

    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 committed Nov 13, 2024
    Configuration menu
    Copy the full SHA
    8c02d71 View commit details
    Browse the repository at this point in the history