Polish workbench UI layout
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
|
||||
React + TypeScript + MapLibre foundation for project/area/dataset workflow.
|
||||
|
||||
The workbench is intentionally map-first: `MapWorkspace` is promoted above the dense workflow grid so GIS context stays visible before lower-detail provider, AI, QA and export panels. Long workflow panels are scroll-contained by CSS rather than stretching every grid row.
|
||||
|
||||
## Scope implemented
|
||||
- API client layer (`src/services/api`)
|
||||
- Project and area list/create flows
|
||||
|
||||
+33
-33
@@ -389,6 +389,27 @@ function App(): JSX.Element {
|
||||
selectedAreaHasGeometry={Boolean(areaFeatureCollection)}
|
||||
/>
|
||||
|
||||
<MapWorkspace
|
||||
areas={areas}
|
||||
selectedMapAreaId={selectedMapAreaId}
|
||||
areaFeatureCollection={areaFeatureCollection}
|
||||
mapFeatureCollection={mapFeatureCollection}
|
||||
mapLayerLabel={mapLayerLabel}
|
||||
mapLayerVisible={mapLayerVisible}
|
||||
mapLayerOpacity={mapLayerOpacity}
|
||||
areaLayerVisible={areaLayerVisible}
|
||||
areaLayerOpacity={areaLayerOpacity}
|
||||
mapFeatureCount={mapFeatureCount}
|
||||
areaFeatureCount={areaFeatureCount}
|
||||
selectedMapFeature={selectedMapFeature}
|
||||
onSelectMapArea={setSelectedMapAreaId}
|
||||
onSetAreaLayerVisible={setAreaLayerVisible}
|
||||
onSetAreaLayerOpacity={setAreaLayerOpacity}
|
||||
onSetMapLayerVisible={setMapLayerVisible}
|
||||
onSetMapLayerOpacity={setMapLayerOpacity}
|
||||
onSelectMapFeature={setSelectedMapFeature}
|
||||
/>
|
||||
|
||||
<main className="workspace-grid">
|
||||
<ProjectPanel
|
||||
projects={projects}
|
||||
@@ -415,6 +436,18 @@ function App(): JSX.Element {
|
||||
onSelectMapArea={setSelectedMapAreaId}
|
||||
/>
|
||||
|
||||
<DatasetPanel
|
||||
selectedProjectId={selectedProjectId}
|
||||
areas={areas}
|
||||
datasets={datasets}
|
||||
datasetForm={datasetForm}
|
||||
loadingDatasets={loadingDatasets}
|
||||
onDatasetFormChange={setDatasetForm}
|
||||
onUploadDataset={uploadDataset}
|
||||
onLoadDatasetDetails={loadDatasetDetails}
|
||||
onRefreshMetadata={refreshMetadata}
|
||||
/>
|
||||
|
||||
<ProviderPanel
|
||||
providers={providers}
|
||||
loadingCapabilities={loadingCapabilities}
|
||||
@@ -543,18 +576,6 @@ function App(): JSX.Element {
|
||||
onDownload={downloadExportArtifact}
|
||||
/>
|
||||
<ExportPreview content={exportPreview} />
|
||||
|
||||
<DatasetPanel
|
||||
selectedProjectId={selectedProjectId}
|
||||
areas={areas}
|
||||
datasets={datasets}
|
||||
datasetForm={datasetForm}
|
||||
loadingDatasets={loadingDatasets}
|
||||
onDatasetFormChange={setDatasetForm}
|
||||
onUploadDataset={uploadDataset}
|
||||
onLoadDatasetDetails={loadDatasetDetails}
|
||||
onRefreshMetadata={refreshMetadata}
|
||||
/>
|
||||
</main>
|
||||
|
||||
<DatasetDetailPanel
|
||||
@@ -612,27 +633,6 @@ function App(): JSX.Element {
|
||||
onRunVectorIntersect={() => runVectorIntersect(availableVectorTargets)}
|
||||
onPickDerivedDataset={pickDerivedDataset}
|
||||
/>
|
||||
|
||||
<MapWorkspace
|
||||
areas={areas}
|
||||
selectedMapAreaId={selectedMapAreaId}
|
||||
areaFeatureCollection={areaFeatureCollection}
|
||||
mapFeatureCollection={mapFeatureCollection}
|
||||
mapLayerLabel={mapLayerLabel}
|
||||
mapLayerVisible={mapLayerVisible}
|
||||
mapLayerOpacity={mapLayerOpacity}
|
||||
areaLayerVisible={areaLayerVisible}
|
||||
areaLayerOpacity={areaLayerOpacity}
|
||||
mapFeatureCount={mapFeatureCount}
|
||||
areaFeatureCount={areaFeatureCount}
|
||||
selectedMapFeature={selectedMapFeature}
|
||||
onSelectMapArea={setSelectedMapAreaId}
|
||||
onSetAreaLayerVisible={setAreaLayerVisible}
|
||||
onSetAreaLayerOpacity={setAreaLayerOpacity}
|
||||
onSetMapLayerVisible={setMapLayerVisible}
|
||||
onSetMapLayerOpacity={setMapLayerOpacity}
|
||||
onSelectMapFeature={setSelectedMapFeature}
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
+336
-84
@@ -1,82 +1,237 @@
|
||||
@import 'maplibre-gl/dist/maplibre-gl.css';
|
||||
|
||||
:root {
|
||||
--bg: #0f172a;
|
||||
--bg: #eef4f1;
|
||||
--panel: #ffffff;
|
||||
--muted: #475569;
|
||||
--line: #cbd5e1;
|
||||
--panel-soft: #f8fbf9;
|
||||
--text: #132018;
|
||||
--muted: #5f6f67;
|
||||
--line: #cbd8d0;
|
||||
--line-strong: #9fb2a7;
|
||||
--accent: #0f766e;
|
||||
--accent-strong: #115e59;
|
||||
--accent-soft: #e3f4ef;
|
||||
--warning: #b45309;
|
||||
--danger: #991b1b;
|
||||
--shadow: 0 12px 32px rgba(33, 48, 41, 0.08);
|
||||
color-scheme: light;
|
||||
}
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
html {
|
||||
background: var(--bg);
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: 'Inter', 'Avenir Next', 'Segoe UI', sans-serif;
|
||||
color: #0f172a;
|
||||
background: radial-gradient(circle at top, #1d4ed8 0%, #1e293b 45%, #020617 100%);
|
||||
font-family: Inter, 'Avenir Next', 'Segoe UI', sans-serif;
|
||||
color: var(--text);
|
||||
background:
|
||||
linear-gradient(180deg, rgba(15, 118, 110, 0.08), rgba(238, 244, 241, 0) 18rem),
|
||||
var(--bg);
|
||||
}
|
||||
|
||||
button,
|
||||
input,
|
||||
select,
|
||||
textarea {
|
||||
font: inherit;
|
||||
}
|
||||
|
||||
button {
|
||||
min-height: 2.35rem;
|
||||
border: 1px solid var(--line-strong);
|
||||
border-radius: 6px;
|
||||
padding: 0.52rem 0.78rem;
|
||||
background: linear-gradient(180deg, #ffffff, #edf5f1);
|
||||
color: var(--text);
|
||||
cursor: pointer;
|
||||
font-weight: 650;
|
||||
transition:
|
||||
border-color 120ms ease,
|
||||
box-shadow 120ms ease,
|
||||
transform 120ms ease;
|
||||
}
|
||||
|
||||
button:hover:not(:disabled) {
|
||||
border-color: var(--accent);
|
||||
box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
|
||||
}
|
||||
|
||||
button:active:not(:disabled) {
|
||||
transform: translateY(1px);
|
||||
}
|
||||
|
||||
button:disabled {
|
||||
cursor: not-allowed;
|
||||
opacity: 0.52;
|
||||
}
|
||||
|
||||
input,
|
||||
select,
|
||||
textarea {
|
||||
width: 100%;
|
||||
min-height: 2.35rem;
|
||||
border: 1px solid var(--line-strong);
|
||||
border-radius: 6px;
|
||||
padding: 0.52rem 0.62rem;
|
||||
background: #ffffff;
|
||||
color: var(--text);
|
||||
}
|
||||
|
||||
textarea {
|
||||
min-height: 6.5rem;
|
||||
resize: vertical;
|
||||
font-family: 'Cascadia Mono', 'SFMono-Regular', Consolas, monospace;
|
||||
font-size: 0.84rem;
|
||||
line-height: 1.45;
|
||||
}
|
||||
|
||||
input:focus,
|
||||
select:focus,
|
||||
textarea:focus {
|
||||
border-color: var(--accent);
|
||||
box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.16);
|
||||
outline: none;
|
||||
}
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
p {
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin: 0;
|
||||
max-width: 42rem;
|
||||
font-size: clamp(1.85rem, 2.6vw, 2.7rem);
|
||||
line-height: 1.02;
|
||||
letter-spacing: 0;
|
||||
}
|
||||
|
||||
h2 {
|
||||
margin: 0 0 0.9rem;
|
||||
font-size: 1.28rem;
|
||||
line-height: 1.15;
|
||||
letter-spacing: 0;
|
||||
}
|
||||
|
||||
h3 {
|
||||
margin: 1.1rem 0 0.55rem;
|
||||
font-size: 1rem;
|
||||
line-height: 1.2;
|
||||
letter-spacing: 0;
|
||||
}
|
||||
|
||||
p {
|
||||
line-height: 1.45;
|
||||
}
|
||||
|
||||
ul {
|
||||
margin: 0.65rem 0 0;
|
||||
padding-left: 1.1rem;
|
||||
}
|
||||
|
||||
li + li {
|
||||
margin-top: 0.7rem;
|
||||
}
|
||||
|
||||
label {
|
||||
display: block;
|
||||
margin-top: 0.72rem;
|
||||
color: var(--muted);
|
||||
font-size: 0.88rem;
|
||||
font-weight: 650;
|
||||
}
|
||||
|
||||
label > input,
|
||||
label > select,
|
||||
label > textarea {
|
||||
margin-top: 0.28rem;
|
||||
}
|
||||
|
||||
.app-shell {
|
||||
width: min(100%, 1540px);
|
||||
min-height: 100vh;
|
||||
padding: 1rem;
|
||||
margin: 0 auto;
|
||||
padding: 1.1rem;
|
||||
}
|
||||
|
||||
.app-shell > header {
|
||||
display: flex;
|
||||
gap: 1rem;
|
||||
align-items: flex-end;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 1rem;
|
||||
padding: 0.8rem 0.1rem 0.2rem;
|
||||
}
|
||||
|
||||
.app-shell > header p {
|
||||
max-width: 42rem;
|
||||
margin: 0;
|
||||
color: var(--muted);
|
||||
font-size: 0.98rem;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.app-shell,
|
||||
section {
|
||||
background: color-mix(in srgb, var(--panel) 92%, transparent);
|
||||
min-width: 0;
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 8px;
|
||||
padding: 1rem;
|
||||
background: rgba(255, 255, 255, 0.94);
|
||||
box-shadow: var(--shadow);
|
||||
}
|
||||
|
||||
.workspace-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
|
||||
grid-template-columns: repeat(12, minmax(0, 1fr));
|
||||
gap: 1rem;
|
||||
align-items: start;
|
||||
margin-top: 1rem;
|
||||
}
|
||||
|
||||
section {
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 10px;
|
||||
padding: 0.9rem;
|
||||
.workspace-grid > section {
|
||||
grid-column: span 3;
|
||||
max-height: 42rem;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
h1,
|
||||
h2 {
|
||||
margin-top: 0;
|
||||
.workspace-grid > section:nth-child(5),
|
||||
.workspace-grid > section:nth-child(6),
|
||||
.workspace-grid > section:nth-child(7) {
|
||||
grid-column: span 4;
|
||||
}
|
||||
|
||||
input,
|
||||
textarea,
|
||||
button,
|
||||
select {
|
||||
width: 100%;
|
||||
padding: 0.5rem;
|
||||
margin-top: 0.4rem;
|
||||
font: inherit;
|
||||
border: 1px solid #94a3b8;
|
||||
border-radius: 6px;
|
||||
.workspace-grid > section:nth-child(8),
|
||||
.workspace-grid > section:nth-child(9),
|
||||
.workspace-grid > section:nth-child(10) {
|
||||
grid-column: span 4;
|
||||
}
|
||||
|
||||
button {
|
||||
cursor: pointer;
|
||||
.app-shell > section:not(.workbench-status-strip) {
|
||||
margin-top: 1rem;
|
||||
}
|
||||
|
||||
.demo-actions {
|
||||
margin-top: 0.75rem;
|
||||
padding-top: 0.75rem;
|
||||
border-top: 1px solid var(--line);
|
||||
.app-shell > main + section {
|
||||
margin-top: 1rem;
|
||||
}
|
||||
|
||||
ul {
|
||||
padding-left: 1.1rem;
|
||||
margin-top: 0.6rem;
|
||||
.app-shell > main + section {
|
||||
border-color: #b8c9c0;
|
||||
}
|
||||
|
||||
.error {
|
||||
color: #7f1d1d;
|
||||
background: #fee2e2;
|
||||
padding: 0.6rem;
|
||||
border: 1px solid #fecaca;
|
||||
border-radius: 8px;
|
||||
padding: 0.7rem 0.85rem;
|
||||
background: #fff1f2;
|
||||
color: var(--danger);
|
||||
font-weight: 650;
|
||||
}
|
||||
|
||||
.muted {
|
||||
@@ -84,10 +239,10 @@ ul {
|
||||
}
|
||||
|
||||
.eyebrow {
|
||||
margin: 0 0 0.2rem;
|
||||
margin: 0 0 0.25rem;
|
||||
color: var(--muted);
|
||||
font-size: 0.75rem;
|
||||
font-weight: 700;
|
||||
font-size: 0.72rem;
|
||||
font-weight: 800;
|
||||
letter-spacing: 0.08em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
@@ -101,41 +256,55 @@ ul {
|
||||
|
||||
.panel-header button {
|
||||
width: auto;
|
||||
min-width: 9rem;
|
||||
min-width: 8.5rem;
|
||||
}
|
||||
|
||||
.form-grid {
|
||||
.form-grid,
|
||||
.map-controls {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
|
||||
gap: 0.75rem;
|
||||
grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
|
||||
gap: 0.72rem;
|
||||
align-items: end;
|
||||
}
|
||||
|
||||
.checkbox-row {
|
||||
display: flex;
|
||||
gap: 0.5rem;
|
||||
align-items: center;
|
||||
margin-top: 0.72rem;
|
||||
}
|
||||
|
||||
.checkbox-row input {
|
||||
width: auto;
|
||||
min-height: auto;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.summary-grid {
|
||||
.summary-grid,
|
||||
.status-strip-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
|
||||
gap: 0.65rem;
|
||||
margin-top: 0.75rem;
|
||||
gap: 0.7rem;
|
||||
}
|
||||
|
||||
.summary-grid {
|
||||
grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
|
||||
margin-top: 0.8rem;
|
||||
}
|
||||
|
||||
.summary-grid > div,
|
||||
.status-tile {
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 8px;
|
||||
background: var(--panel-soft);
|
||||
}
|
||||
|
||||
.summary-grid > div {
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 8px;
|
||||
padding: 0.6rem;
|
||||
padding: 0.7rem;
|
||||
}
|
||||
|
||||
.workbench-status-strip {
|
||||
margin: 1rem 0;
|
||||
box-shadow: var(--shadow);
|
||||
}
|
||||
|
||||
.status-strip-header {
|
||||
@@ -143,7 +312,7 @@ ul {
|
||||
gap: 1rem;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 0.75rem;
|
||||
margin-bottom: 0.8rem;
|
||||
}
|
||||
|
||||
.status-strip-header h2 {
|
||||
@@ -158,30 +327,26 @@ ul {
|
||||
}
|
||||
|
||||
.status-strip-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
|
||||
gap: 0.65rem;
|
||||
grid-template-columns: repeat(6, minmax(0, 1fr));
|
||||
}
|
||||
|
||||
.status-tile {
|
||||
min-height: 7rem;
|
||||
border: 1px solid var(--line);
|
||||
min-height: 6.7rem;
|
||||
border-left: 4px solid #64748b;
|
||||
border-radius: 8px;
|
||||
padding: 0.65rem;
|
||||
background: #ffffff;
|
||||
padding: 0.7rem;
|
||||
}
|
||||
|
||||
.status-tile strong {
|
||||
display: block;
|
||||
margin-top: 0.55rem;
|
||||
font-size: 1.05rem;
|
||||
margin-top: 0.48rem;
|
||||
font-size: 1.02rem;
|
||||
line-height: 1.22;
|
||||
}
|
||||
|
||||
.status-tile p {
|
||||
margin: 0.35rem 0 0;
|
||||
margin: 0.32rem 0 0;
|
||||
color: var(--muted);
|
||||
font-size: 0.88rem;
|
||||
font-size: 0.86rem;
|
||||
}
|
||||
|
||||
.status-tile-ready {
|
||||
@@ -189,7 +354,7 @@ ul {
|
||||
}
|
||||
|
||||
.status-tile-warning {
|
||||
border-left-color: #b45309;
|
||||
border-left-color: var(--warning);
|
||||
}
|
||||
|
||||
.status-tile-waiting {
|
||||
@@ -202,46 +367,52 @@ ul {
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
color: var(--muted);
|
||||
font-size: 0.78rem;
|
||||
font-weight: 700;
|
||||
font-size: 0.72rem;
|
||||
font-weight: 800;
|
||||
letter-spacing: 0.04em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.status-pill {
|
||||
width: auto;
|
||||
flex: 0 0 auto;
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 999px;
|
||||
padding: 0.1rem 0.45rem;
|
||||
background: #f8fafc;
|
||||
padding: 0.12rem 0.46rem;
|
||||
background: #ffffff;
|
||||
color: #334155;
|
||||
font-size: 0.72rem;
|
||||
text-transform: lowercase;
|
||||
}
|
||||
|
||||
.metric {
|
||||
display: block;
|
||||
font-size: 1.4rem;
|
||||
font-weight: 800;
|
||||
font-size: 1.35rem;
|
||||
font-weight: 850;
|
||||
}
|
||||
|
||||
.compact-list {
|
||||
padding-left: 1rem;
|
||||
color: var(--muted);
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.demo-actions {
|
||||
margin-top: 0.85rem;
|
||||
padding-top: 0.85rem;
|
||||
border-top: 1px solid var(--line);
|
||||
}
|
||||
|
||||
.map-container {
|
||||
width: 100%;
|
||||
height: 460px;
|
||||
border: 1px solid #94a3b8;
|
||||
height: min(38vh, 440px);
|
||||
min-height: 18rem;
|
||||
overflow: hidden;
|
||||
border: 1px solid var(--line-strong);
|
||||
border-radius: 8px;
|
||||
background: #dbe7e2;
|
||||
}
|
||||
|
||||
.map-controls {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
|
||||
gap: 0.75rem;
|
||||
align-items: end;
|
||||
margin-bottom: 0.75rem;
|
||||
margin-bottom: 0.85rem;
|
||||
}
|
||||
|
||||
.map-status {
|
||||
@@ -250,7 +421,88 @@ ul {
|
||||
}
|
||||
|
||||
.feature-inspector {
|
||||
margin-top: 0.75rem;
|
||||
margin-top: 0.85rem;
|
||||
border-top: 1px solid var(--line);
|
||||
padding-top: 0.75rem;
|
||||
padding-top: 0.85rem;
|
||||
}
|
||||
|
||||
.feature-inspector pre,
|
||||
section pre {
|
||||
max-height: 22rem;
|
||||
overflow: auto;
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 8px;
|
||||
padding: 0.85rem;
|
||||
background: #0b1411;
|
||||
color: #d7f7e8;
|
||||
font-size: 0.82rem;
|
||||
line-height: 1.48;
|
||||
}
|
||||
|
||||
section div {
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
section strong {
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
section li div {
|
||||
color: var(--muted);
|
||||
font-size: 0.88rem;
|
||||
line-height: 1.35;
|
||||
}
|
||||
|
||||
section li strong + div {
|
||||
margin-top: 0.2rem;
|
||||
}
|
||||
|
||||
@media (max-width: 1180px) {
|
||||
.workspace-grid > section,
|
||||
.workspace-grid > section:nth-child(5),
|
||||
.workspace-grid > section:nth-child(6),
|
||||
.workspace-grid > section:nth-child(7),
|
||||
.workspace-grid > section:nth-child(8),
|
||||
.workspace-grid > section:nth-child(9),
|
||||
.workspace-grid > section:nth-child(10) {
|
||||
grid-column: span 6;
|
||||
}
|
||||
|
||||
.status-strip-grid {
|
||||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 760px) {
|
||||
.app-shell {
|
||||
padding: 0.75rem;
|
||||
}
|
||||
|
||||
.app-shell > header,
|
||||
.status-strip-header,
|
||||
.panel-header {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.app-shell > header p,
|
||||
.status-next-action {
|
||||
margin-top: 0.55rem;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.workspace-grid,
|
||||
.status-strip-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.workspace-grid > section,
|
||||
.workspace-grid > section:nth-child(n) {
|
||||
grid-column: 1;
|
||||
max-height: none;
|
||||
}
|
||||
|
||||
.panel-header button {
|
||||
width: 100%;
|
||||
margin-top: 0.6rem;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user