Skip to content

Commit b386a28

Browse files
committed
update design
1 parent f39d1cf commit b386a28

File tree

2 files changed

+20
-25
lines changed

2 files changed

+20
-25
lines changed

src/components/ResourceList.svelte

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
<script lang="ts">
44
import CloseIcon from '@nasa-jpl/stellar/icons/close.svg?component';
5+
import UploadIcon from '@nasa-jpl/stellar/icons/upload.svg?component';
56
import { plan } from '../stores/plan';
67
import { resourceTypes, simulationDatasetId } from '../stores/simulation';
78
import type { User } from '../types/app';
@@ -10,8 +11,10 @@
1011
import effects from '../utilities/effects';
1112
import { permissionHandler } from '../utilities/permissionHandler';
1213
import { featurePermissions } from '../utilities/permissions';
14+
import { tooltip } from '../utilities/tooltip';
1315
import ResourceListPrefix from './ResourceListPrefix.svelte';
1416
import TimelineItemList from './TimelineItemList.svelte';
17+
import Input from './form/Input.svelte';
1518
1619
export let user: User | null;
1720
@@ -71,8 +74,8 @@
7174
<button class="close-upload" type="button" on:click={onHideUpload}>
7275
<CloseIcon />
7376
</button>
74-
<div class="upload-rows">
75-
<label for="file">Resources File</label>
77+
<Input layout="stacked">
78+
<label for="file">Resource File</label>
7679
<input
7780
class="w-100"
7881
name="file"
@@ -85,6 +88,8 @@
8588
permissionError: uploadPermissionError,
8689
}}
8790
/>
91+
</Input>
92+
<div class="use-simulation">
8893
<label class="st-typography-body timeline-item-list-filter-option-label" for="simulation-association">
8994
Use selected simulation
9095
</label>
@@ -117,8 +122,9 @@
117122
hasPermission: hasUploadPermission,
118123
permissionError: uploadPermissionError,
119124
}}
125+
use:tooltip={{ content: 'Upload Resources' }}
120126
>
121-
Upload Resources
127+
<UploadIcon />
122128
</button>
123129
</div>
124130
<ResourceListPrefix {item} />
@@ -137,28 +143,24 @@
137143
display: none;
138144
}
139145
140-
.upload-container :global(.upload-rows) {
141-
column-gap: 8px;
146+
.upload-container {
142147
display: grid;
143-
grid-template-columns: max-content auto;
144-
justify-content: space-between;
145148
row-gap: 8px;
146149
}
147150
148-
.st-button {
149-
gap: 4px;
150-
height: 20px;
151-
}
152-
153-
.upload-container :global(.simulation-checkbox) {
151+
.upload-container .use-simulation {
152+
column-gap: 8px;
153+
display: grid;
154+
grid-template-columns: max-content auto;
155+
justify-content: space-between;
154156
justify-self: left;
155157
margin: 0;
158+
width: 100%;
156159
}
157160
158161
.upload-container :global(.upload-button-container) {
159162
display: flex;
160163
flex-flow: row-reverse;
161-
margin-top: 8px;
162164
}
163165
164166
.upload-container :global(.close-upload) {

src/components/TimelineItemList.svelte

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@
146146
autocomplete="off"
147147
placeholder="Filter {typeName} types"
148148
/>
149-
<div style="position: relative">
149+
<div class="filter-buttons">
150150
<button
151151
class="st-button secondary menu-button"
152152
style="position: relative; z-index: 1"
@@ -187,17 +187,15 @@
187187
</div>
188188
</Menu>
189189
</div>
190+
<slot name="button" />
190191
</div>
191192

192193
<div class="controls">
193194
<slot name="header" />
194195
<div class="controls-header st-typography-medium">
195196
<div>{typeNamePlural} ({filteredItems.length})</div>
196197
<div>
197-
<div class="buttons">
198-
<slot name="button" />
199-
<button class="st-button secondary" on:click={onBulkAddToRow}> Add Filter to Row </button>
200-
</div>
198+
<button class="st-button secondary" on:click={onBulkAddToRow}> Add Filter to Row </button>
201199
<LayerPicker
202200
bind:this={layerPicker}
203201
rows={timelines[0]?.rows || []}
@@ -399,16 +397,11 @@
399397
flex: 1;
400398
}
401399
402-
.controls-header .buttons {
400+
.filter-buttons {
403401
display: flex;
404402
gap: 4px;
405403
}
406404
407-
.controls-header .buttons .st-button {
408-
gap: 4px;
409-
height: 20px;
410-
}
411-
412405
.list-items {
413406
display: flex;
414407
flex-direction: column;

0 commit comments

Comments
 (0)