feat(gnoweb): Add Source and Action button for realm explorer#5032
feat(gnoweb): Add Source and Action button for realm explorer#5032Davphla wants to merge 19 commits intognolang:masterfrom
Conversation
🛠 PR Checks SummaryAll Automated Checks passed. ✅ Manual Checks (for Reviewers):
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) ☑️ Contributor Actions:
☑️ Reviewer Actions:
📚 Resources:Debug
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
gno.land/pkg/gnoweb/handler_http.go
Outdated
| } | ||
|
|
||
| // Query the package documentation | ||
| jdoc, err := h.Client.Doc(ctx, pkgPath) |
There was a problem hiding this comment.
should we find a way to batch this query ?
gno.land/pkg/gnoweb/client_test.go
Outdated
| "github.com/stretchr/testify/assert" | ||
| ) | ||
|
|
||
| func TestHasRenderFunction(t *testing.T) { |
There was a problem hiding this comment.
would be nice to add more test (wrong number of param, wrong param type, ...)
gfanton
left a comment
There was a problem hiding this comment.
I like the source + action buttons, but the BatchDoc just for looking for a Render function seems inefficient; this will probably add latency to directory listing, especially . It would be more efficient to have this at the keeper level, but I'm not sure we want this to exist.
It would probably fine for a few realm, but right now directory listing can show hundred of package.
gno.land/pkg/gnoweb/client.go
Outdated
| if err := ctx.Err(); err != nil { | ||
| return nil, fmt.Errorf("%w: %s", ErrClientTimeout, err.Error()) | ||
| } |
There was a problem hiding this comment.
Remove this; it is not necessary at this point, as there is no blocking state.
|
@gfanton I simplified the PR. I remove the render icon feature, and clean duplicate / non-clean code. We can create another PR back later for this feature, as it is very costly for the little addition.
|

close: #5028