-
Notifications
You must be signed in to change notification settings - Fork 393
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(gnoweb): "No render" page/component #3611
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 ReportAttention: Patch coverage is
📢 Thoughts on this report? Let us know! |
No render
page/component
No render
page/componentThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested this PR branch on my local machine. Indeed, if there is no Render
function, gnoweb shows "This realm does not implement a Render() function." All tests pass (except "Merge requirements" as usual). Ready for a core dev to decide if this change is wanted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a test in handler_test.go
please 🙏 , you can use something like TestWebHandler_NoRender
Description
Defining a
Render()
function in realms is optional. Currently gnoweb presents an error if a realm that doesn't have a render func is requested. This should not be the case.This PR also adds a VM error,
RenderNotDeclared
, which is to be returned whenvm/qrender
is called on a realm which does not have aRender()
function declared.I updated the status component to return the following in the aforementioned case:
![Screenshot 2025-01-25 at 16 30 55](https://private-user-images.githubusercontent.com/33522493/406671197-dc82c1d6-d815-4d92-a1a9-7639cbf7bca2.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1NTEyNzYsIm5iZiI6MTczOTU1MDk3NiwicGF0aCI6Ii8zMzUyMjQ5My80MDY2NzExOTctZGM4MmMxZDYtZDgxNS00ZDkyLWExYTktNzYzOWNiZjdiY2EyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE0VDE2MzYxNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTgyMGYwNGQ5Y2E1YWZlOGI0YmRmNjliMzQ1M2M2N2U5ODgwNDJhY2NjNmZkMWI1MzgwYzNiNzQyNDAwOGI3YTcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.Dc3FZO08rt6JHeLhfPVzXRhrvS_M5bJ97i7COuG2SLE)
Also adds another
r/docs
realm mentioning that a render function is optional inr/
.