Skip to content

Support tinytable backend#842

Merged
strengejacke merged 1 commit intomainfrom
tinytable
Jul 22, 2025
Merged

Support tinytable backend#842
strengejacke merged 1 commit intomainfrom
tinytable

Conversation

@strengejacke
Copy link
Copy Markdown
Member

No description provided.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary of Changes

Hello @strengejacke, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the performance R package by integrating support for the tinytable backend. This allows for more flexible and aesthetically pleasing table output in various environments, such as markdown and HTML, by generalizing the existing table rendering functions to accommodate this new format. The changes involve updating core display functions, introducing a new internal helper for format determination, and managing dependencies.

Highlights

  • New Output Format Support: Introduced support for the tinytable backend, allowing users to render tables in the tinytable format by specifying format = "tt" in display() and other table-generating functions.
  • Generalized Table Export Logic: Refactored internal print_html methods across multiple files to dynamically determine the output format (HTML or tinytable) using a new helper function, .check_format_backend(), which then passes the appropriate format to insight::export_table.
  • Dependency Management: Added easystats/insight as a remote dependency in the DESCRIPTION file, which is crucial for leveraging the tinytable integration through the insight package's table export capabilities.
  • Documentation and Versioning: Updated the package version to 0.15.0.1, added a corresponding entry in NEWS.md detailing the tinytable support, and revised the documentation for the display() function to reflect the new format options and expanded parameter descriptions.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments or fill out our survey to provide feedback.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces support for the tinytable backend for table generation. The changes are consistently applied across the package by introducing a .check_format_backend() helper and updating display() and print_html() methods.

My review focuses on improving maintainability. I've suggested:

  1. Clarifying a comment for the new helper function to better describe its behavior.
  2. Removing duplicated code by aliasing one display() method to another identical one.

These changes will make the code easier to understand and maintain in the future. Overall, this is a well-executed feature addition.

Comment on lines +179 to +186
.check_format_backend <- function(...) {
dots <- list(...)
if (identical(dots$backend, "tt")) {
"tt"
} else {
"html"
}
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The comment above .check_format_backend could be more precise. It mentions "gt" or "tinytable", but this function's logic only distinguishes between "tt" and a default of "html". The mapping of "html" to the gt package happens within insight::export_table(). For better code clarity and maintainability, the comment should describe what this function returns.

A more descriptive comment would be helpful for future maintenance.

# Helper to select table format backend. Returns "tt" for tinytable, or "html" for the default.

@strengejacke strengejacke merged commit 4026f84 into main Jul 22, 2025
18 of 20 checks passed
@strengejacke strengejacke deleted the tinytable branch July 22, 2025 05:25
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.

1 participant