Closed upsiflu closed 11 months ago
Ideas:
type Region = Toc | Main | Control | Output
In the view, we have a series of chapters. Each has associated md
at Main and is wrapped in a goTo
at Toc. In addition, togglebuttons may appear in the Toc under active pages.
The Control region would have filters and filtered lists in the first chapter, and the shapes in the second chapter.
The output region could appear just as we bring in elm-multitool and url-codec.
We can make very type-centric modules.
Perhaps we don't use shapes as examples but the md
texts and examples that are displayed anyways. We could bring in elm-rte into the control for good measure... fun! In that case, the chapters go into the model and can be rearranged through elm-any-type-forms, and we can watch the Ui adapt in realtime. And we could have fulltext search!
A self-explaining example.
import markdown
import Less
main =
Less.application
{ init = init
, update = update
, view =
Less.mapDocument identity
{ body =
Ui.singleton (md ```import markdown import Less etc.```)
, layout = Less.Ui.Html.layout
, title = "Less Ui feature test"
}
}
view = goTo { "chapter1" } chapter1 ++ goTo { "chapter2" } chapter2 ++ (Explanation text |> at Main) |> toggle { "Table of Contents" } |> at Toc
chapter1 =
chapter3 = (List with search results in the Main + fulltext search for the chapters in the toc + some preset filters)
chapter4 = TODO: Nesting (for elm-any-type-forms/multitool)
It's live. :-)
Filter "q" [ viewToc... ]
Toggle "enable filter" [ Search "q" [List.concatMap viewToken >> at Toc]
Html
handle space separation:Situation: Examples have no obvious logic or progression
Would be nice: Either an overview of all features or some sort of progressive tutorial, or both.
Nice example:
Questions:
Scope of examples:
view
show in multiple regionsNest
a widget (example:elm-any-type-form
) and persist the model stateControl.view
s with your own property sheetselm-multitool