Skip to content

Make gtsave return file path invisibly. #1478

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

Merged
merged 1 commit into from
Nov 4, 2023
Merged

Conversation

olivroy
Copy link
Collaborator

@olivroy olivroy commented Nov 2, 2023

Summary

Have gtsave follow more closely ggsave() by returning the file path instead of TRUE.

This is a naive solution. I guess the code could be cleaned up a little bit for gtsave() since the related htmltools issue seems to have been solved. May no longer require this fs code?

Some tests seem to be a little redundant too? I could take another (more thorough) shot at the gtsave() code and tests if you think this is worth pursuing.

Checklist

@rich-iannone
Copy link
Member

Thanks for this PR! Agree it’s much better to return the image path rather than TRUE. Also agree that some of the surrounding code could be revisited for a cleanup!

Copy link
Member

@rich-iannone rich-iannone left a comment

Choose a reason for hiding this comment

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

Lgtm!

@rich-iannone rich-iannone merged commit c56210c into rstudio:master Nov 4, 2023
@olivroy olivroy deleted the gtsave branch November 6, 2023 15:39
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.

2 participants