Skip to content

Commit

Permalink
A bunch of github bugs (common-voice#2510)
Browse files Browse the repository at this point in the history
  • Loading branch information
phirework authored and rileyjshaw committed Jan 2, 2020
1 parent 35d148e commit d5dec5e
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 32 deletions.
2 changes: 1 addition & 1 deletion locales/native-names.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"or": "ଓଡ଼ିଆ",
"pa-IN": "ਪੰਜਾਬੀ",
"pl": "polski",
"pt": "pt",
"pt": "Português",
"rm-sursilv": "romontsch sursilvan",
"rm-vallader": "Rumantsch Vallader",
"ro": "Română",
Expand Down
1 change: 1 addition & 0 deletions web/src/components/language-select/language-select.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
background: var(--white) url('/img/down-arrow.svg') no-repeat 90% center;
background-size: 10px;
cursor: pointer;
padding-right: 45px;

&:hover {
background-color: var(--desert-storm);
Expand Down
3 changes: 3 additions & 0 deletions web/src/components/pages/about/get-involved.css
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@
justify-content: center;
z-index: var(--middle-z-index);
position: relative;
p {
max-width: 400px;
}
}

& .line {
Expand Down
5 changes: 0 additions & 5 deletions web/src/components/pages/contribution/contribution.css
Original file line number Diff line number Diff line change
Expand Up @@ -203,14 +203,9 @@
}

& svg {
display: none;
margin: 0 10px 0 16px;
width: 23px;
height: 23px;

@media (--md-up) {
display: initial;
}
}
}

Expand Down
34 changes: 17 additions & 17 deletions web/src/components/pages/dashboard/stats/progress-card.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@

& .personal,
& .overall {
padding-right: 20px;
padding-left: 68px;
padding-inline-start: 50px;
padding-inline-end: 20px;
min-height: 130px;
box-sizing: border-box;
display: flex;
Expand All @@ -29,7 +29,18 @@
}
}

& .personal {
.button {
max-width: 220px;
width: auto;
height: auto;
line-height: 1.2;
padding: 15px 25px;
@media (--lg-down) {
max-width: none;
}
}

.personal {
background: var(--white);

@media (--lg-down) {
Expand All @@ -41,7 +52,6 @@

& .fraction {
border-inline-end: 1px solid var(--desert-storm);
margin-inline-end: 20px;
padding-inline-end: 20px;
color: var(--type-color);

Expand All @@ -57,15 +67,13 @@
}

& .description {
margin-right: 20px;
margin: 0 20px;
font-family: var(--strong-font-family);
font-size: 20px;
line-height: 1.4;
}

& .custom-goal-section {
margin-left: auto;

@media (--md-down) {
width: 100%;
display: flex;
Expand All @@ -78,14 +86,11 @@
}
}

& .custom-goal-button {
.button {
border: none;
padding: 0 30px;
min-width: auto;
height: 50px;
white-space: pre;
background: var(--type-color);
color: var(--white);
font-size: 16px;

@media (--md-down) {
display: flex;
Expand Down Expand Up @@ -187,11 +192,6 @@
}

& .button {
padding: 0 30px;
min-width: auto;
min-height: 50px;
white-space: pre;

@media (--lg-down) {
margin-top: 20px;
}
Expand Down
6 changes: 1 addition & 5 deletions web/src/components/pages/dashboard/stats/progress-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,7 @@ export default function ProgressCard({
) : (
!customGoal && (
<Localized id="create-custom-goal">
<LinkButton
className="custom-goal-button"
rounded
to={goalsPath}
/>
<LinkButton rounded to={goalsPath} />
</Localized>
)
)}
Expand Down
6 changes: 6 additions & 0 deletions web/src/components/pages/faq/faq.css
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,8 @@
min-width: 24px;
display: flex;
padding: 6px 5px 0 24px;
padding-inline-start: 24px;
padding-inline-end: 5px;
@media (--xs-down) {
padding: 0px 5px 0 16px;
}
Expand Down Expand Up @@ -390,6 +392,10 @@
left: calc(-100% - 6rem);
position: relative;

[dir='rtl'] & {
left: auto;
right: calc(-100% - 6rem);
}
@media (--sm-down) {
left: 0;
}
Expand Down
15 changes: 11 additions & 4 deletions web/src/components/pages/home/stats.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,12 @@ export namespace ClipsStats {
const TICK_COUNT = 7;
const CIRCLE_RADIUS = 8;

function formatSeconds(totalSeconds: number) {
function formatSeconds(totalSeconds: number, precise: boolean = false) {
const seconds = totalSeconds % 60;
const minutes = Math.floor(totalSeconds / 60) % 60;
const hours = Math.floor(totalSeconds / 3600);

if (precise) return `${hours.toLocaleString()}h`;
if (hours >= 1000) {
return (hours / 1000).toPrecision(2) + 'k';
}
Expand All @@ -100,8 +101,8 @@ export namespace ClipsStats {
return timeParts.join(' ') || '0';
}

const MetricValue = ({ attribute, children }: any) => (
<div className={'metric-value ' + attribute}>
const MetricValue = ({ attribute, title, children }: any) => (
<div className={'metric-value ' + attribute} title={title}>
<div className="point"></div>
{children}
</div>
Expand All @@ -120,7 +121,13 @@ export namespace ClipsStats {
<Localized id={labelId}>
<div className="label" />
</Localized>
<MetricValue attribute={attribute}>
<MetricValue
attribute={attribute}
title={
data.length > 0
? formatSeconds(data[data.length - 1][attribute], true)
: ''
}>
{data.length > 0
? formatSeconds(data[data.length - 1][attribute])
: '?'}
Expand Down

0 comments on commit d5dec5e

Please sign in to comment.