-
Notifications
You must be signed in to change notification settings - Fork 2
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
add wrapper function for reactable #87
base: main
Are you sure you want to change the base?
Conversation
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.
Handful of things just to make it clear to end users how it's expected to be used and how it looks:
- Add a shinyapp style example in @examples
- Add a page with a dfe_reactable in the test dashboard (tests/test_dashboard/ui.R)
Also, dfe_reactable needs adding to the reference contents in _pkgdown.yml. Probably needs a new section, maybe "Charts and tables".
Finally, I think the following means that if you're going to document the params, then they should also be included in line 74. So I think for each one, we either remove the @params entry or add the param name on line 74.
- checking Rd \usage sections ... WARNING
Warning: Documented arguments not in \usage in Rd file 'dfe_reactable.Rd':
‘columns’ ‘columnGroups’ ‘rownames’ ‘groupBy’ ‘sortable’ ‘filterable’
‘searchable’ ‘searchMethod’ ‘defaultColDef’ ‘defaultColGroup’
‘defaultSortOrder’ ‘defaultSorted’ ‘pagination’ ‘defaultPageSize’
‘showPageSizeOptions’ ‘pageSizeOptions’ ‘paginationType’
‘showPagination’ ‘showPageInfo’ ‘minRows’ ‘paginateSubRows’ ‘details’
‘defaultExpanded’ ‘selection’ ‘defaultSelected’ ‘onClick’ ‘striped’
‘compact’ ‘wrap’ ‘class’ ‘style’ ‘rowClass’ ‘rowStyle’ ‘width’
‘height’ ‘meta’ ‘elementId’ ‘static’ ‘selectionId’
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.
Thanks, that's helpful being able to see it in the test dashboard now. I think we should try and tie it in to the standard GDS CSS, so just a handful of suggestions on where to do that and then I think we're there.
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.
Thanks, just about there now I think. Just a few small suggestions and then I think we're good.
Co-authored-by: Rich Bielby <[email protected]>
Co-authored-by: Rich Bielby <[email protected]>
Co-authored-by: Rich Bielby <[email protected]>
@@ -15,4 +15,8 @@ | |||
input_cookies = shiny::reactive(input$cookies), | |||
google_analytics_key = ga_key # nolint: [object_usage_linter] | |||
) | |||
|
|||
output$reactable_example <- reactable::renderReactable( | |||
dfe_reactable(mtcars |> dplyr::select("mpg", "cyl", "hp", "gear")) |
Check notice
Code scanning / lintr
Indentation should be 4 spaces but is 5 spaces. Note test
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.
Looks like it just needs styler::style_dir()
running and then it's good to go.
Brief overview of changes
Added a new
dfe_reactable
function to the dfeshiny package, which serves as a pre-configured wrapper around thereactable::reactable
function. This function simplifies the creation of interactive and accessible tables with default styling and configurations tailored to Department for Education requirements.Why are these changes being made?
This change is being made to standardize the use of interactive tables across applications developed with dfeshiny, ensuring consistent design, accessibility, and functionality. It reduces repetitive coding for developers and provides users with a clean, user-friendly experience when viewing data in table formats.
Detailed description of changes
Introduced a
dfe_reactable
function, which:reactable
tables, including row highlighting, borderless design, and full-width tables.NA
values.Added a unit test to validate the structure and configuration of the
reactable
object produced by thedfe_reactable
function. This includes:highlight
,borderless
, andcolumns
.Additional information for reviewers
highlight
,borderless
) but allows passing additional arguments through the...
parameter for advanced use cases.Issue ticket number/s and link
Closes #73