Skip to content

Commit 0cc3703

Browse files
authored
Merge pull request #2250 from visualize-admin/feat/improve-ods-iframe
style: Improve ODS dataset preview iframe's appearance
2 parents 1706ec0 + 0e07598 commit 0cc3703

File tree

4 files changed

+13
-5
lines changed

4 files changed

+13
-5
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ You can also check the
2424
- Styles
2525
- Details button and Created with visualize.admin.ch are now rendered in the
2626
same line in footnotes when using "minimal" embed mode
27+
- Improved ODS dataset preview iframe's appearance
2728

2829
# [5.6.0] - 2025-04-15
2930

app/browse/datatable.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ export const PreviewTable = ({
132132
);
133133

134134
return (
135-
<div ref={tooltipContainerRef}>
135+
<div ref={tooltipContainerRef} style={{ width: "100%" }}>
136136
<Table>
137137
<caption style={{ display: "none" }}>{title}</caption>
138138
<TableHead

app/browser/dataset-preview.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ const useStyles = makeStyles<
4545
marginBottom: theme.spacing(6),
4646
},
4747
tableOuterWrapper: {
48-
width: "fit-content",
49-
maxWidth: "100%",
48+
width: "100%",
5049
boxShadow: theme.shadows[4],
5150
},
5251
tableInnerWrapper: {

app/browser/select-dataset-step.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,11 @@ const SelectDatasetStepContent = ({
391391
}}
392392
>
393393
<ContentWrapper
394-
sx={odsIframe ? { maxWidth: "unset !important", px: 8 } : {}}
394+
sx={
395+
odsIframe
396+
? { maxWidth: "unset !important", px: "8px !important" }
397+
: {}
398+
}
395399
>
396400
<AnimatePresence mode="wait">
397401
{dataset ? (
@@ -488,7 +492,11 @@ const SelectDatasetStepContent = ({
488492
</ContentWrapper>
489493
</Box>
490494
<ContentWrapper
491-
sx={odsIframe ? { maxWidth: "unset !important", px: 8 } : {}}
495+
sx={
496+
odsIframe
497+
? { maxWidth: "unset !important", px: "8px !important" }
498+
: {}
499+
}
492500
>
493501
<PanelLayout
494502
type={odsIframe ? "M" : "LM"}

0 commit comments

Comments
 (0)