Update Styles and Layout in Dashboard Components
All checks were successful
farmcontrol/farmcontrol-ui/pipeline/head This commit looks good

- Adjusted CSS styles in App.css for improved visual consistency, including changes to the positioning and appearance of skeleton inputs and separators.
- Modified padding in DashboardOverviewPage to enhance layout during editing mode.
- Enhanced loading state handling in ModelHistoryDisplay to provide clearer feedback based on chart data availability.
This commit is contained in:
Tom Butcher 2026-08-25 01:47:23 +01:00
parent f730e5304a
commit 4fe8d4f51f
3 changed files with 27 additions and 9 deletions

View File

@ -1986,7 +1986,7 @@ span.ant-skeleton-input.ant-skeleton-input-sm.text-skeleton {
position: absolute; position: absolute;
top: 0; top: 0;
left: 0px; left: 0px;
transform: translateY(-50%); transform: translateY(-60%);
z-index: 4; z-index: 4;
width: max-content; width: max-content;
} }
@ -2048,7 +2048,7 @@ span.ant-skeleton-input.ant-skeleton-input-sm.text-skeleton {
width: 2px; width: 2px;
height: 100%; height: 100%;
box-sizing: border-box; box-sizing: border-box;
border-left: 2px dashed color-mix(in srgb, var(--color-text) 25%, transparent); border-left: 2px solid color-mix(in srgb, var(--color-text) 8%, transparent);
pointer-events: none; pointer-events: none;
} }
@ -2056,19 +2056,28 @@ span.ant-skeleton-input.ant-skeleton-input-sm.text-skeleton {
.overview-flex-columns-separator.is-active .overview-flex-columns-separator.is-active
.overview-flex-columns-separator-line { .overview-flex-columns-separator-line {
border-left: none; border-left: none;
background-color: var(--color-primary); background-color: #a3e3ff;
opacity: 0.5; }
.dark-mode
.overview-flex-columns-separator:hover
.overview-flex-columns-separator-line,
.dark-mode
.overview-flex-columns-separator.is-active
.overview-flex-columns-separator-line {
background-color: #0e3a5b;
} }
.overview-flex-columns-separator-handle { .overview-flex-columns-separator-handle {
position: absolute; position: absolute;
top: 0; top: 50%;
left: 50%; left: 50%;
transform: translateX(-50%); transform: translateX(-50%);
width: 2px; width: 2px;
height: 10px; height: 20px;
background-color: var(--color-primary); background-color: color-mix(in srgb, var(--color-text) 18%, transparent);
pointer-events: none; pointer-events: none;
z-index: 4;
} }
.overview-flex-columns-item > .ant-collapse { .overview-flex-columns-item > .ant-collapse {

View File

@ -836,7 +836,7 @@ const DashboardOverviewPage = ({
<Flex <Flex
vertical vertical
gap='large' gap='large'
style={isLayoutEditing ? { paddingTop: 11 } : undefined} style={isLayoutEditing ? { paddingTop: 13.5 } : undefined}
onDragOver={handleRootListDragOver} onDragOver={handleRootListDragOver}
onDrop={(e) => handleDrop(e, 'root', 0)} onDrop={(e) => handleDrop(e, 'root', 0)}
> >

View File

@ -457,7 +457,7 @@ const ModelHistoryDisplay = ({
{!startDate && !endDate && ( {!startDate && !endDate && (
<Flex gap='middle' align='center'> <Flex gap='middle' align='center'>
{loading == true && <LoadingOutlined />} {loading == true && chartRows.length != 0 && <LoadingOutlined />}
<Segmented <Segmented
size='small' size='small'
options={[ options={[
@ -481,6 +481,15 @@ const ModelHistoryDisplay = ({
</ResponsiveContainer> </ResponsiveContainer>
</div> </div>
)} )}
{loading == true && chartRows.length == 0 && (
<Flex
justify='center'
align='center'
style={{ height: `${height}px` }}
>
<LoadingOutlined />
</Flex>
)}
{loading == false && chartRows.length == 0 && ( {loading == false && chartRows.length == 0 && (
<Flex <Flex
justify='center' justify='center'