Skip to content
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

Published content titles are lowercased #1022

Open
scubastevew opened this issue Oct 26, 2023 · 8 comments · May be fixed by #1023
Open

Published content titles are lowercased #1022

scubastevew opened this issue Oct 26, 2023 · 8 comments · May be fixed by #1023
Assignees

Comments

@scubastevew
Copy link

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:

  1. Create an HTML file that is camel cased
  2. 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:
Screenshot 2023-10-26 at 1 38 45 PM

What the published content looks like with the CRAN release of rsconnect.
Screenshot 2023-10-26 at 1 46 54 PM

@hadley

This comment was marked as outdated.

@scubastevew

This comment was marked as outdated.

@hadley

This comment was marked as outdated.

@hadley
Copy link
Member

hadley commented Oct 26, 2023

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?

@hadley
Copy link
Member

hadley commented Oct 26, 2023

@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.

@aronatkins
Copy link
Contributor

I think this might be because you switched from defaultAppName() to generateAppName() 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.

@aronatkins
Copy link
Contributor

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 #1021 shifted us back to using generateAppName(), which down-cases path-derived names.

@aronatkins aronatkins changed the title Published content names are being set lowercase characters. Published content titles are being set lowercase characters. Nov 1, 2023
@aronatkins aronatkins changed the title Published content titles are being set lowercase characters. Published content titles are lowercased Nov 1, 2023
@aronatkins
Copy link
Contributor

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 of myreport and does not assign a title. Connect, shinyapps.io, and Posit Cloud all receive a myreport name.
  • rsconnect::deployDoc("MyReport.Rmd", appTitle="MyReport") - computes a name of myreport. Connect, shinyapps.io, and Posit Cloud all receive a myreport name. Connect also receives a MyReport title, which is displayed to the user.
  • IDE push-button deploy of "MyReport.Rmd" provides appName="myreport" and appTitle="MyReport" to rsconnect::deploy*. Connect, shinyapps.io, and Posit Cloud all receive a myreport name. Connect also receives a MyReport title, 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.

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 a pull request may close this issue.

3 participants