Skip to content

Conversation

@glsdown
Copy link
Contributor

@glsdown glsdown commented Aug 23, 2021

A number of tests are failing on the docs so I've been working through them to understand whether they are failing because of the test or the component. I've also done some tidying up to (hopefully) make it easier to find the components, and ensure everything is formatted correctly.

I noticed that the testing package versions for JS that are being used are really out of date, so I tried to update them initially as a fix for tooltip failing, but this caused the Input and TextArea components to consistently fail. I reverted back to the original versions.

Javascript component tests

  • accordion
  • alert
  • badge
  • breadcrumb
  • button
  • button_group
  • card
  • carousel
  • collapse
  • dropdownmenu - warning given, but tests pass: see note
  • fade
  • form
  • input
  • input_group
  • layout
  • list_group
  • modal
  • nav
  • navbar
  • offcanvas
  • pagination
  • popover - warning originally given, but tests pass: see note
  • progress
  • spinner
  • table
  • tabs
  • toast
  • tooltip - not working as expected in the docs either

Snippet layout tests

Check each component passes test_snippets.py and update components or tests as required.

  • accordion
  • alert
  • badge
  • breadcrumb
  • button
  • button_group
  • card
  • carousel
  • collapse
  • dropdown
  • fade
  • form
  • input
  • input_group
  • layout
  • list_group
  • modal
  • nav
  • navbar
  • offcanvas
  • pagination
  • popover
  • progress
  • spinner
  • table
  • tabs
  • toast
  • tooltip

Callback tests

