Skip to content
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

Interactive columns using DT default to 100 rows. #9

Open
john-harrold opened this issue Feb 26, 2023 · 3 comments
Open

Interactive columns using DT default to 100 rows. #9

john-harrold opened this issue Feb 26, 2023 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@john-harrold
Copy link
Owner

Can the default be changed to 100 rows? @billdenney.

@john-harrold john-harrold self-assigned this Feb 26, 2023
@john-harrold john-harrold added the enhancement New feature or request label Feb 26, 2023
@john-harrold
Copy link
Owner Author

I can make the default 100, I can also alter the selection. I'm wondering if I should try to make the default the maximum number of rows in the current table. Do you have any thoughts on the number number options? The default 10, 25, 50, and 100. I don't think 10 or 25 would be useful. So what I'm thinking about 50, 100 and max. And if any numbers are greater than max I remove them. So if the max was 75 I'd default to 75 and just give options of 50 and 75.

@billdenney
Copy link

I think of the default number of rows and the selection as a UI question. If a table is at the bottom of a page, then it can make sense to have it longer. If it's in the middle of other information, then it can make sense to be shorter. If the main purpose is to see the general format of the columns, then, shorter also makes sense to me. As an example, when I'm looking at a new dataset, I will often do head(data) to see what columns are there and how they're structured.

So, I think that the choices being 10 to 100 cover different purposes. And, the specific selection of default makes more sense in individual contexts. Summary result tables make sense to be longer (up to 100 or max rows); individual results make sense to be moderate length (10 to 50 rows), to me.

@john-harrold
Copy link
Owner Author

There are two different things here. First is how tables are broken up using the DT/interactive view. This is more for users to explore tables in the UI. This is what I'm talking about above.

This is independent of the other view with is the flextable/reporting view. For reporting we're not doing complicated documents. By this I mean tables with inline text aren't currently being supported. The assumption here is that tables (for Word reports) will be included as summary listings in an appendix type of situation. To do this we use the span_table function. What it does is it can take a large data frame and chop it up into a bunch of smaller tables to be reported on different pages. So a maximum number of rows and a max height is supplied. Similarly a maximum number of columns and widths is also supplied. Those values are used to determine how to break up the sub tables.

https://onbrand.ubiquity.tools/reference/span_table.html

Currently those values are just the defaults used here in ruminate:

https://github.com/john-harrold/ruminate/blob/b524908ea7c0b5b9b21c882330e1b779ee53dda0/R/NCA_Server.R#L5658C1-L5670C26

I can put those into the yaml file and make them configurable. But this is automatable and not something that the end user would determine. It would be something that would be configured at the site level.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants