insightsengineering / teal.widgets

shiny widgets for teal applications
https://insightsengineering.github.io/teal.widgets/
Other
4 stars 6 forks source link

[Feature Request]: showing advance customization option for download format #235

Open kartikeyakirar opened 7 months ago

kartikeyakirar commented 7 months ago

Feature description

Following the discussion in https://github.com/insightsengineering/teal.reporter/issues/258, theplot_with_settingsand table_with_settingsmodules have been highlighted for their ability to allow users to download plots and tables in various formats. However, there is an expressed need for a feature that lets users customize these download formats. This enhancement request stems from an attempt by @Melkiades to save a PDF without pagination, which resulted in the table being truncated in the PDF file.

The proposed options for customization that could be exposed to users are as follows:

For table_with_settings:

PDF (export_as_pdf) options:

Orientation (Portrait/Landscape) Page Width (pg_width) Page Height (pg_height) Margins Minimum Siblings (min_siblings) Font Family (font_family) Font Size (font_size) Characters Per Pica (cpp) Maximum Width (max_width) Column Widths (colwidths)

Text (export_as_txt) options:

Orientation (Landscape) Page Width (pg_width) Page Height (pg_height) is determined by page_dim(page_type) based on orientation. Font Family (font_family) Font Size (font_size) Line Height (lineheight) Characters Per Pica (cpp) Maximum Width (max_width) Column Widths (colwidths) Page Break (page_break)

For plot_with_settings:

grDevices options for PDF, PNG, and SVG formats. These enhancements aim to improve user experience by providing more flexibility in how plots and tables are downloaded and customized.

Suggested UI changes. image

Code of Conduct

Contribution Guidelines

Security Policy

Melkiades commented 7 months ago

Thanks Kartik for working on this!! I think we should also add docx export ;)

kartikeyakirar commented 7 months ago

@Melkiades I have added seprate task for this https://github.com/insightsengineering/teal.widgets/issues/237