gnolang / gno

Gno: An interpreted, stack-based Go virtual machine to build succinct and composable apps + gno.land: a blockchain for timeless code and fair open-source.
https://gno.land/
Other
898 stars 374 forks source link

feat: add r/docs/home #3160

Closed moul closed 2 days ago

moul commented 3 days ago

Introducing the r/docs namespace, where the homepage currently lists subrealms manually. In the future, we may implement a registry, but for now, we’re keeping the source code as lean as possible. The namespace includes several interactive examples to guide users through key concepts.

The r/docs/hello example provides a simple Render function and invites users to click on "view source" to understand the basics of customization. The r/docs/avl_pager example demonstrates path-based interactions, allowing users to explore an avl tree structure with pagination links to navigate between items. Users are encouraged to click on these links for inspiration before manually adjusting parameters in the URL. The added r/docs/add example introduces interactivity through transactions, allowing users to adjust a number by submitting transactions, and see the updated result with each interaction.

These examples are designed to engage users with Render-based UI interactions, path handling, and transaction-based updates. Once we have more content in r/docs, this section could serve as the main documentation link in the navbar, providing a comprehensive, hands-on introduction to Gno.

Addresses #3084 Addresses https://github.com/gnolang/docs-v2/pull/27#discussion_r1848481556 Addresses #2953

codecov[bot] commented 3 days ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 63.79%. Comparing base (b3800b7) to head (ba3ff33). Report is 3 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #3160 +/- ## ========================================== - Coverage 63.80% 63.79% -0.01% ========================================== Files 549 549 Lines 78833 78833 ========================================== - Hits 50301 50294 -7 - Misses 25143 25149 +6 - Partials 3389 3390 +1 ``` | [Flag](https://app.codecov.io/gh/gnolang/gno/pull/3160/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=gnolang) | Coverage Δ | | |---|---|---| | [contribs/gnodev](https://app.codecov.io/gh/gnolang/gno/pull/3160/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=gnolang) | `61.16% <ø> (ø)` | | | [contribs/gnofaucet](https://app.codecov.io/gh/gnolang/gno/pull/3160/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=gnolang) | `15.77% <ø> (+0.94%)` | :arrow_up: | | [gno.land](https://app.codecov.io/gh/gnolang/gno/pull/3160/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=gnolang) | `73.70% <ø> (ø)` | | | [gnovm](https://app.codecov.io/gh/gnolang/gno/pull/3160/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=gnolang) | `67.94% <ø> (ø)` | | | [misc/genstd](https://app.codecov.io/gh/gnolang/gno/pull/3160/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=gnolang) | `79.72% <ø> (ø)` | | | [tm2](https://app.codecov.io/gh/gnolang/gno/pull/3160/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=gnolang) | `62.27% <ø> (-0.11%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=gnolang#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


🚨 Try these New Features:

leohhhn commented 2 days ago

We should have a "root" README for the demo, sys, gov, docs namespaces. This would be displayed when users look up the namespace root, ie gno.land/r/docs/, apart from some other info, like the list of pkgs, number, etc (tbd with gnoweb2).

I can help bootstrap these files if needed. They're meant to give context to the users about what the namespace is for.

Also, all/most r/docs realms would correspond to a specific package, concept, usage; we should reference those when it makes sense; maybe as a doc.gno giving a brief overview apart from the code itself.