From 102bbabc87b3568680bab2cf9722a5ccc49df6ff Mon Sep 17 00:00:00 2001 From: Hana <48352564+Piralein@users.noreply.github.com> Date: Wed, 13 Jul 2022 00:01:35 +0300 Subject: [PATCH] Add mobile design with button to hide/show the teams list --- .../index/components/IndexDescription.js | 15 ++++ src/paths/index/components/IndexHeader.js | 17 ++++- .../index/components/prs/PullRequestItem.js | 76 +++++++++++-------- .../index/components/prs/PullRequestList.js | 56 +++++++++----- src/paths/index/components/teams/TeamList.js | 72 +++++++++++++++--- src/paths/index/entry.js | 34 +++++---- src/shared/components/PageContent.js | 7 ++ 7 files changed, 199 insertions(+), 78 deletions(-) diff --git a/src/paths/index/components/IndexDescription.js b/src/paths/index/components/IndexDescription.js index 25f94ba..1d5bc8a 100644 --- a/src/paths/index/components/IndexDescription.js +++ b/src/paths/index/components/IndexDescription.js @@ -44,6 +44,21 @@ export default class IndexDescription extends LitElement { border-top: 1px solid var(--g-background-extra-color); width: 30%; } + + @media only screen and (max-width: 900px) { + :host .header-description { + padding: 0 8px; + flex-direction: column; + } + + :host .header-description-column { + width: 100%; + } + :host .header-description-column.header-extra-links { + text-align: center; + padding-top: 12px; + } + } `; } diff --git a/src/paths/index/components/IndexHeader.js b/src/paths/index/components/IndexHeader.js index d244372..53555c5 100644 --- a/src/paths/index/components/IndexHeader.js +++ b/src/paths/index/components/IndexHeader.js @@ -35,6 +35,21 @@ export default class IndexHeader extends LitElement { :host .header-metadata a:hover { color: var(--link-font-color-hover); } + + @media only screen and (max-width: 900px) { + :host .header { + flex-wrap: wrap; + text-align: center; + } + :host .header-title, + :host .header-metadata { + width: 100%; + } + :host .header-metadata { + padding-bottom: 12px; + text-align: center; + } + } `; } @@ -78,7 +93,7 @@ export default class IndexHeader extends LitElement { return html`
-

+

Godot Team Reports

diff --git a/src/paths/index/components/prs/PullRequestItem.js b/src/paths/index/components/prs/PullRequestItem.js index d203943..6de11a4 100644 --- a/src/paths/index/components/prs/PullRequestItem.js +++ b/src/paths/index/components/prs/PullRequestItem.js @@ -10,7 +10,7 @@ export default class PullRequestItem extends LitElement { --draft-font-color: #ffcc31; --draft-background-color: #9db3c0; --stats-background-color: #f9fafa; - + --stat-temp0-color: #000000; --stat-temp1-color: #383824; --stat-temp2-color: #645b2c; @@ -41,14 +41,14 @@ export default class PullRequestItem extends LitElement { --stat-temp9-color: #d3001c; } } - + /** Component styling **/ :host { border-bottom: 3px solid var(--pr-border-color); display: block; padding: 14px 12px 20px 12px; } - + :host a { color: var(--link-font-color); text-decoration: none; @@ -56,7 +56,7 @@ export default class PullRequestItem extends LitElement { :host a:hover { color: var(--link-font-color-hover); } - + :host .pr-title { display: inline-block; font-size: 20px; @@ -65,8 +65,9 @@ export default class PullRequestItem extends LitElement { } :host .pr-title-name { color: var(--g-font-color); + word-break: break-word; } - + :host .pr-title-draft { background-color: var(--draft-background-color); border-radius: 6px 6px; @@ -75,7 +76,7 @@ export default class PullRequestItem extends LitElement { padding: 1px 6px; vertical-align: bottom; } - + :host .pr-meta { color: var(--dimmed-font-color); display: flex; @@ -83,14 +84,14 @@ export default class PullRequestItem extends LitElement { justify-content: space-between; font-size: 13px; } - + :host .pr-labels { display: flex; flex-flow: column wrap; padding: 4px 0; max-height: 60px; } - + :host .pr-label { padding-right: 8px; } @@ -101,43 +102,43 @@ export default class PullRequestItem extends LitElement { height: 8px; } :host .pr-label-name { - + } - + :host .pr-milestone-value { font-weight: 700; } - + :host .pr-time { - + } :host .pr-time-value { border-bottom: 1px dashed var(--g-font-color); cursor: help; font-weight: 700; } - + :host .pr-author { - + } :host .pr-author-value { - + } :host .pr-author-value--hot:before { content: "★"; color: var(--draft-font-color); } - + :host .pr-links { font-size: 13px; margin-top: 8px; } - + :host .pr-link { font-weight: 700; white-space: nowrap; } - + :host .pr-stats { background-color: var(--stats-background-color); border-radius: 4px; @@ -146,11 +147,11 @@ export default class PullRequestItem extends LitElement { padding: 10px 6px; margin-top: 12px; } - + :host .pr-stat + .pr-stat { margin-left: 12px; } - + :host .pr-stat--temp0 { color: var(--stat-temp0-color); } @@ -186,7 +187,7 @@ export default class PullRequestItem extends LitElement { color: var(--stat-temp9-color); font-weight: 700; } - + :host .pr-review { display: flex; justify-content: space-between; @@ -197,7 +198,7 @@ export default class PullRequestItem extends LitElement { :host .pr-review-teams { max-width: 50%; } - + :host .pr-review-team { color: var(--light-font-color); white-space: nowrap; @@ -206,6 +207,19 @@ export default class PullRequestItem extends LitElement { content: "· "; white-space: break-spaces; } + + @media only screen and (max-width: 900px) { + :host { + padding: 14px 0 20px 0; + } + :host .pr-meta { + flex-wrap: wrap; + } + :host .pr-labels { + width: 100%; + justify-content: space-between; + } + } `; } @@ -264,7 +278,7 @@ export default class PullRequestItem extends LitElement { ` : '')} #${this.id} ${this.title} - +
${this.labels.map((item) => { @@ -285,7 +299,7 @@ export default class PullRequestItem extends LitElement { `; })}
- +
milestone: @@ -307,7 +321,7 @@ export default class PullRequestItem extends LitElement {
- +
created: @@ -340,7 +354,7 @@ export default class PullRequestItem extends LitElement {
- + ${(this.links.length > 0 ? html` ` : '')} - +
- +
${(other_teams.length > 0) ? html` @@ -410,7 +424,7 @@ export default class PullRequestItem extends LitElement { target="_blank" > diff - | + |
- +
`; diff --git a/src/paths/index/components/prs/PullRequestList.js b/src/paths/index/components/prs/PullRequestList.js index 20d4ff4..0fbbcad 100644 --- a/src/paths/index/components/prs/PullRequestList.js +++ b/src/paths/index/components/prs/PullRequestList.js @@ -17,17 +17,17 @@ export default class PullRequestList extends LitElement { --pulls-toolbar-color: #222c3d; } } - + /** Component styling **/ :host { flex-grow: 1; } - + :host input[type=checkbox] { margin: 0; vertical-align: bottom; } - + :host select { background: var(--pulls-background-color); border: 1px solid var(--pulls-background-color); @@ -36,7 +36,7 @@ export default class PullRequestList extends LitElement { outline: none; min-width: 60px; } - + :host .team-pulls { background-color: var(--pulls-background-color); border-radius: 0 4px 4px 0; @@ -44,7 +44,7 @@ export default class PullRequestList extends LitElement { max-width: 760px; min-height: 200px; } - + :host .team-pulls-toolbar { background: var(--pulls-toolbar-color); border-radius: 4px; @@ -55,9 +55,9 @@ export default class PullRequestList extends LitElement { padding: 10px 14px; margin-bottom: 6px; } - + :host .pulls-count { - + } :host .pulls-count strong { font-size: 18px; @@ -79,21 +79,21 @@ export default class PullRequestList extends LitElement { :host .pulls-filters-column + .pulls-filters-column { margin-left: 38px; } - + :host .pulls-filter { display: flex; justify-content: space-between; align-items: center; margin: 1px 0; } - + :host .pulls-sort { display: flex; justify-content: space-between; align-items: center; margin: 1px 0; } - + :host .pulls-sort-action { color: var(--link-font-color); cursor: pointer; @@ -101,13 +101,29 @@ export default class PullRequestList extends LitElement { :host .pulls-sort-action:hover { color: var(--link-font-color-hover); } - + :host .pulls-sort-action--active, :host .pulls-sort-action--active:hover { color: var(--link-font-color-inactive); cursor: default; text-decoration: underline; } + + @media only screen and (max-width: 900px) { + :host .team-pulls { + padding: 8px; + } + :host .pulls-count { + margin-bottom: 12px; + } + :host .team-pulls-toolbar { + flex-wrap: wrap; + } + :host .pulls-filters { + width: 100%; + justify-content: space-between; + } + } `; } @@ -199,7 +215,7 @@ export default class PullRequestList extends LitElement { ` : '' }
- +
@@ -210,15 +226,15 @@ export default class PullRequestList extends LitElement { @click="${this.onDraftsChecked}" /> - + milestone: