REditorSupport / REditorSupport/vscode-R
Cannot link to CSS file in Shiny apps
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.2k
- Forks
- 139
- Avg merge
- 2h 46m
- Merged PRs (30d)
- 5
Description
I'm not sure whether this is a bug for here or REditorSupport/vscode-R but it seems like a link issue than an editor problem. In any case here's the problem.
Description
Linking to CSS files in Shiny apps do not work, i.e. I cannot use:
tags$head(
tags$link(rel = "stylesheet", type = "text/css", href = "style.css")
)
The file style.css cannot be found. I've already tried multiple different versions of the path like www/style.css or the complete path on my file system. Never worked. The code and the file location should be correct. The exact same code renders fine in RStudio.
At first I thought this is related to RStudio projects, but even if I open a different workspace that does not contain an RStudio project, the problem persists.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue in a VS Code R/Shiny app using the reported tags$head() and style.css example, then compare it with the same code in RStudio. Trace how vscode-R launches or serves Shiny apps and handles the referenced CSS path; done means the stylesheet loads from the documented path without requiring an absolute filesystem path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r, vscode
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100