That’s an interesting proposal. A few observations:
* In support of the proposal, there are precedents for the core using variables that are expected to be provided via a JS macro. For example, tv-get-export-image-link, tv-get-export-path, tv-filter-export-link etc.
* Meanwhile, I’ve proposed in the past that we bring the same ability to enable/disable individual components tagged $:/tags/PageTemplate via checkboxes just as we do for $:/tags/PageControls, $:/tags/ViewToolbar etc. Those two proposals could coexist, but at the cost of some complexity
* The example you’ve given of making the UI responsive to the viewport size would appear to be insufficient, in that we might plausibly want to set other configuration in response to the screen size (eg font, font size, margins, or moving tiddler toolbar buttons into the dropdown on smaller screen sizes). In the past I’ve envisaged solving these problems through a new mechanism that can provide initial values for arbitrary configuration tiddlers that depend upon environmental factors like the viewport size. The nice thing about that approach is that it’s pretty universal; we can use it to configure anything that is controlled by config tiddlers. In combination with my proposal above, your example would be a matter of setting $:/config/PageComponents/Visibility/$:/core/ui/PageTemplate/sidebar to “hide”
What do you think?
Best wishes
Jeremy.