Published content titles are lowercased
The the development version of rsconnect sets the name of the content to lowercase.
For example, when publishing to posit.cloud, the content is named EnLS3Mz3UZ and the resulting published content is named enls3mz3uz.
Steps to reproduce:
- Create an HTML file that is camel cased
- Publish the HTML to posit.cloud or Posit Connect
rsconnect::deployDoc('EnLS3Mz3UZ.html', server='posit.cloud')
rsconnect::deployDoc('EnLS3Mz3UZ.html', server='
What the published content looks like with the development version of rsconnect:
What the published content looks like with the CRAN release of rsconnect.
I just tried with the latest dev version and it looks ok to me:
But I do wonder if I'm publishing somewhere different to you given that I have "your workspace" and you have "Content".
Interesting. My screenshots above were publishing to Posit Connect.
This is what it looks like in my posit.cloud:
Dev version (1.1.1.9000)
CRAN release (1.1.1):
Oops, I'm an idiot and was accidentially using the CRAN version. I see the same problem as you now 😄
Looks like it's happening at https://github.com/rstudio/rsconnect/blob/main/R/title.R#L42, which seems to be by design. I wonder why this path wasn't previously travelled in the CRAN version?
@aronatkins I think this might be because you switched from defaultAppName() to generateAppName() in #1021. defaultAppName() is more selective with its munging, only making more extreme modifications when deploying to shinyapps.io.
I think this might be because you switched from
defaultAppName()togenerateAppName()in #1021.
@hadley Yep. That was my expectation, too. @scubastevew and I were chatting privately yesterday and I asked him to file this issue to track the problem.
In 0.8.29, we used generateAppName() when we had an incoming appTitle and no appName:
https://github.com/rstudio/rsconnect/blob/v0.8.29/R/deployApp.R#L678
Additionally, 0.8.29 used generateAppName() when there was no appTitle (meaning it fell back to path-based discovery):
https://github.com/rstudio/rsconnect/blob/v0.8.29/R/deployApp.R#L735
With 0.8.29, a lower-cased content name is created, meaning that Connect uses that lower-cased name as the initial title.
Starting with rsconnect 1.0.0, we did not lower-case the content name, and the changes for https://github.com/rstudio/rsconnect/pull/1021 shifted us back to using generateAppName(), which down-cases path-derived names.
Update:
shinyapps.io and Connect want name to be lower-cased and normalized. In the shinyapps.io case (and occasionally Connect), the name is used to define part of a URL path. Connect has a separate title field that is used for human-friendly names.
Posit Cloud wants name to be human-friendly; it is more a title than a name.
A summarization of the current behavior:
rsconnect::deployDoc("MyReport.Rmd")- computes a name ofmyreportand does not assign a title. Connect, shinyapps.io, and Posit Cloud all receive amyreportname.rsconnect::deployDoc("MyReport.Rmd", appTitle="MyReport")- computes a name ofmyreport. Connect, shinyapps.io, and Posit Cloud all receive amyreportname. Connect also receives aMyReporttitle, which is displayed to the user.- IDE push-button deploy of "MyReport.Rmd" provides
appName="myreport"andappTitle="MyReport"torsconnect::deploy*. Connect, shinyapps.io, and Posit Cloud all receive amyreportname. Connect also receives aMyReporttitle, which is displayed to the user.
The IDE provides both name and title to rsconnect. Posit Cloud deployments currently use name rather than title, but after chatting with @scubastevew, it sounds like the title is more appropriate. The Posit Cloud content name is not used in URLs and should not have the same restrictions as the shinyapps.io content name.
@m-- Will Posit Cloud offer separate names (for URLs and computer-lookups) and titles (human friendly)? Are names supposed to be unique? The IDE currently drops the user-provided title when deploying to Posit Cloud, which was a surprise to me and @scubastevew.