Skip to content

Commit 7466bf1

Browse files
committed
Fix scrolling section in Welcome page
Fixes #3384 Signed-off-by: David Thompson <davthomp@redhat.com>
1 parent cd195df commit 7466bf1

File tree

2 files changed

+35
-198
lines changed

2 files changed

+35
-198
lines changed

src/webview/welcome/app/welcome.scss

Lines changed: 1 addition & 162 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,6 @@ header {
4545
}
4646
}
4747

48-
.content__area--full-scroll {
49-
background-color: unset !important;
50-
margin-bottom: 90vh;
51-
52-
.section--settings {
53-
margin: 0 0 1em 0;
54-
}
55-
}
56-
5748
.header__logo {
5849
display: flex;
5950
flex-direction: row;
@@ -78,23 +69,6 @@ header {
7869
max-height: 400px;
7970
}
8071

81-
.last__image {
82-
height: 30rem;
83-
margin-left: 5rem;
84-
}
85-
86-
.fixMargin {
87-
margin-top: -70px;
88-
}
89-
90-
.lastone {
91-
max-height: 25rem;
92-
}
93-
94-
.link__configure {
95-
margin-left: 10px;
96-
}
97-
9872
section {
9973
display: flex;
10074
flex-wrap: wrap;
@@ -111,50 +85,6 @@ section {
11185
}
11286
}
11387

114-
.sticky-section-content .sticky-section-exten {
115-
top: 0;
116-
width: 100%;
117-
}
118-
119-
@media screen and (min-width: 120px) and (max-width: 400px) {
120-
.sticky-section-content .sticky-section-exten{
121-
height: 8vh !important;
122-
}
123-
124-
.sticky-section {
125-
height: 50vh !important;
126-
}
127-
}
128-
129-
@media only screen and (min-width: 440px) and (max-width: 1080px) {
130-
.sticky-section-content .sticky-section-exten{
131-
height: 10vh !important;
132-
}
133-
134-
.sticky-section {
135-
height: 65vh !important;
136-
}
137-
}
138-
139-
@media only screen and (min-width: 1080px) and (max-width: 2500px) {
140-
.sticky-section-content .sticky-section-exten{
141-
height: 12vh !important;
142-
}
143-
144-
.sticky-section {
145-
height: 65vh !important;
146-
}
147-
}
148-
149-
.sticky-content-section {
150-
height: 60vh;
151-
padding-left: 3rem;
152-
}
153-
154-
.section--full {
155-
flex-flow: column;
156-
}
157-
15888
.section--settings {
15989
flex: 0 1 auto;
16090
display: flex;
@@ -179,14 +109,6 @@ section {
179109
flex-flow: column wrap;
180110
}
181111

182-
.extensionContainer {
183-
margin: auto;
184-
display: flex;
185-
flex-direction: row;
186-
width: 100%;
187-
height: 50rem;
188-
}
189-
190112
.section__header {
191113
display: flex;
192114
align-items: baseline;
@@ -200,19 +122,6 @@ section {
200122
h2 {
201123
margin-bottom: 0;
202124
}
203-
204-
.link__configure,
205-
.link__learn-more {
206-
visibility: hidden;
207-
}
208-
209-
&:hover {
210-
211-
.link__configure,
212-
.link__learn-more {
213-
visibility: visible;
214-
}
215-
}
216125
}
217126

218127
.section__header-hint {
@@ -236,11 +145,6 @@ section {
236145
width: 600px;
237146
}
238147

239-
.sticky-section-hint {
240-
width: 53.125rem;
241-
word-spacing: 2px !important;
242-
}
243-
244148
.section__footer {
245149
margin: 2rem;
246150
width: fit-content;
@@ -254,77 +158,12 @@ section {
254158
}
255159
}
256160

257-
.scroll__content {
258-
height: 27rem;
259-
overflow-y: auto;
260-
}
261-
262-
.scroll__content::-webkit-scrollbar {
263-
width: 0;
264-
}
265-
266-
.imageContent {
267-
padding: 1em;
268-
}
269-
270-
.conent--section--settings {
271-
flex: 0 1 auto;
272-
display: flex;
273-
flex-wrap: wrap;
274-
border-radius: 6px;
275-
margin: 1em;
276-
padding: 1em;
277-
278-
.vscode-dark & {
279-
background: var(--color-background--lighten-075);
280-
}
281-
282-
.vscode-light & {
283-
background: var(--color-background--darken-05);
284-
}
285-
}
286-
287-
.section__brand__preview,
288-
.section__preview {
161+
.section__brand__preview {
289162
flex: 0 1 auto;
290163
position: relative;
291164
margin-left: 0rem;
292165
}
293166

294-
.sticky-section {
295-
display: flex;
296-
flex-direction: row;
297-
margin-left: 10rem;
298-
top: 0%;
299-
background: inherit;
300-
}
301-
302-
.sticky-section-content {
303-
display: flex;
304-
flex-direction: column;
305-
height: auto;
306-
}
307-
308-
.sticky-section label {
309-
margin: 0px;
310-
position: sticky;
311-
top: 50%;
312-
transform: translate(0, -50%);
313-
text-align: center;
314-
}
315-
316-
317-
.section__title {
318-
flex: 1 0 auto;
319-
margin: 0;
320-
}
321-
322-
.section__title--primary {
323-
font-size: 3rem;
324-
margin: 1em;
325-
justify-content: center;
326-
}
327-
328167
.section__whatsnew {
329168
display: flex;
330169
flex-direction: column;

src/webview/welcome/app/welcomePage.tsx

Lines changed: 34 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,25 @@
22
* Copyright (c) Red Hat, Inc. All rights reserved.
33
* Licensed under the MIT License. See LICENSE file in the project root for license information.
44
*-----------------------------------------------------------------------------------------------*/
5-
import React from 'react';
6-
import { VSCodeMessage } from './vsCodeMessage';
7-
import { Checkbox, FormControlLabel, Icon, Stack, SvgIcon, Typography } from '@mui/material';
8-
import HelpIcon from '@mui/icons-material/Help';
9-
import ChatIcon from '@mui/icons-material/Chat';
105
import BugReportIcon from '@mui/icons-material/BugReport';
6+
import ChatIcon from '@mui/icons-material/Chat';
117
import GitHubIcon from '@mui/icons-material/GitHub';
12-
import RocketLaunchIcon from '@mui/icons-material/RocketLaunch';
8+
import HelpIcon from '@mui/icons-material/Help';
139
import LaptopMacIcon from '@mui/icons-material/LaptopMac';
10+
import RocketLaunchIcon from '@mui/icons-material/RocketLaunch';
11+
import { Box, Checkbox, FormControlLabel, Icon, Stack, SvgIcon, Typography } from '@mui/material';
12+
import React from 'react';
1413
import ScrollToTop from 'react-scroll-to-top';
15-
import './welcome.scss';
1614
import OpenShiftExtensionIcon from '../../../../images/openshift_extension.png';
17-
import OdoLogo from '../../../../images/welcome/odo.png';
18-
import MicrosoftLogo from '../../../../images/welcome/microsoft.svg';
1915
import OpenShiftLogo from '../../../../images/title/logo.svg';
20-
import DevfileBranding from '../../../../images/welcome/devfile.png';
21-
import ComponentBranding from '../../../../images/welcome/component.png';
22-
import CloudBranding from '../../../../images/welcome/cloud.svg';
2316
import OpenShiftBranding from '../../../../images/welcome/OpenShift-Branding-box.png';
17+
import CloudBranding from '../../../../images/welcome/cloud.svg';
18+
import ComponentBranding from '../../../../images/welcome/component.png';
19+
import DevfileBranding from '../../../../images/welcome/devfile.png';
20+
import MicrosoftLogo from '../../../../images/welcome/microsoft.svg';
21+
import OdoLogo from '../../../../images/welcome/odo.png';
22+
import { VSCodeMessage } from './vsCodeMessage';
23+
import './welcome.scss';
2424

2525
export interface DefaultProps {
2626
analytics?: import('@segment/analytics-next').Analytics;
@@ -366,38 +366,36 @@ export class Welcome extends React.Component<DefaultProps, {
366366
<img className='content__image__preview' src={DevfileBranding} />
367367
</div>
368368
</section>
369-
<section className='section--settings' style={{ gap: '3rem' }}>
370-
<div className='sticky-section'>
371-
<div className='setting__input setting__input--big' style={{ borderBottom: '0px' }}>
372-
<label style={{ display: 'flex', flexDirection: 'row' }}>
373-
<Typography variant='h2' className='highlight'>OpenShift extension</Typography>
374-
</label>
369+
<Stack direction='row' width='100%' alignItems='stretch' justifyContent='center' gap='1em 2em' margin='1em' padding='1em' flexWrap='wrap'>
370+
<Stack alignSelf='stretch' flexShrink='1' marginY={1}>
371+
<Box position='sticky' top='calc(50vh - 37.5px)'>
372+
<Typography variant='h2' className='highlight' textAlign='right'>OpenShift extension</Typography>
373+
</Box>
374+
</Stack>
375+
<Stack direction='column' width='max(50%, 500px)' gap='1em'>
376+
<div>
377+
<p>Allows developers to easily <b>create, deploy and live debug</b> container applications running on OpenShift &#38; Kubernetes. Thus enhancing the development inner loop workflow through One-click actions right from IDE.</p>
375378
</div>
376-
</div>
377-
<section className='sticky-section-content'>
378-
<div className='sticky-section-exten'>
379-
<p className='section__header-hint sticky-section-hint'>Allows developers to easily <b>create, deploy and live debug</b> container applications running on OpenShift &#38; Kubernetes. Thus enhancing the development inner loop workflow through One-click actions right from IDE.</p>
380-
</div>
381-
<div className='sticky-section-exten'>
382-
<p className='section__header-hint sticky-section-hint'>Allows developers to <b>Push code fast and often.</b> Spend less time maintaining your deployment infrastructure and more time coding. Immediately have your application running each time you compile.</p>
379+
<div>
380+
<p>Allows developers to <b>Push code fast and often.</b> Spend less time maintaining your deployment infrastructure and more time coding. Immediately have your application running each time you compile.</p>
383381
</div>
384-
<div className='sticky-section-exten'>
385-
<p className='section__header-hint sticky-section-hint'><b>Import your code from git</b> and deploy on OpenShift using recommended devfile.</p>
382+
<div>
383+
<p><b>Import your code from git</b> and deploy on OpenShift using recommended devfile.</p>
386384
</div>
387-
<div className='sticky-section-exten'>
388-
<p className='section__header-hint sticky-section-hint'>Allows to browse the catalog and discover <b>Helm Charts</b> and install them on the connected cluster.</p>
385+
<div>
386+
<p>Allows to browse the catalog and discover <b>Helm Charts</b> and install them on the connected cluster.</p>
389387
</div>
390-
<div className='sticky-section-exten'>
391-
<p className='section__header-hint sticky-section-hint'>Allows to connect &#38; <b>provision free OpenShift cluster</b> from IDE, using a guided workflow. This workflow allows you to either Run OpenShift locally or provision a free 30 days Developer Sandbox.</p>
388+
<div>
389+
<p>Allows to connect &#38; <b>provision free OpenShift cluster</b> from IDE, using a guided workflow. This workflow allows you to either Run OpenShift locally or provision a free 30 days Developer Sandbox.</p>
392390
</div>
393-
<div className='sticky-section-exten'>
394-
<p className='section__header-hint sticky-section-hint'>Allows Monitoring through <b>view and stream logs</b> from your deployments, pods and containers for Kubernetes resources, with One Click from IDE.
391+
<div>
392+
<p>Allows Monitoring through <b>view and stream logs</b> from your deployments, pods and containers for Kubernetes resources, with One Click from IDE.
395393
</p>
396394
</div>
397-
</section>
398-
</section>
399-
{this.footer}
395+
</Stack>
396+
</Stack>
400397
</div>
398+
{this.footer}
401399
</div>
402400
<div className='header__logo'>
403401
<FormControlLabel control={<Checkbox checked={isChecked} onChange={this.updateShowWelcomePageConfig} sx={{ color: 'var(--vscode-foreground)', '&.Mui-checked': { color: 'var(--vscode-foreground)' } }} />}

0 commit comments

Comments
 (0)