Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
logging-scratch-gui
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
David Goessmann
logging-scratch-gui
Commits
cf58d318
Commit
cf58d318
authored
7 years ago
by
Ray Schamp
Browse files
Options
Downloads
Patches
Plain Diff
Fix tab style handling, changed in 1.0
parent
de9c3c0f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/components/gui/gui.css
+7
-3
7 additions, 3 deletions
src/components/gui/gui.css
src/components/gui/gui.jsx
+26
-10
26 additions, 10 deletions
src/components/gui/gui.jsx
with
33 additions
and
13 deletions
src/components/gui/gui.css
+
7
−
3
View file @
cf58d318
...
@@ -47,7 +47,7 @@
...
@@ -47,7 +47,7 @@
border-bottom
:
0
!important
;
border-bottom
:
0
!important
;
}
}
.tab-list
.tab
{
.tab
{
flex-grow
:
1
;
flex-grow
:
1
;
height
:
80%
;
height
:
80%
;
margin-left
:
1px
;
margin-left
:
1px
;
...
@@ -63,9 +63,9 @@
...
@@ -63,9 +63,9 @@
align-items
:
center
;
align-items
:
center
;
}
}
.tab.is-selected
{
.tab-list
.tab
[
aria-selected
=
"true"
]
{
color
:
#40B9F5
;
color
:
#40B9F5
;
background-color
:
#FFFFFF
;
}
}
.tabs
{
.tabs
{
...
@@ -80,6 +80,10 @@
...
@@ -80,6 +80,10 @@
position
:
relative
;
position
:
relative
;
flex-grow
:
1
;
flex-grow
:
1
;
flex-shrink
:
0
;
flex-shrink
:
0
;
display
:
none
;
}
.tab-panel.is-selected
{
display
:
flex
;
display
:
flex
;
}
}
...
...
This diff is collapsed.
Click to expand it.
src/components/gui/gui.jsx
+
26
−
10
View file @
cf58d318
const
classNames
=
require
(
'
classnames
'
);
const
PropTypes
=
require
(
'
prop-types
'
);
const
PropTypes
=
require
(
'
prop-types
'
);
const
React
=
require
(
'
react
'
);
const
React
=
require
(
'
react
'
);
const
{
Tab
,
Tabs
,
TabList
,
TabPanel
}
=
require
(
'
react-tabs
'
);
const
tabStyles
=
require
(
'
react-tabs/style/react-tabs.css
'
);
const
VM
=
require
(
'
scratch-vm
'
);
const
VM
=
require
(
'
scratch-vm
'
);
const
Blocks
=
require
(
'
../../containers/blocks.jsx
'
);
const
Blocks
=
require
(
'
../../containers/blocks.jsx
'
);
const
CostumeTab
=
require
(
'
../../containers/costume-tab.jsx
'
);
const
CostumeTab
=
require
(
'
../../containers/costume-tab.jsx
'
);
const
GreenFlag
=
require
(
'
../../containers/green-flag.jsx
'
);
const
GreenFlag
=
require
(
'
../../containers/green-flag.jsx
'
);
...
@@ -8,12 +12,13 @@ const TargetPane = require('../../containers/target-pane.jsx');
...
@@ -8,12 +12,13 @@ const TargetPane = require('../../containers/target-pane.jsx');
const
SoundTab
=
require
(
'
../../containers/sound-tab.jsx
'
);
const
SoundTab
=
require
(
'
../../containers/sound-tab.jsx
'
);
const
Stage
=
require
(
'
../../containers/stage.jsx
'
);
const
Stage
=
require
(
'
../../containers/stage.jsx
'
);
const
StopAll
=
require
(
'
../../containers/stop-all.jsx
'
);
const
StopAll
=
require
(
'
../../containers/stop-all.jsx
'
);
const
MenuBar
=
require
(
'
../menu-bar/menu-bar.jsx
'
);
const
{
Tab
,
Tabs
,
TabList
,
TabPanel
}
=
require
(
'
react-tabs
'
);
const
Box
=
require
(
'
../box/box.jsx
'
);
const
Box
=
require
(
'
../box/box.jsx
'
);
const
MenuBar
=
require
(
'
../menu-bar/menu-bar.jsx
'
);
const
styles
=
require
(
'
./gui.css
'
);
const
styles
=
require
(
'
./gui.css
'
);
const
GUIComponent
=
props
=>
{
const
GUIComponent
=
props
=>
{
const
{
const
{
basePath
,
basePath
,
...
@@ -31,6 +36,15 @@ const GUIComponent = props => {
...
@@ -31,6 +36,15 @@ const GUIComponent = props => {
);
);
}
}
const
tabClassNames
=
{
tabs
:
styles
.
tabs
,
tab
:
classNames
(
tabStyles
.
reactTabsTab
,
styles
.
tab
),
tabList
:
classNames
(
tabStyles
.
reactTabsTabList
,
styles
.
tabList
),
tabPanel
:
classNames
(
tabStyles
.
reactTabsTabPanel
,
styles
.
tabPanel
),
tabPanelSelected
:
classNames
(
tabStyles
.
reactTabsTabPanelSelected
,
styles
.
isSelected
),
tabSelected
:
classNames
(
tabStyles
.
reactTabsTabSelected
,
styles
.
isSelected
)
};
return
(
return
(
<
Box
<
Box
className
=
{
styles
.
pageWrapper
}
className
=
{
styles
.
pageWrapper
}
...
@@ -41,16 +55,18 @@ const GUIComponent = props => {
...
@@ -41,16 +55,18 @@ const GUIComponent = props => {
<
Box
className
=
{
styles
.
flexWrapper
}
>
<
Box
className
=
{
styles
.
flexWrapper
}
>
<
Box
className
=
{
styles
.
editorWrapper
}
>
<
Box
className
=
{
styles
.
editorWrapper
}
>
<
Tabs
<
Tabs
className
=
{
styl
es
.
tabs
}
className
=
{
tabClassNam
es
.
tabs
}
forceRenderTabPanel
=
{
true
}
// eslint-disable-line react/jsx-boolean-value
forceRenderTabPanel
=
{
true
}
// eslint-disable-line react/jsx-boolean-value
selectedTabClassName
=
{
tabClassNames
.
tabSelected
}
selectedTabPanelClassName
=
{
tabClassNames
.
tabPanelSelected
}
onSelect
=
{
onTabSelect
}
onSelect
=
{
onTabSelect
}
>
>
<
TabList
className
=
{
styl
es
.
tabList
}
>
<
TabList
className
=
{
tabClassNam
es
.
tabList
}
>
<
Tab
className
=
{
styl
es
.
tab
}
>
Scripts
</
Tab
>
<
Tab
className
=
{
tabClassNam
es
.
tab
}
>
Scripts
</
Tab
>
<
Tab
className
=
{
styl
es
.
tab
}
>
Costumes
</
Tab
>
<
Tab
className
=
{
tabClassNam
es
.
tab
}
>
Costumes
</
Tab
>
<
Tab
className
=
{
styl
es
.
tab
}
>
Sounds
</
Tab
>
<
Tab
className
=
{
tabClassNam
es
.
tab
}
>
Sounds
</
Tab
>
</
TabList
>
</
TabList
>
<
TabPanel
className
=
{
styl
es
.
tabPanel
}
>
<
TabPanel
className
=
{
tabClassNam
es
.
tabPanel
}
>
<
Box
className
=
{
styles
.
blocksWrapper
}
>
<
Box
className
=
{
styles
.
blocksWrapper
}
>
<
Blocks
<
Blocks
grow
=
{
1
}
grow
=
{
1
}
...
@@ -62,10 +78,10 @@ const GUIComponent = props => {
...
@@ -62,10 +78,10 @@ const GUIComponent = props => {
/>
/>
</
Box
>
</
Box
>
</
TabPanel
>
</
TabPanel
>
<
TabPanel
className
=
{
styl
es
.
tabPanel
}
>
<
TabPanel
className
=
{
tabClassNam
es
.
tabPanel
}
>
<
CostumeTab
vm
=
{
vm
}
/>
<
CostumeTab
vm
=
{
vm
}
/>
</
TabPanel
>
</
TabPanel
>
<
TabPanel
className
=
{
styl
es
.
tabPanel
}
>
<
TabPanel
className
=
{
tabClassNam
es
.
tabPanel
}
>
<
SoundTab
vm
=
{
vm
}
/>
<
SoundTab
vm
=
{
vm
}
/>
</
TabPanel
>
</
TabPanel
>
</
Tabs
>
</
Tabs
>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment