-
Notifications
You must be signed in to change notification settings - Fork 69
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
docs: Use definition lists for parameter descriptions to enable full markdown support be #901
Conversation
This allows markdown in the parameter documentation to be rendered correctly.
I'm super curious about the lingering character quarto is adding?! I'm going to work on bringing in support for list-style parameter tables, similar to https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.html#pandas.DataFrame WDYT of that style for parameters / table-y things? (obv for down the road, this PR is beautiful) |
Oh! I love this idea. Personally, I prefer this approach over using tables for parameters. On our website it might look something like this. BeforeAfter |
Oh wow, that was fast! @has2k1 has definition lists implemented in plotnine for his quarto migration too: https://has2k1.github.io/plotnine/reference/geom_bar.html#plotnine.geoms.geom_bar I'll try and add an option for these in the next few days in quartodoc, based on all y'all's work! |
@schloerke thanks to Michael's suggestion, I tried definition lists and think they're a big improvement. The custom writer here works and this PR is ready to merge after your review. I did try upgrading to quartodoc 0.7.2 and griffe 0.33 to see if we could use
Thanks to @has2k1, the fix to upgrade to griffe 0.33 was easy! |
…t to write parameters
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
In a followup PR, please look at how the styling for the code in the definition term has changed from before to the new look. It also looks like all of the fonts are of a heavier weight
That's the difference between the dev docs and the released/published docs |
* main: (24 commits) docs: Use definition lists for parameter descriptions to enable full markdown support (#901) docs(layout_columns): Add example app (#903) fix(layout_columns): Remove use of enum for breakpoints (#912) Express: don't automatically put strings in a `<pre>` block (#905) Deprecate `nav()` in favor of `nav_panel()` (#876) chore: Remove unused import refactor(layout_column_wrap): Use helper for wrapping children (#910) fix(layout_columns): Don't apply fillable class to layout container (#909) Add output to React template (#908) fix(layout_columns): Add missing `bslib-mb-spacing` class (#906) Custom component template updates (#874) fix(layout_columns): If the breakpoint name is an enum, need to collect the value (#902) chore: exclude `_dev/` folder (#897) feat: Add `ui.layout_columns()` (#856) Update VS Code settings file Express: change default page function to page_fixed (#892) Better messages for `AttributeError` in Shiny Express (#888) Fix 0.6.0 release date Fix failing express tests (#887) Explain why function is called twice ...
* main: (76 commits) Add shiny/templates to MANIFEST.in files (#926) docs: Function Reference Proofreads (#919) Fix failing deploy tests (#925) Add GitHub sources to shiny create Make changelog styling more consistent Function reference edits (#857) docs: Use definition lists for parameter descriptions to enable full markdown support (#901) docs(layout_columns): Add example app (#903) fix(layout_columns): Remove use of enum for breakpoints (#912) Express: don't automatically put strings in a `<pre>` block (#905) Deprecate `nav()` in favor of `nav_panel()` (#876) chore: Remove unused import refactor(layout_column_wrap): Use helper for wrapping children (#910) fix(layout_columns): Don't apply fillable class to layout container (#909) Add output to React template (#908) fix(layout_columns): Add missing `bslib-mb-spacing` class (#906) Custom component template updates (#874) fix(layout_columns): If the breakpoint name is an enum, need to collect the value (#902) chore: exclude `_dev/` folder (#897) feat: Add `ui.layout_columns()` (#856) ...
* main: (36 commits) Add shiny/templates to MANIFEST.in files (#926) docs: Function Reference Proofreads (#919) Fix failing deploy tests (#925) Add GitHub sources to shiny create Make changelog styling more consistent Function reference edits (#857) docs: Use definition lists for parameter descriptions to enable full markdown support (#901) docs(layout_columns): Add example app (#903) fix(layout_columns): Remove use of enum for breakpoints (#912) Express: don't automatically put strings in a `<pre>` block (#905) Deprecate `nav()` in favor of `nav_panel()` (#876) chore: Remove unused import refactor(layout_column_wrap): Use helper for wrapping children (#910) fix(layout_columns): Don't apply fillable class to layout container (#909) Add output to React template (#908) fix(layout_columns): Add missing `bslib-mb-spacing` class (#906) Custom component template updates (#874) fix(layout_columns): If the breakpoint name is an enum, need to collect the value (#902) chore: exclude `_dev/` folder (#897) feat: Add `ui.layout_columns()` (#856) ...
Fixes #900
This PR brings full markdown support for parameter descriptions in the py-shiny docs. We originally tried using a grid table for writing the parameters table (and just for the parameters table), but I think definition lists are much easier to read.
This PR also adds some CSS to the dev docs to nudge the spacing of the definition list. We'll need to make sure similar rules are applied to the primary docs when we do our next release.
Updated documentation
ui.layout_columns()
ui.layout_column_wrap()
cc: check this out, @machow!