Check each component passes test_{component}.py and update components or tests as required.

  • accordion
  • alert
  • button
  • button_group
  • carousel - this auto advances with R and Julia. I think setting interval=None is the thing that stops it advancing in python, but the equivalents in R (NULL) and julia (nothing) don't do the same thing (also tried with 0, and that didn't work either).
  • collapse
  • dropdown
  • fade
  • form
  • input
  • input_group
  • list_group
  • modal - R/JL callbacks not working for size but I'm unsure why as the python one does, and I can't see there are any functional differences
  • nav
  • navbar
  • offcanvas - issues as using the version of bootstrap that has the backdrop in front of the offcanvas so all tests will fail - need to get this fixed by react-bootstrap (appears to be a closed PR 2 days ago so shouldn't be long now)
  • pagination
  • popover - It doesn't appear that the component ID is being passed to the element on the page which is why the tests themselves are failing here, although even if the tests were working, it seems to respond differently to bools in JL as doesn't react to 0 and 1, but does to explicit true/false, however, can't narrow down what is causing the callbacks to fail.
  • progress
  • spinner
  • tabs
  • toast

Component landing page / instructions

@tcbegley requested that on clicking on the components link, rather than seeing the first component, it instead goes to an overview of how the pages work. I have added a temporary placeholder for this for now, but the details will need populating properly by Tom.

  • Component landing page / instructions placeholder
  • Component landing page / instructions properly populated

Formatting tools

Not sure how to add these, but want to include them to be able to quickly format the doc snippets and make sure they are consistently formatted.

Also worth adding to linters (JuliaFormatter returns false if the docs need formatting). lintr looks like it is useful for R.

  • julia autoformatter
julia
using Pkg
Pkg.add("JuliaFormatter")
using JuliaFormatter
format("docs")
  • R autoformatter
R
library(styler)
style_dir("docs")

tcbegley and others added 30 commits August 13, 2021 21:42
* Added offcanvas components

* Offcanvas doc snippets

* Added offcanvas documentation

* Fixed long text issue

* Added react-bootstrap

* Added offcanvas

* Added offcanvas tests

* Added js tests for offcanvas

* Addition of new pagination component

* Combined offcanvas into single component

* Formatting

* ABetter handling of pagination component

* Updated pagination docs

* Removed invalid code

* Updated npm demo to Bootstrap 5

* Updated pagination docs to include R and jl

* Updated pagination tests

* Fixed callbacks

* Reverted to 5.0.2 to avoid issues with offcanvas backdrop until resolved

* Fixed offcanvas tests

* Tidy up
* Accordion component and js test

* Added documentation for accordion

* R and Julia examples

* Fixed h2 formatting issues

* Added accordion folder for flake8

* Update demo/Demo.js

Co-authored-by: glsdown <52132406+glsdown@users.noreply.github.com>

Co-authored-by: Tom Begley <tomcbegley@gmail.com>
* Updated list-group component

* Updated list-group docs
@glsdown glsdown mentioned this pull request Aug 23, 2021
73 tasks
Base automatically changed from react-bootstrap to v1 August 24, 2021 06:49
@tcbegley
Copy link
Collaborator

@glsdown I've rebased on v1 having merged react-bootstrap. I think it's all fine, but worth checking that I haven't broken anything.

@glsdown glsdown changed the title Tidy and repair Tidy and repair for v1 Aug 24, 2021
@glsdown
Copy link
Contributor Author

glsdown commented Aug 24, 2021

Still outstanding

Callback tests failing for docs:

  • carousel - this auto advances with R and Julia. I think setting interval=None is the thing that stops it advancing in python, but the equivalents in R (NULL) and julia (nothing) don't do the same thing (also tried with 0, and that didn't work either).
  • modal - R/JL callbacks not working for size but I'm unsure why as the python one does, and I can't see there are any functional differences
  • offcanvas - issues as using the version of bootstrap that has the backdrop in front of the offcanvas so all tests will fail - need to get this fixed by react-bootstrap (appears to be a closed PR 2 days ago so shouldn't be long now)
  • popover - It doesn't appear that the component ID is being passed to the element on the page which is why the tests themselves are failing here, although even if the tests were working, it seems to respond differently to bools in JL as doesn't react to 0 and 1, but does to explicit true/false, however, can't narrow down what is causing the callbacks to fail.

Other:

  • Populate landing page for components - in docs/components_page/components/main.md
  • Add R/Julia formatters and linting

@glsdown glsdown marked this pull request as ready for review August 24, 2021 20:27
@tcbegley tcbegley merged commit dd6c015 into v1 Aug 24, 2021
@tcbegley tcbegley deleted the tidy-and-repair branch August 24, 2021 20:32
tcbegley added a commit that referenced this pull request Sep 5, 2021
* Alert

* Badge

* Button

* ButtonGroup

* Carousel

* Collapse

* Fade

* Add shim for html components that don't have class_name defined yet

* Update block button docs

* Update docs for Bootstrap 5

* RIP Jumbotron

* Add react-bootstrap beta

* Layout

* Docs fix

* Label

* Clean up example

* Monkeypatch doc tests

* New components - Offcanvas and pagination (#643)

* Added offcanvas components

* Offcanvas doc snippets

* Added offcanvas documentation

* Fixed long text issue

* Added react-bootstrap

* Added offcanvas

* Added offcanvas tests

* Added js tests for offcanvas

* Addition of new pagination component

* Combined offcanvas into single component

* Formatting

* ABetter handling of pagination component

* Updated pagination docs

* Removed invalid code

* Updated npm demo to Bootstrap 5

* Updated pagination docs to include R and jl

* Updated pagination tests

* Fixed callbacks

* Reverted to 5.0.2 to avoid issues with offcanvas backdrop until resolved

* Fixed offcanvas tests

* Tidy up

* Progress

* Format tests

* Spinner

* Table

* Toast

* New component Accordion (#645)

* Accordion component and js test

* Added documentation for accordion

* R and Julia examples

* Fixed h2 formatting issues

* Added accordion folder for flake8

* Update demo/Demo.js

Co-authored-by: glsdown <52132406+glsdown@users.noreply.github.com>

Co-authored-by: Tom Begley <tomcbegley@gmail.com>

* flake8 config

* List group updated to Bootstrap 5 (#647)

* Updated list-group component

* Updated list-group docs

* Bug fixes

* Tabs

* Form

* Form updates + examples

* Checklist / RadioItems

* Select

* themes

* BS5 updates for docs

* Fix doc tests

* InputGroup

* Fix JS tests

* Checkbox/Radio

* format js

* Modal

* Modal docs

* Fix format command

* Card, Nav and Navbar (#648)

* Monkeypatch doc tests

* Card

* Nav and NavBar  Update to Collapse to remove navbar prop

* fixed Card.test.js for Card body test

* updated docs for Navbar example.
Also updated julia and R snippets

* updates to Navbar and Collapse after review

* updated index for deleted NavbarCollapse

* lint and black

Co-authored-by: tcbegley <tomcbegley@gmail.com>

* DropdownMenu

* NavbarToggler

* Tooltip+Popover

* Consistent imports

* Fix accordion tests

* Initial breadcrumb component

* Set accordion to first component

* Format code

* Update Breadcrumb

* Snippet test fixes for breadcrumb

* Moved js components into individual folders

* Fixes for layout and callback tests

* Formatting of R and julia snippets

* Updated js testing libraries

* Added recommended hack for react testing

* Removed dup test and updated

* Carousel improvements

* Reverted to older testing packages

* Added component landing page

* Removed callback from accordion & pagination simple

* Removed accordion from collapse

* Added listgroup flush example

* Fixed accordion and pagination examples

* Added coloured table

* Added dark variant carousel

* Added Table from multi-level dataframe

* Added multi input_group addons

* Fixed issues with badge examples

* Docs first section to Examples

* Clean-up Tooltip code + tests

* Revert version numbers

* Format

* Update setup.cfg

* Tidy up following merge

Co-authored-by: glsdown <gemmalsdown@icloud.com>
Co-authored-by: tcbegley <tomcbegley@gmail.com>
Co-authored-by: AnnMarieW <72614349+AnnMarieW@users.noreply.github.com>
tcbegley added a commit that referenced this pull request Oct 19, 2021
* Alert

* Badge

* Button

* ButtonGroup

* Carousel

* Collapse

* Fade

* Add shim for html components that don't have class_name defined yet

* Update block button docs

* Update docs for Bootstrap 5

* RIP Jumbotron

* Add react-bootstrap beta

* Layout

* Docs fix

* Label

* Clean up example

* Monkeypatch doc tests

* New components - Offcanvas and pagination (#643)

* Added offcanvas components

* Offcanvas doc snippets

* Added offcanvas documentation

* Fixed long text issue

* Added react-bootstrap

* Added offcanvas

* Added offcanvas tests

* Added js tests for offcanvas

* Addition of new pagination component

* Combined offcanvas into single component

* Formatting

* ABetter handling of pagination component

* Updated pagination docs

* Removed invalid code

* Updated npm demo to Bootstrap 5

* Updated pagination docs to include R and jl

* Updated pagination tests

* Fixed callbacks

* Reverted to 5.0.2 to avoid issues with offcanvas backdrop until resolved

* Fixed offcanvas tests

* Tidy up

* Progress

* Format tests

* Spinner

* Table

* Toast

* New component Accordion (#645)

* Accordion component and js test

* Added documentation for accordion

* R and Julia examples

* Fixed h2 formatting issues

* Added accordion folder for flake8

* Update demo/Demo.js

Co-authored-by: glsdown <52132406+glsdown@users.noreply.github.com>

Co-authored-by: Tom Begley <tomcbegley@gmail.com>

* flake8 config

* List group updated to Bootstrap 5 (#647)

* Updated list-group component

* Updated list-group docs

* Bug fixes

* Tabs

* Form

* Form updates + examples

* Checklist / RadioItems

* Select

* themes

* BS5 updates for docs

* Fix doc tests

* InputGroup

* Fix JS tests

* Checkbox/Radio

* format js

* Modal

* Modal docs

* Fix format command

* Card, Nav and Navbar (#648)

* Monkeypatch doc tests

* Card

* Nav and NavBar  Update to Collapse to remove navbar prop

* fixed Card.test.js for Card body test

* updated docs for Navbar example.
Also updated julia and R snippets

* updates to Navbar and Collapse after review

* updated index for deleted NavbarCollapse

* lint and black

Co-authored-by: tcbegley <tomcbegley@gmail.com>

* DropdownMenu

* NavbarToggler

* Tooltip+Popover

* Consistent imports

* Fix accordion tests

* Initial breadcrumb component

* Set accordion to first component

* Format code

* Update Breadcrumb

* Snippet test fixes for breadcrumb

* Moved js components into individual folders

* Fixes for layout and callback tests

* Formatting of R and julia snippets

* Updated js testing libraries

* Added recommended hack for react testing

* Removed dup test and updated

* Carousel improvements

* Reverted to older testing packages

* Added component landing page

* Removed callback from accordion & pagination simple

* Removed accordion from collapse

* Added listgroup flush example

* Fixed accordion and pagination examples

* Added coloured table

* Added dark variant carousel

* Added Table from multi-level dataframe

* Added multi input_group addons

* Fixed issues with badge examples

* Docs first section to Examples

* Clean-up Tooltip code + tests

* Revert version numbers

* Format

* Update setup.cfg

* Tidy up following merge

Co-authored-by: glsdown <gemmalsdown@icloud.com>
Co-authored-by: tcbegley <tomcbegley@gmail.com>
Co-authored-by: AnnMarieW <72614349+AnnMarieW@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants