Skip to content

Commit 8a04c85

Browse files
fix: square grid for first mile language tiles (#4421)
1 parent 23c737a commit 8a04c85

File tree

2 files changed

+50
-53
lines changed

2 files changed

+50
-53
lines changed

src/homepageExperience/containers/HomepageContainer.scss

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
align-self: flex-start;
66
}
77
svg {
8-
margin-top: 30px;
9-
margin-bottom: 30px;
8+
margin-top: 25%;
109
}
1110
align-items: center;
1211
justify-content: center;

src/homepageExperience/containers/HomepageContainer.tsx

Lines changed: 49 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import {
66
AlignItems,
77
Columns,
88
ComponentSize,
9-
DapperScrollbars,
109
FlexBox,
1110
FlexDirection,
1211
Grid,
@@ -17,6 +16,7 @@ import {
1716
InfluxColors,
1817
Page,
1918
ResourceCard,
19+
SquareGrid,
2020
} from '@influxdata/clockface'
2121

2222
import {pageTitleSuffixer} from 'src/shared/utils/pageTitles'
@@ -50,6 +50,8 @@ export const HomepageContainer: FC = () => {
5050
const linkStyle = {color: InfluxColors.Grey75}
5151
const moreStyle = {height: '100%', ...linkStyle}
5252

53+
const squareGridCardSize = '200px'
54+
5355
// events handling
5456
const logPythonEvent = () => {
5557
event('firstMile.pythonWizard.clicked')
@@ -77,57 +79,53 @@ export const HomepageContainer: FC = () => {
7779
Write and query data using the programming language of your
7880
choice
7981
</h5>
80-
<DapperScrollbars autoSizeHeight={true} autoHide={true}>
81-
<FlexBox
82-
margin={ComponentSize.Large}
83-
alignItems={AlignItems.Stretch}
84-
stretchToFitWidth={false}
85-
testID="language-tiles--scrollbox"
86-
>
87-
<ResourceCard style={cardStyle}>
88-
<Link
89-
to={pythonWizardLink}
90-
style={linkStyle}
91-
onClick={logPythonEvent}
82+
<SquareGrid
83+
cardSize={squareGridCardSize}
84+
gutter={ComponentSize.Large}
85+
>
86+
<ResourceCard style={cardStyle}>
87+
<Link
88+
to={pythonWizardLink}
89+
style={linkStyle}
90+
onClick={logPythonEvent}
91+
>
92+
<div
93+
className="homepage-wizard-language-tile"
94+
data-testid="homepage-wizard-language-tile--python"
9295
>
93-
<div
94-
className="homepage-wizard-language-tile"
95-
data-testid="homepage-wizard-language-tile--python"
96-
>
97-
<h5>Python</h5>
98-
{PythonIcon}
99-
</div>
100-
</Link>
101-
</ResourceCard>
102-
<ResourceCard style={cardStyle}>
103-
<Link to={javaScriptNodeLink} style={linkStyle}>
104-
<div className="homepage-wizard-language-tile">
105-
<h5>JavaScript/Node.js</h5>
106-
{NodejsIcon}
107-
</div>
108-
</Link>
109-
</ResourceCard>
110-
<ResourceCard style={cardStyle}>
111-
<Link to={golangLink} style={linkStyle}>
112-
<div className="homepage-wizard-language-tile">
113-
<h5>Go</h5>
114-
{GoIcon}
115-
</div>
116-
</Link>
117-
</ResourceCard>
118-
<ResourceCard style={cardStyle}>
119-
<Link to={loadDataSourcesLink} style={moreStyle}>
120-
<div className="homepage-wizard-language-tile">
121-
<span>
122-
<h5>
123-
MORE <Icon glyph={IconFont.ArrowRight_New} />
124-
</h5>
125-
</span>
126-
</div>
127-
</Link>
128-
</ResourceCard>
129-
</FlexBox>
130-
</DapperScrollbars>
96+
<h5>Python</h5>
97+
{PythonIcon}
98+
</div>
99+
</Link>
100+
</ResourceCard>
101+
<ResourceCard style={cardStyle}>
102+
<Link to={javaScriptNodeLink} style={linkStyle}>
103+
<div className="homepage-wizard-language-tile">
104+
<h5>JavaScript/Node.js</h5>
105+
{NodejsIcon}
106+
</div>
107+
</Link>
108+
</ResourceCard>
109+
<ResourceCard style={cardStyle}>
110+
<Link to={golangLink} style={linkStyle}>
111+
<div className="homepage-wizard-language-tile">
112+
<h5>Go</h5>
113+
{GoIcon}
114+
</div>
115+
</Link>
116+
</ResourceCard>
117+
<ResourceCard style={cardStyle}>
118+
<Link to={loadDataSourcesLink} style={moreStyle}>
119+
<div className="homepage-wizard-language-tile">
120+
<span>
121+
<h5>
122+
MORE <Icon glyph={IconFont.ArrowRight_New} />
123+
</h5>
124+
</span>
125+
</div>
126+
</Link>
127+
</ResourceCard>
128+
</SquareGrid>
131129
<hr style={{marginTop: '32px'}} />
132130
<Link to={cliPageLink} style={linkStyle}>
133131
<div className="homepage-write-data-tile">

0 commit comments

Comments
 (0)