Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
editorHeight
quarto-ext/shinylive#33This PR builds on #140 to incorporate an
editorHeight
option. Editor height has the same semantics asviewerHeight
(hence the dependency on #140), where users can provide a numeric value taken as pixels or a string, taken as a CSS value.I updated the following layouts to use
editorHeight
editor-viewer
editorHeight
andviewerHeight
are supplied togrid-template-rows
. In other words, the editor and viewer are independently sized. The default value isauto, 200px
(editor, viewer).editorHeight
orviewerHeight
can constrain the overall height of the component. If both are set (to values other thanauto
), we take the minimum height of the two.editor-terminal-viewer
editor-viewer
in a horizontal layout, but we apply theheight
to the.shinylive-container
element, leavinggrid-template-rows
to determine the relative size of the editor/terminal cells. If either are set, we apply the height constrain to the overall component, using the minimum if both are set.editor-terminal
editorHeight
to the overall component viagrid-template-rows
. Sidenote: this view isn't available in Quarto.editor-cell
editorHeight
to theEditor
component. I adjusted padding a bit so that the scroll bars of the editor are at the edges of the editor container.Testing
Prior to this PR, in most situations, the shinylive component is generally driven by the code height. The example document below contains a large single-file app that exhibits this behavior. With this PR, the overall component height is configurable in Quarto documents.
Example document