Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9aa6a1b

Browse files
committed
fix width scroll issue (except review page)
Signed-off-by: shmck <shawn.j.mckay@gmail.com>
1 parentffac6b4 commit9aa6a1b

File tree

20 files changed

+45
-65
lines changed

20 files changed

+45
-65
lines changed

‎src/commands.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ export const createCommands = ({ extensionPath, workspaceState }: CreateCommandP
2828
return{
2929
// initialize
3030
[COMMANDS.START]:async()=>{
31-
console.log('start')
3231
if(webview&&webview.state.loaded){
3332
webview.createOrShow()
3433
}else{

‎web-app/.storybook/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import{configure}from'@storybook/react'
2-
import'../src/styles/index.css'
2+
import'../src/styles/reset.css'
33

44
// setup acquireVsCodeApi mock
55
//@ts-ignore

‎web-app/src/App.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ import Routes from './Routes'
1010
constApp=()=>(
1111
/*@ts-ignore invalid in enUS locale typings for @alifd/next@1.20.20 https://github.com/alibaba-fusion/next/commit/e3b934b */
1212
<ConfigProviderlocale={enUS}>
13-
<ErrorBoundary>
14-
<Workspace>
13+
<Workspace>
14+
<ErrorBoundary>
1515
<ThemeProvidertheme={theme}>
1616
<Routes/>
1717
</ThemeProvider>
18-
</Workspace>
19-
</ErrorBoundary>
18+
</ErrorBoundary>
19+
</Workspace>
2020
</ConfigProvider>
2121
)
2222

‎web-app/src/components/Error/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ const styles = {
1414
alignItems:'center'as'center',
1515
border:`0.5rem solid${theme['$color-error-2']}`,
1616
padding:'1rem',
17-
width:'100vw',
17+
width:'100%',
18+
maxWidth:'100%',
1819
height:'100%',
1920
}),
2021
content:(theme:Theme)=>({

‎web-app/src/components/Workspace/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import*asReactfrom'react'
22
import{css,jsx}from'@emotion/core'
3-
import{useWindowResize}from'./resize'
43
import{Theme}from'../../styles/theme'
54

65
interfaceProps{
@@ -13,13 +12,14 @@ const styles = {
1312
position:'relative'as'relative',
1413
margin:0,
1514
width:'100vw',
15+
maxWidth:'100%',
1616
backgroundColor:theme['$color-white'],
17+
overflow:'auto',
1718
}),
1819
}
1920

2021
constWorkspace=({ children}:Props)=>{
21-
constdimensions=useWindowResize()
22-
return<divcss={{ ...styles.page, ...dimensions}}>{children}</div>
22+
return<divcss={styles.page}>{children}</div>
2323
}
2424

2525
exportdefaultWorkspace

‎web-app/src/components/Workspace/resize.ts

Lines changed: 0 additions & 26 deletions
This file was deleted.

‎web-app/src/containers/Loading/LoadingPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const styles = {
1515
flexDirection:'column'as'column',
1616
alignItems:'center',
1717
justifyContent:'center',
18-
width:'100vw',
18+
width:'100%',
1919
},
2020
}
2121

‎web-app/src/containers/Loading/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const styles = {
1717
alignItems:'center'as'center',
1818
justifyContent:'center'as'center',
1919
height:'100%',
20-
width:'100vw',
20+
width:'100%',
2121
},
2222
processes:{
2323
padding:'0 1rem',

‎web-app/src/containers/SelectTutorial/SelectTutorialForm.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import TutorialFile from './forms/TutorialFile'
88
conststyles={
99
formWrapper:{
1010
padding:'1rem',
11-
width:'100vw',
11+
width:'100%',
1212
height:'auto',
1313
},
1414
}

‎web-app/src/containers/SelectTutorial/TutorialOverview/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const styles = {
1010
position:'relative'as'relative',
1111
display:'flex'as'flex',
1212
flexDirection:'column'as'column',
13-
width:'100vw',
13+
width:'100%',
1414
},
1515
nav:(theme:Theme)=>({
1616
height:theme['$nav-height'],

‎web-app/src/containers/SelectTutorial/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const styles = {
99
page:{
1010
position:'relative'as'relative',
1111
height:'auto',
12-
width:'100vw',
12+
width:'100%',
1313
},
1414
selectPage:{
1515
padding:'1rem',

‎web-app/src/containers/Start/index.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,18 @@ import * as TT from 'typings/tutorial'
44
importBetaBadgefrom'../../components/BetaBadge'
55
import{css,jsx}from'@emotion/core'
66
importButtonfrom'../../components/Button'
7+
import{Theme}from'../../styles/theme'
78

89
conststyles={
9-
page:{
10+
page:(theme:Theme)=>({
1011
position:'relative'as'relative',
1112
display:'flex'as'flex',
1213
flexDirection:'column'as'column',
13-
width:'100vw',
14+
width:'100%',
15+
maxWidth:'100%',
1416
height:'100vh',
15-
},
17+
backgroundColor:theme['$color-white'],
18+
}),
1619
header:{
1720
flex:1,
1821
display:'flex'as'flex',

‎web-app/src/containers/Tutorial/components/CompletedBanner.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ import { Theme } from '../../../styles/theme'
66
conststyles={
77
banner:(theme:Theme)=>({
88
height:'auto',
9-
width:'100vw',
9+
width:'100%',
1010
backgroundColor:theme['$color-brand1-9'],
1111
color:theme['$color-white'],
1212
padding:'0.5rem 1rem',
1313
}),
1414
header:{
1515
position:'relative'as'relative',
16-
width:'100vw',
16+
width:'100%',
1717
},
1818
headerMessage:{
1919
marginLeft:'0.5rem',

‎web-app/src/containers/Tutorial/components/Content.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ const styles = {
55
text:{
66
padding:'0rem 1rem',
77
paddingBottom:'1rem',
8+
width:'100%',
89
},
910
title:{
1011
fontSize:'1.2rem',

‎web-app/src/containers/Tutorial/components/Level.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const styles = {
1010
backgroundColor:theme['$color-white'],
1111
position:'relative'as'relative',
1212
height:'auto',
13-
width:'100vw',
13+
width:'100%',
1414
}),
1515
content:{
1616
display:'flex'as'flex',

‎web-app/src/containers/Tutorial/containers/About.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@ import Markdown from '../../../components/Markdown'
33
import{Theme}from'../../../styles/theme'
44

55
conststyles={
6-
container:{
6+
container:(theme:Theme)=>({
77
display:'flex'as'flex',
88
flexDirection:'column'as'column',
9-
},
9+
backgroundColor:theme['$color-white'],
10+
height:'auto',
11+
}),
1012
header:(theme:Theme)=>({
1113
display:'flex'as'flex',
1214
alignItems:'center',

‎web-app/src/containers/Tutorial/containers/Review.tsx

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,13 @@ interface Props {
1010
}
1111

1212
conststyles={
13-
container:{
14-
height:'auto',
13+
container:(theme:Theme)=>({
1514
display:'flex'as'flex',
1615
flexDirection:'column'as'column',
17-
},
16+
height:'auto',
17+
backgroundColor:theme['$color-white'],
18+
paddingBottom:'2rem',
19+
}),
1820
header:(theme:Theme)=>({
1921
display:'flex'as'flex',
2022
alignItems:'center',
@@ -33,13 +35,11 @@ const styles = {
3335
alignItems:'center',
3436
fontSize:'70%',
3537
},
36-
levels:{
37-
paddingBottom:'2rem',
38-
},
38+
levels:{},
3939
}
4040

4141
constReviewPage=(props:Props)=>{
42-
const[stepVisibility,setStepVisibility]=React.useState(false)
42+
const[stepVisibility,setStepVisibility]=React.useState(true)
4343
return(
4444
<divcss={styles.container}>
4545
<divcss={styles.header}>
@@ -49,16 +49,14 @@ const ReviewPage = (props: Props) => {
4949
<Switchchecked={stepVisibility}onChange={(checked)=>setStepVisibility(checked)}/>
5050
</div>
5151
</div>
52+
5253
<divcss={styles.levels}>
5354
{props.levels.map((level:T.LevelUI,index:number)=>(
54-
<divkey={level.id}>
55-
<div>
56-
<Contenttitle={level.title}content={level.content}/>
57-
{stepVisibility ?<Stepssteps={level.steps}displayAll/> :null}
58-
</div>
59-
{/* divider */}
55+
<>
56+
<Contenttitle={level.title}content={level.content}/>
57+
{stepVisibility ?<Stepssteps={level.steps}displayAll/> :null}
6058
{index<props.levels.length-1 ?<hr/> :null}
61-
</div>
59+
</>
6260
))}
6361
</div>
6462
</div>

‎web-app/src/containers/Tutorial/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ import { useTheme } from 'emotion-theming'
2121

2222
conststyles={
2323
page:{
24-
width:'100vw',
24+
width:'100%',
25+
maxWidth:'100%',
26+
height:'auto',
2527
paddingBottom:'5rem',
2628
},
2729
header:(theme:Theme)=>({

‎web-app/src/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import './mock'
77
importAppfrom'./App'
88

99
// init initial styles
10-
import'./styles/index.css'
10+
import'./styles/reset.css'
1111
// init listeners
1212
import'./services/listeners'
1313

File renamed without changes.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp