Repository navigation
brochure 1.0.0
First tagged release. {brochure} has been installable from GitHub since 2020;
this is the point where the API is stable enough to be pinned.
Routing is rewritten on top of {routr},
which brings parameterised routes and per-method pages, and fixes a family of
bugs that came from keeping the current page in shared state.
Highlights
- Parameterised routes, read with
get_keys()— with no argument inside a
pageserver, andget_keys(request)inside a pageui. - Per-method pages:
page()andredirect()take amethod, so a page can
answer on something other thanGET. - Request and response middleware actually run.
req_handlersand
res_handlerspassed topage()were stored and never called, which made the
documented/healthcheckendpoint and the per-page cookies of the README
silent no-ops. - Deployment behind a prefix works, whether the proxy strips the mount
(Posit Connect, nginx with a trailing slash) or passes it through (ShinyProxy,
proxy_passwithout one).basepathis now removed from the incoming path,
as documented, and not only prepended to the urls the app emits. - Cookies are safer by default:
set_cookie()defaults to
http_only = TRUEandsame_site = "Lax",remove_cookie()takespathand
domain, and everything interpolated into a header or aLocationis
validated. - Seven vignettes and a pkgdown site — getting started, handlers, cookies,
design, deployment, testing, and building a brochure app as a{golem}
package.
The bug worth calling out
Two people browsing two different pages of the same app could each run the
other's server. The matched page was kept in a single per-app environment,
written by the http handler and read back when the websocket opened. The page is
now resolved per request in the ui, and per session in the server.
Breaking changes
keysis gone — useget_keys(). The old object was installed in the global
environment, shadowed any user object of that name, and was invisible from a
module, a golem app or anylocal().set_cookie()defaults changed (see above); passhttp_only = FALSEor
same_site = NULLfor the previous header.set_cookie(),remove_cookie()andserver_redirect()reject values they
used to interpolate as is....inbrochureApp()no longer accepts anything: pages, redirects, tags,
tag lists, html dependencies and strings only. A bare list of pages is now
spliced instead of being injected into every page.
Installation
remotes::install_github("ColinFay/brochure@v1.0.0")Full changelog: NEWS.md
What's Changed
- Redirection, Close #4 by @ColinFay in #6
- Close #5 by @ColinFay in #8
- Get and set cookies, will close #7 by @ColinFay in #10
- allow redirect by @ColinFay in #14
- middleware implementation by @ColinFay in #16
- close #15 by @ColinFay in #17
- better handling of backslash in page name by @ColinFay in #19
- handlers can be passed as formulas by @ColinFay in #21
- refactor the way apps are built by @ColinFay in #23
- cookie handlers, close #26 by @ColinFay in #27
- With golem templates by @ColinFay in #30
- Redoc + clarification of how
...are handled by @ColinFay in #38 - feat: back to shiny::tagList for wrapped in brochureApp by @ColinFay in #50
- fix(brochureApp): small fix on request handling by @abelborges in #41
- fix: subroute now work by @ColinFay in #52
- brochure 1.0.0: routr routing, per-session pages, and a documented API by @ColinFay in #56
New Contributors
- @ColinFay made their first contribution in #6
- @abelborges made their first contribution in #41
Full Changelog: https://github.com/ColinFay/brochure/commits/v1.0.0