Skip to content

Commit

Permalink
fix(catalog): Provide fixed size for Properties Catalog
Browse files Browse the repository at this point in the history
Currently, the Properties Modal size is determined according to its
content, meaning that long list will occupy the entire screen while
other tabs might be smaller, effectively changing the size and position
of the modal.

The fix for this is to provide a fixed size for the modal, according to
the User's viewport.

Ideally, in the future we should transform the properties modal into a
page, which will allow the user to share the link to a specific
component and properties. Ideally, it should also contain a breadcrumb
to show the user current location.

fix: #742
  • Loading branch information
lordrip committed Feb 26, 2024
1 parent 83cea14 commit 3b96387
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
16 changes: 16 additions & 0 deletions packages/ui/src/components/PropertiesModal/PropertiesModal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,20 @@
span[data-label='group'] {
font-weight: normal;
}

&__body {
height: 75vh;

@media screen and (height <= 720px) {
height: 100vh;
}

@media screen and (height <= 1080px) {
height: 75vh;
}

@media screen and (height <= 1440px) {
height: 60vh;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,9 @@ export const PropertiesModal: FunctionComponent<IPropertiesModalProps> = (props)
onClose={props.onClose}
ouiaId="BasicModal"
description={description}
variant="large"
>
<ModalBoxBody>
<ModalBoxBody className="properties-modal__body">
{tabs.length === 0 ? (
<EmptyTableState name={props.tile.name} />
) : (
Expand Down

0 comments on commit 3b96387

Please sign in to comment.