-
Notifications
You must be signed in to change notification settings - Fork 375
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: v0 web package with routing/rendering/utility functions #866
Conversation
Self-reviewing after a couple days either afk or delving into umpteen other half-baked starts on packages: this needs better/any encapsulation in the core structs. Part of the reasoning for public everything was admittedly just laziness/wanting to see things work, while part was an active choice wanting to enable devs to steal whatever pieces of this they want to use without having to adopt it all, abusing all fields as they see fit... but also... that could be bad if not leveraged properly, and IMO the interface is likely close-enough to being able to service all above-board needs that I feel like I've been too open with the core-struct fields and should likely tighten that up before this is accepted into main. The example having public renderers (ie: the See: #869 for a question I have re: |
I'm currently working on the router feature in PR #882, as it was on my to-do list. Regarding the framework, you have the flexibility to choose between a monolithic approach or reusing generic parts. Just keep in mind that the "web" keyword is valuable, and we may need to find a more unique name if necessary, at least while we share the Right now, I suggest continuing with your preferred approach. When you believe there's enough material for a feedback round, let me know (remove the draft status). Feel free to provide review instructions at that time. |
Finally had a chance to comb through #882. Interesting timing/interesting seeing the similarities/differences between your PR and the Router in this :) Re: the name, I'll noodle on a name change. The importance of FWIW, while this PR/package I'll likely keep using for personal realm dev projects and will aim to polish up/resubmit while I do, I'm finding I run into more situations where a FSM (like #856) would be handy (have a MQ thing in the works, along with an "upkeep" construct, neither of which care yet about web, but both which would benefit from a FSM). Are there any FSM todos/packages I might have missed already being used/worked on? |
Closing as draft for 1yr+. You're welcome to re-open to continue it. |
Description
I noticed routing for the moment in realms is handled mostly with ad-hoc if statements and had a bit more complex needs for the commune hacking now tracked on the commune-realms branch, so I've rolled a simple
web
package aiming to simplify handling gnoweb requests. Includes aTemplater
renderer that supports per-key sub Renderers, allowing for things like globally defined custom renderers for keys likeusername
orpostURL
, etc.Contributors Checklist
ThingsRouter
are present inweb_test
. Could use more coverage after feature scope creep.Example usage copy pasted from README: