Closed johnnychen94 closed 4 years ago
Merging #66 into master will decrease coverage by
0.47%
. The diff coverage is80.76%
.
@@ Coverage Diff @@
## master #66 +/- ##
==========================================
- Coverage 91.74% 91.27% -0.48%
==========================================
Files 14 14
Lines 654 676 +22
==========================================
+ Hits 600 617 +17
- Misses 54 59 +5
Impacted Files | Coverage Δ | |
---|---|---|
src/generate.jl | 81.66% <60.00%> (-1.38%) |
:arrow_down: |
src/types/page.jl | 96.25% <90.90%> (-0.98%) |
:arrow_down: |
src/preview.jl | 93.54% <100.00%> (+0.36%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update a2481fc...4c3b384. Read the comment docs.
Two improvements:
makedemos
APIpreview_demos
usageunify
makedemos
API64 introduces a new way of how demos are navigated, which I call "themeless". The downside of it is that
makedemos
becomes more complex to configure, this PR unifies how themeless and themed versions are used, and make it even simpler.Previous:
Now:
The page theme is configured via
config.json
file, for example:Currently,
"theme"
can be one of"grid"
,"list"
or"nothing"
, where"nothing"
represents the themeless case. If you don't configure"theme"
, it would defaults tonothing
.Simplify
preview_demos
usagePreviously, we have to manually write
preview_demos("examples", theme="grid")
to preview a grid-like demos.Now, it will infer the theme from
config.json
, and if that's already configuredgrid
,preview_demos("examples")
would just work out of the box.preview_demos("examples", theme="list")
would instead override the "grid" theme in "config.json" -- I made it so because if the user explicitly passes a keyword totheme
, I believe he knows what he's expecting.It's a bit hard to add deprecation tests for this, I've tested it locally that the old way still works. I'd save myself a bit of time and skip that step. 😂 The coverage regression isn't problematic.