Skip to content

Fix 848#1236

Open
ilyaZar wants to merge 1 commit intoThinkR-open:temp-devfrom
ilyaZar:fix-848
Open

Fix 848#1236
ilyaZar wants to merge 1 commit intoThinkR-open:temp-devfrom
ilyaZar:fix-848

Conversation

@ilyaZar
Copy link
Copy Markdown
Contributor

@ilyaZar ilyaZar commented Apr 16, 2026

Fix #848

@ilyaZar
Copy link
Copy Markdown
Contributor Author

ilyaZar commented Apr 16, 2026

@ColinFay

will let you know when merge , is the air formatter working correctly ? I keep encountering the error from time to time, though I thought I am always formatting with it..

[UPDATE] fixed on my side sry

@ColinFay ColinFay changed the base branch from master to temp-dev April 17, 2026 14:24
Comment thread R/use_files_external.R
extract = c("ask", "yes", "no"),
delete_zip = c("ask", "yes", "no")
) {
signal_arg_is_deprecated(
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@ilyaZar any reason for removing this bit if code?

Comment thread R/use_files_external.R Outdated
cli_abort_dir_create()
}

HTML_BUNDLE <- check_if_html_bundle(url)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can you rename in lowercase please ?

Comment thread R/use_files_external.R Outdated
name <- build_name(name, url, with_ext = TRUE)

if (file_ext(name) != "zip") {
name <- sprintf("%s.zip", file_path_sans_ext(name))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The idea for this param is to name the output file that is put inside the www folder, I'm not sure it provides value to allow this to be named as a .zip ? Given that the html Template will be an .html file and the .zip removed

Comment thread R/use_files_external_tools.R Outdated
"css",
"html"
"html",
"zip"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm not sure this function is ever called with the zip param ?

@ilyaZar
Copy link
Copy Markdown
Contributor Author

ilyaZar commented Apr 20, 2026

@ColinFay

so the behavior is now:

  1. Plain .html file:
  • if name is not set, the downloaded file is template.html
  • if name = "my_name" or name = "my_name.html", the downloaded file is my_name.html
  • if name = "my_name.zip", this is normalized to my_name.html
  1. bundled-.html / .zip:
  • if name is not set:
    the downloaded archive is template_bundle.zip
    after extraction, if the archive contains a single top-level wrapper dir, that wrapper name is used as the extracted directory name; otherwise it falls back to template
  • if name = "my_name":
    the downloaded archive is my_name_bundle.zip
    the extracted directory is my_name
  • if name = "my_name.zip":
    the downloaded archive is my_name.zip
    the extracted directory is my_name

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.

Allow to use a bundle zip for html template

2 participants