-
Notifications
You must be signed in to change notification settings - Fork 9
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
PLEASE REVIEW - 0.4 Release Candidate #61
Comments
Would you be interested in using doctest-parallel for the non-embeded examples? I would be happy to set it up. |
First, thanks for your awesome work and craft you did with hyperbole. Not necessarily for 0.4.0 release, but here’s my take on the current state:
To which specifics do you want feedback? |
Argh, I totally forgot to update all the embedded examples for 0.4. The point of bin/docgen and the embedded examples was to make it so out-of-date documentation doesn't compile. Is that redundant with doctest-parallel? If so, should we just port all the inline examples to embedded ones, or is there a reason to use doctest-parallel instead? |
I've been incorporating your feedback into the docs. Note that I stopped calling anything "components" in the latest version. Please feel free to create a PR with anything you think would help. I'd prefer to keep PRs small unless we need to discuss a major effort. What do you mean by incorporate the tutorial into a PR? I'd be happy to feature a link to a tutorial you author.
I think 0.4 has been delayed enough. Let's get it out without a visual aid. I'm open to creating one, but let's discuss that elsewhere.
Can you make a list of which ones you thought were most helpful? I've tried to incorporate some of your questions into the introduction on hackage.
Did you see the Data Table Example I added this morning? Does that help?
Is this as simple as a monospaced font and
Open an issue for this? Might be a use case for #25 |
I recommend we use a combination of both, since at their core they are designed for different purposes. My only suggestion would be to add a module embed, that way the whole example is type checked. For example:
Each We can use
Or for short functions:
The 0.4 release does not have to wait until we add |
Nice! I've opened a few very minor PRs and will keep checking it out for a bit longer but it's looking good in my opinion! :) |
@seanhess I am trying to just factor out a static view. What's needed to make it result in a {-# OPTIONS_GHC -Wno-missing-signatures #-}
module Example.Intro.BasicPage where
import Web.Hyperbole
import Web.Hyperbole.HyperView
import Web.Hyperbole.Effect.Handler
main = do
run 3000 $ do
liveApp (basicDocument "Example") (loadToResponse messagePage')
{-
messagePage :: Eff es (Page '[])
messagePage = do
pure $ do
col (pad 10) $ do
el bold "Hello World"
-}
staticView :: (ViewId id) => id -> View id () -> View ctx ()
staticView vid = el (att "id" (toViewId vid) . flexCol) . addContext vid
messagePage' :: Eff es (Page '[Message])
messagePage' = pure $ staticView Message messageView
data Message = Message
deriving (Show, Read, ViewId)
messageView :: View Message ()
messageView =
col (pad 10) $ do
el bold "Hello World" So, either I am not aware of what builtin functionality should do what I need (then how should it be documented?) OR the functionality for static views does not exist. If the functionality (for pages with only using static views) does not exist:
In any way, this was the reason why I felt forced to use HyperViews where I didn't need independent updatable views! |
Sounds great. We DO need to get the inline examples updated for 0.4 before release. Why don't we do that first, then create a PR after with the doctest-parallel to see what it adds. |
@benjaminweb It sounds like you're running in to out-of-date inline documentation. loadToResponse doesn't exist anymore. I'll get that updated pronto. Here's the basic example from Example.Intro.BasicPage:
Page is just a type alias for a "root view".
So the messagePage function is expected to return a view that matches it's context:
|
@benjaminweb would it be easier to understand if we changed the name of It would make the type signature of pages more complicated, but more explicit and clear.
Then it might be more obvious how to make a static view:
|
Created #67.
Incorporated into the paragraphs with #64, yet not included in the docstrings themselves. Also see the definition list under Entities (in the generated docs).
Created #66.
Additionally: TODO:
|
Hey all, @sfwc @kfigiela @benjaminweb @Skyfold @cgeorgii @tusharad
0.4 is ready, with all our latest changes and lots of new documentation.
https://hackage.haskell.org/package/hyperbole-0.4.2/candidate/docs/Web-Hyperbole.html
Make sure to check out the new examples site if you haven't seen it yet
https://docs.hyperbole.live
Please review if you have time, and let me know if you notice any issues, big or small.
Thanks for all your help and contributions!
TODO
The text was updated successfully, but these errors were encountered: