visual clean up of metadata box

This commit is contained in:
ari committed 2022-08-25 12:58:08 -04:00
1 parent e2d4022bde
commit 5115dd9490
2 files changed
+30 -14

No files matched your search

@@ -79,6 +79,11 @@
cursor: default;
}
.automation-manager--metadatabox {
--metadatabox--switch-width: 5em;
--metadatabox--title--source-height: 1.5em;
}
.automation-manager--metadatabox .metadatabox--switch {
display: flex;
cursor: pointer;
@@ -88,16 +93,28 @@
text-align: center;
font-size: 0.75em;
user-select: none;
max-width: 5em;
max-width: var(--metadatabox--switch-width);
}
.automation-manager--metadatabox .metadatabox--title {
position: relative;
padding-top: var(--metadatabox--title--source-height);
}
.automation-manager--metadatabox .metadatabox--title--source {
position: absolute;
margin-bottom: -0.5em;
left: calc(0.75em - var(--metadatabox--switch-width));
top: 0;
}
.automation-manager--metadatabox .metadatabox--title--source .MuiChip-root {
font-size: 0.85em;
height: 2em;
font-size: 0.6em;
max-height: calc(var(--metadatabox--title--source-height));
padding-top: 0.5em;
padding-bottom: 0.5em;
height: fit-content;
max-width: 60%;
min-width: fit-content;
}
@@ -50,10 +50,7 @@ export const MetadataBox: FC<MetadataBoxProps> = (props) => {
/>
{!isValidState && `Invalid state: '${props.state}'`}
</div>
<div
className="metadatabox--title"
title={`ID=${props.id}, EntityID=${props.entityId}`}
>
<div className="metadatabox--title">
<span className="metadatabox--title--source">
<Tooltip
title={`This automation is located in the file ${props.source_file} and is set up in your configuration.yaml file under the key ${props.configuration_key}.`}
@@ -64,13 +61,15 @@ export const MetadataBox: FC<MetadataBoxProps> = (props) => {
/>
</Tooltip>
</span>
<InputTextView
className="title"
placeholder="Title"
value={props.title}
onChange={props.onTitleUpdate}
disabled={props.isNew}
/>
<Tooltip title={`ID=${props.id}, EntityID=${props.entityId}`}>
<InputTextView
className="title"
placeholder="Title"
value={props.title}
onChange={props.onTitleUpdate}
disabled={props.isNew}
/>
</Tooltip>
<InputTextView
className="description"
placeholder="Description"