clarify "soft" reloading of CSS during hot reload events requires that hard = TRUE
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 24.4k
- Forks
- 2.3k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 13
Description
In the current implementation of hot reloading, a JSON response containing four keys is provided by the backend whenever asset changes are detected and a reload event is in progress:
https://github.com/plotly/dash/blob/74b4c2e86bdfa7832914567c40e368fc5f5532a8/dash/dash.py#L508-L514
The original intent of the "hard" key was to identify reload events in which only CSS files have been updated. In this situation, the page would refresh CSS without re-rendering the page layout. However, @alexcjohnson and I observed that CSS (soft) reloading does not appear to work properly unless "hard": true. It seems that "hard" may always be true, so that this flag has essentially no effect.
For the moment, it appears that "is_css" (a key nested within the "files" key) actually serves this purpose, and "hard" is unused. We may wish to remove references to "hard" from both Dash for Python and R .
@Marc-Andre-Rivet
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
Read dash/dash.py at the linked lines 508-514 and trace how the "hard" response key and files.is_css are consumed during hot reload. Compare the Python and R references to determine whether "hard" is unused or required. Done means the flag's behavior or removal is consistent across both implementations and CSS-only reload behavior is clarified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, r
- Domain
- backend, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100