Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
Drip
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
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
backup
Drip
Commits
646543c9
Commit
646543c9
authored
6 years ago
by
emelko
Browse files
Options
Downloads
Patches
Plain Diff
Make stats look a bit more consistent with framed segment
Co-Authored-By:
tina
<
1700791-liv-theo@users.noreply.gitlab.com
>
parent
ca905c6b
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
components/stats.js
+14
-11
14 additions, 11 deletions
components/stats.js
styles/index.js
+2
-11
2 additions, 11 deletions
styles/index.js
with
16 additions
and
22 deletions
components/stats.js
+
14
−
11
View file @
646543c9
...
@@ -9,6 +9,7 @@ import cycleModule from '../lib/cycle'
...
@@ -9,6 +9,7 @@ import cycleModule from '../lib/cycle'
import
{
getCycleLengthStats
as
getCycleInfo
}
from
'
../lib/cycle-length
'
import
{
getCycleLengthStats
as
getCycleInfo
}
from
'
../lib/cycle-length
'
import
{
stats
as
labels
}
from
'
../i18n/en/labels
'
import
{
stats
as
labels
}
from
'
../i18n/en/labels
'
import
AppText
from
'
./app-text
'
import
AppText
from
'
./app-text
'
import
FramedSegment
from
'
./framed-segment
'
export
default
class
Stats
extends
Component
{
export
default
class
Stats
extends
Component
{
render
()
{
render
()
{
...
@@ -24,8 +25,10 @@ export default class Stats extends Component {
...
@@ -24,8 +25,10 @@ export default class Stats extends Component {
}
}
return
(
return
(
<
ScrollView
>
<
ScrollView
>
<
View
style
=
{[
styles
.
textWrappingView
]}
>
<
FramedSegment
<
AppText
style
=
{
styles
.
title
}
>
{
labels
.
cycleLengthTitle
}
<
/AppText
>
style
=
{
styles
.
framedSegmentLast
}
title
=
{
labels
.
cycleLengthTitle
}
>
<
AppText
style
=
{
styles
.
paragraph
}
>
{
labels
.
cycleLengthExplainer
}
<
/AppText
>
<
AppText
style
=
{
styles
.
paragraph
}
>
{
labels
.
cycleLengthExplainer
}
<
/AppText
>
{
!
atLeastOneCycle
&&
{
!
atLeastOneCycle
&&
<
AppText
>
{
labels
.
emptyStats
}
<
/AppText
>
<
AppText
>
{
labels
.
emptyStats
}
<
/AppText
>
...
@@ -39,20 +42,20 @@ export default class Stats extends Component {
...
@@ -39,20 +42,20 @@ export default class Stats extends Component {
}
}
{
atLeastOneCycle
&&
numberOfCycles
>
1
&&
<
View
>
{
atLeastOneCycle
&&
numberOfCycles
>
1
&&
<
View
>
<
View
style
=
{
styles
.
statsRow
}
>
<
View
style
=
{
styles
.
statsRow
}
>
<
AppText
style
=
{
[
styles
.
statsLabelLeft
,
styles
.
emphasis
]
}
>
{
labels
.
averageLabel
}
<
/AppText
>
<
AppText
style
=
{
styles
.
emphasis
}
>
{
labels
.
averageLabel
}
<
/AppText
>
<
AppText
style
=
{
[
styles
.
statsLabelRight
,
styles
.
emphasis
]
}
>
{
cycleInfo
.
mean
+
'
'
+
labels
.
daysLabel
}
<
/AppText
>
<
AppText
style
=
{
styles
.
emphasis
}
>
{
'
:
'
+
cycleInfo
.
mean
+
'
'
+
labels
.
daysLabel
}
<
/AppText
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
statsRow
}
>
<
View
style
=
{
styles
.
statsRow
}
>
<
AppText
style
=
{
styles
.
statsLabelLeft
}
>
{
labels
.
minLabel
}
<
/AppText
>
<
AppText
>
{
labels
.
minLabel
}
<
/AppText
>
<
AppText
style
=
{
styles
.
statsLabelRight
}
>
{
cycleInfo
.
minimum
+
'
'
+
labels
.
daysLabel
}
<
/AppText
>
<
AppText
>
{
'
:
'
+
cycleInfo
.
minimum
+
'
'
+
labels
.
daysLabel
}
<
/AppText
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
statsRow
}
>
<
View
style
=
{
styles
.
statsRow
}
>
<
AppText
style
=
{
styles
.
statsLabelLeft
}
>
{
labels
.
maxLabel
}
<
/AppText
>
<
AppText
>
{
labels
.
maxLabel
}
<
/AppText
>
<
AppText
style
=
{
styles
.
statsLabelRight
}
>
{
cycleInfo
.
maximum
+
'
'
+
labels
.
daysLabel
}
<
/AppText
>
<
AppText
>
{
'
:
'
+
cycleInfo
.
maximum
+
'
'
+
labels
.
daysLabel
}
<
/AppText
>
<
/View
>
<
/View
>
<
View
style
=
{[
styles
.
statsRow
,
styles
.
paragraph
]}
>
<
View
style
=
{[
styles
.
statsRow
,
styles
.
paragraph
]}
>
<
AppText
style
=
{
styles
.
statsLabelLeft
}
>
{
labels
.
stdLabel
}
<
/AppText
>
<
AppText
>
{
labels
.
stdLabel
}
<
/AppText
>
<
AppText
style
=
{
styles
.
statsLabelRight
}
>
{
cycleInfo
.
stdDeviation
+
'
'
+
labels
.
daysLabel
}
<
/AppText
>
<
AppText
>
{
'
:
'
+
cycleInfo
.
stdDeviation
+
'
'
+
labels
.
daysLabel
}
<
/AppText
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
statsRow
}
>
<
View
style
=
{
styles
.
statsRow
}
>
<
AppText
>
{
labels
.
basisOfStatsBeginning
}
<
/AppText
>
<
AppText
>
{
labels
.
basisOfStatsBeginning
}
<
/AppText
>
...
@@ -60,7 +63,7 @@ export default class Stats extends Component {
...
@@ -60,7 +63,7 @@ export default class Stats extends Component {
<
AppText
>
{
labels
.
basisOfStatsEnd
}
<
/AppText
>
<
AppText
>
{
labels
.
basisOfStatsEnd
}
<
/AppText
>
<
/View
>
<
/View
>
<
/View>
}
<
/View>
}
<
/
View
>
<
/
FramedSegment
>
<
/ScrollView
>
<
/ScrollView
>
)
)
}
}
...
...
This diff is collapsed.
Click to expand it.
styles/index.js
+
2
−
11
View file @
646543c9
...
@@ -45,7 +45,8 @@ export default StyleSheet.create({
...
@@ -45,7 +45,8 @@ export default StyleSheet.create({
},
},
emphasis
:
{
emphasis
:
{
fontWeight
:
'
bold
'
,
fontWeight
:
'
bold
'
,
fontFamily
:
textFontBold
fontFamily
:
textFontBold
,
color
:
secondaryColor
,
},
},
link
:
{
link
:
{
color
:
cycleDayColor
,
color
:
cycleDayColor
,
...
@@ -307,16 +308,6 @@ export default StyleSheet.create({
...
@@ -307,16 +308,6 @@ export default StyleSheet.create({
flexDirection
:
'
row
'
,
flexDirection
:
'
row
'
,
width
:
'
100%
'
width
:
'
100%
'
},
},
statsLabelLeft
:
{
width
:
'
60%
'
,
textAlign
:
'
left
'
,
textAlignVertical
:
'
center
'
,
marginLeft
:
10
},
statsLabelRight
:
{
textAlign
:
'
left
'
,
textAlignVertical
:
'
center
'
},
menuLabel
:
{
menuLabel
:
{
fontSize
:
15
,
fontSize
:
15
,
color
:
fontOnPrimaryColor
color
:
fontOnPrimaryColor
...
...
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