countdown
countdown copied to clipboard
[WIP] Python variant
Close #42
Translates countdown() and countdown_style() over to Python.
Also includes a restriction so that language-specific CI runs only when files in r/ or python/ change.
We currently have:
I'm not sure if there is an issue with how the HTMLDependency() is being registered; but, the countdown at the moment renders but is not clickable with .show() (I think this is the same as browsable()).
I pieced together the changes needed by looking at:
- https://github.com/posit-dev/py-htmltools/blob/a3a98259ee4c5164763a6f70b86e531c13a5bcc1/tests/test_deps.py
- https://github.com/posit-dev/py-htmltools/blob/a3a98259ee4c5164763a6f70b86e531c13a5bcc1/tests/test_html_document.py
- https://github.com/posit-dev/py-htmltools/blob/a3a98259ee4c5164763a6f70b86e531c13a5bcc1/tests/test_tags.py
Some useful examples of py-htmltools are over on py-shiny's website:
- Tags: https://shiny.posit.co/py/docs/ui-html.html
- HTMLDependency: https://shiny.posit.co/py/docs/custom-component-one-off.html#the-output_tabulator-function
Note: Tags in shiny.ui are just re-exports from htmltools: https://github.com/posit-dev/py-shiny/blob/6f4bf63b85587c7de2712505dc65a91036ec34a1/shiny/ui/init.py#L327-L356