From 5fc5b75a91da3cadf56de387ebc231c14ecc6c63 Mon Sep 17 00:00:00 2001 From: ssstratos Date: Fri, 22 Sep 2017 00:18:06 +0300 Subject: [PATCH 1/4] Fix responsive issue on WelcomeBox Issue #3999 --- src/components/WelcomeBox.css | 13 ++++++++++++- src/components/WelcomeBox.js | 10 ++-------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/src/components/WelcomeBox.css b/src/components/WelcomeBox.css index 67fefe6128..155f50c7ae 100644 --- a/src/components/WelcomeBox.css +++ b/src/components/WelcomeBox.css @@ -38,12 +38,23 @@ font-family: Courier; } +.shortcutKey { + display: inline-block; + margin-right: 10px; + font-family: Courier; +} + .shortcutFunction { text-align: left; float: left; - margin-left: 25px; } html .welcomebox .toggle-button-end.collapsed { bottom: 1px; } + +@media (max-width: 370px) { + .shortcutKey { + display: block; + } +} \ No newline at end of file diff --git a/src/components/WelcomeBox.js b/src/components/WelcomeBox.js index cd1e83842c..e11e1040c4 100644 --- a/src/components/WelcomeBox.js +++ b/src/components/WelcomeBox.js @@ -54,19 +54,13 @@ class WelcomeBox extends Component { return (
-
-

- {searchSourcesShortcut} -

-

- {searchProjectShortcut} -

-

+

{searchSourcesShortcut}
{searchSourcesLabel}

+

{searchProjectShortcut}
{searchProjectLabel}

From 4080c0af8cc0915248351c69b607415efb75d025 Mon Sep 17 00:00:00 2001 From: ssstratos Date: Thu, 28 Sep 2017 00:53:26 +0300 Subject: [PATCH 2/4] Split WelcomeBox to two sections - One for large sizes - One for responsive/small sizes --- src/components/WelcomeBox.css | 24 +++++++++++++++++++++++- src/components/WelcomeBox.js | 20 +++++++++++++++++++- 2 files changed, 42 insertions(+), 2 deletions(-) diff --git a/src/components/WelcomeBox.css b/src/components/WelcomeBox.css index 155f50c7ae..c0f427d9cf 100644 --- a/src/components/WelcomeBox.css +++ b/src/components/WelcomeBox.css @@ -32,6 +32,14 @@ offset-inline-start: auto; } +.welcomebox .mobile-layout { + display: none; +} + +.welcomebox .normal-layout { + display: inline-block; +} + .shortcutKeys { text-align: right; float: left; @@ -47,13 +55,27 @@ .shortcutFunction { text-align: left; float: left; + margin-left: 25px; } html .welcomebox .toggle-button-end.collapsed { bottom: 1px; } -@media (max-width: 370px) { +@media (max-width: 430px) { + + .welcomebox .mobile-layout { + display: inline-block; + } + + .welcomebox .normal-layout { + display: none; + } + + .shortcutFunction { + margin-left: 0; + } + .shortcutKey { display: block; } diff --git a/src/components/WelcomeBox.js b/src/components/WelcomeBox.js index e11e1040c4..fe305aa1dd 100644 --- a/src/components/WelcomeBox.js +++ b/src/components/WelcomeBox.js @@ -53,7 +53,7 @@ class WelcomeBox extends Component { return (
-
+

{searchSourcesShortcut}
@@ -66,6 +66,24 @@ class WelcomeBox extends Component {
{this.renderToggleButton()}
+
+
+

+ {searchSourcesShortcut} +

+

+ {searchProjectShortcut} +

+
+
+

+ {searchSourcesLabel} +

+

+ {searchProjectLabel} +

+
+
); } From 3ddc6a975eac7f2201053b81382bb33f6ea0877c Mon Sep 17 00:00:00 2001 From: ssstratos Date: Thu, 28 Sep 2017 01:03:00 +0300 Subject: [PATCH 3/4] Change 'mobile-layout' to 'small-size-layout' on WelcomeBox Should change cause wrong name --- src/components/WelcomeBox.css | 4 ++-- src/components/WelcomeBox.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/WelcomeBox.css b/src/components/WelcomeBox.css index c0f427d9cf..4148e1295b 100644 --- a/src/components/WelcomeBox.css +++ b/src/components/WelcomeBox.css @@ -32,7 +32,7 @@ offset-inline-start: auto; } -.welcomebox .mobile-layout { +.welcomebox .small-size-layout { display: none; } @@ -64,7 +64,7 @@ html .welcomebox .toggle-button-end.collapsed { @media (max-width: 430px) { - .welcomebox .mobile-layout { + .welcomebox .small-size-layout { display: inline-block; } diff --git a/src/components/WelcomeBox.js b/src/components/WelcomeBox.js index fe305aa1dd..7daa276b74 100644 --- a/src/components/WelcomeBox.js +++ b/src/components/WelcomeBox.js @@ -53,7 +53,7 @@ class WelcomeBox extends Component { return (
-
+

{searchSourcesShortcut}
From a23f3e35cde50a49d17be0835187b5d65414c546 Mon Sep 17 00:00:00 2001 From: codehag Date: Thu, 28 Sep 2017 12:01:56 +0200 Subject: [PATCH 4/4] fix lint --- src/components/WelcomeBox.css | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/WelcomeBox.css b/src/components/WelcomeBox.css index 4148e1295b..6601d3dcee 100644 --- a/src/components/WelcomeBox.css +++ b/src/components/WelcomeBox.css @@ -79,4 +79,5 @@ html .welcomebox .toggle-button-end.collapsed { .shortcutKey { display: block; } -} \ No newline at end of file +} +