insightsengineering / insightsengineering/teal.widgets

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

Open
#235 2 comments 0 reactions 0 assignees View on GitHub
core enhancement
Dominant language
R
Stars
6
Forks
8
PR merge metrics
No merged PRs in 30d

Description

### Feature description

Following the discussion in https://github.com/insightsengineering/teal.reporter/issues/258, the` plot_with_settings `and `table_with_settings `modules 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](https://github.com/insightsengineering/teal.widgets/assets/6700955/5fe869b5-b463-4577-a2f0-7429ca7cc874)

### Code of Conduct

- [X] I agree to follow this project's Code of Conduct.

### Contribution Guidelines

- [X] I agree to follow this project's Contribution Guidelines.

### Security Policy

- [X] I agree to follow this project's Security Policy.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.