(core) Fix CustomView taking up more height than page layout gives it.

Summary:
Each view type currently responsible for fitting appropriately within the box
it's given (e.g. deciding which container is scrollable). CustomView wasn't
doing a good job of it, particularly when showing "columns aren't mapped"
message.

Test Plan:
Only CSS affected. Checked manually on FF, Chrome, Safari that CustomViews take
the right amount of space, and scroll well, in 3 situations: not-mapped,
not-configured, and a functional widget.

Reviewers: jarek

Reviewed By: jarek

Subscribers: jarek

Differential Revision: https://phab.getgrist.com/D4316
This commit is contained in:
Dmitry S 2024-08-13 09:34:13 -04:00
parent 5ef54b278f
commit fbc0418118

View File

@ -1,3 +1,13 @@
/*
* Ensure the custom view section fits within its allocated area even if it needs to scroll inside
* of it. This is not an issue when it contains an iframe, but .custom_view_no_mapping element
* could be taller, but its intrinsic height should not affect the container.
*/
.custom_view_container {
overflow: auto;
flex-basis: 0px;
}
iframe.custom_view {
border: none;
height: 100%;
@ -12,7 +22,6 @@ iframe.custom_view {
.custom_view_no_mapping {
padding: 15px;
margin: 15px;
height: 100%;
display: flex;
flex-direction: column;
align-items: center;