Skip to content

Commit b7550ea

Browse files
committed
refactor: optimize spacing and margins in TimeseriesControls component
1 parent ffdcc7a commit b7550ea

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Changes
22

33
## June 19, 2025
4-
- Improved space utilization for controls with more compact vertical spacing and better wrapping behavior, including reduced vertical separation between wrapped elements
4+
- Improved space utilization for controls with more compact vertical spacing and better wrapping behavior, including significantly reduced vertical separation between rows of controls
55
- Added toggle legend button for plotly timeseries plots (Issue #328)
66
- Fixed margin difference between plotly and native NS plots by removing width reduction and right margin (Issue #330)
77

src/pages/NwbPage/plugins/common/components/TimeseriesControls.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ export const TimeRangeControls: FunctionComponent<TimeRangeControlsProps> = ({
169169
borderRadius: "5px",
170170
border: "1px solid #e9ecef",
171171
boxShadow: "0 1px 2px rgba(0,0,0,0.05)",
172-
margin: "1px 0",
172+
margin: "0",
173173
}}
174174
>
175175
<div
@@ -322,7 +322,7 @@ export const ItemRangeControls: FunctionComponent<ItemRangeControlsProps> = ({
322322
borderRadius: "5px",
323323
border: "1px solid #e9ecef",
324324
boxShadow: "0 1px 2px rgba(0,0,0,0.05)",
325-
margin: "1px 0",
325+
margin: "0",
326326
}}
327327
>
328328
<div
@@ -386,14 +386,14 @@ export const CondensedLayout: FunctionComponent<{
386386
}> = ({ children }) => (
387387
<div
388388
style={{
389-
padding: "3px",
389+
padding: "2px",
390390
background: "#f5f5f5",
391391
borderRadius: "5px",
392392
fontFamily: "sans-serif",
393393
fontSize: "0.85rem",
394394
display: "flex",
395395
gap: "6px",
396-
rowGap: "3px",
396+
rowGap: "1px",
397397
alignItems: "center",
398398
flexWrap: "wrap",
399399
}}
@@ -413,19 +413,19 @@ export const FullLayout: FunctionComponent<{
413413
return (
414414
<div
415415
style={{
416-
padding: "4px",
416+
padding: "2px",
417417
background: "#f5f5f5",
418418
borderRadius: "5px",
419419
fontFamily: "sans-serif",
420420
fontSize: "0.85rem",
421421
}}
422422
>
423-
<div style={{ marginBottom: "4px" }}>{recordingInfo}</div>
423+
<div style={{ marginBottom: "2px" }}>{recordingInfo}</div>
424424
<div
425425
style={{
426426
display: "flex",
427427
gap: "6px",
428-
rowGap: "3px",
428+
rowGap: "1px",
429429
alignItems: "flex-start",
430430
flexWrap: "wrap",
431431
overflowX: "auto",
@@ -459,7 +459,7 @@ export const SeparationControls: FunctionComponent<SeparationControlsProps> = ({
459459
borderRadius: "5px",
460460
border: "1px solid #e9ecef",
461461
boxShadow: "0 1px 2px rgba(0,0,0,0.05)",
462-
margin: "1px 0",
462+
margin: "0",
463463
}}
464464
>
465465
<div

0 commit comments

Comments
 (0)