From 5188a8d7b82ee076d9b592d0324aefedff44c61b Mon Sep 17 00:00:00 2001 From: Salvatore Giordano Date: Wed, 24 Apr 2024 10:10:22 +0200 Subject: [PATCH] Update mobile app sign in page (#4264) # What this PR does Changed the text of the deep link sign in button and reorders the sections so that the qr code is on top in mobile mode ## Which issue(s) this PR closes Closes https://github.com/grafana/oncall-mobile-app/issues/605 ## Checklist - [x] Unit, integration, and e2e (if applicable) tests updated - [x] Documentation added (or `pr:no public docs` PR label added if not required) - [x] Added the relevant release notes label (see labels prefixed w/ `release:`). These labels dictate how your PR will show up in the autogenerated release notes. --- .../MobileAppConnection.tsx | 4 +- .../MobileAppConnection.test.tsx.snap | 150 +++++++++--------- .../parts/LinkLoginButton/LinkLoginButton.tsx | 2 +- .../LinkLoginButton.test.tsx.snap | 2 +- 4 files changed, 79 insertions(+), 79 deletions(-) diff --git a/grafana-plugin/src/containers/MobileAppConnection/MobileAppConnection.tsx b/grafana-plugin/src/containers/MobileAppConnection/MobileAppConnection.tsx index 839b20ac..701c96b1 100644 --- a/grafana-plugin/src/containers/MobileAppConnection/MobileAppConnection.tsx +++ b/grafana-plugin/src/containers/MobileAppConnection/MobileAppConnection.tsx @@ -203,10 +203,10 @@ export const MobileAppConnection = observer(({ userPk }: Props) => { )} - + {content} - {content} + {mobileAppIsCurrentlyConnected && isCurrentUser && !disconnectingMobileApp && ( diff --git a/grafana-plugin/src/containers/MobileAppConnection/__snapshots__/MobileAppConnection.test.tsx.snap b/grafana-plugin/src/containers/MobileAppConnection/__snapshots__/MobileAppConnection.test.tsx.snap index c02a1a27..2e879db0 100644 --- a/grafana-plugin/src/containers/MobileAppConnection/__snapshots__/MobileAppConnection.test.tsx.snap +++ b/grafana-plugin/src/containers/MobileAppConnection/__snapshots__/MobileAppConnection.test.tsx.snap @@ -15,6 +15,25 @@ exports[`MobileAppConnection it shows a QR code if the app isn't already connect
+
+
+ Loading... + +
+ +
+
+
@@ -101,25 +120,6 @@ exports[`MobileAppConnection it shows a QR code if the app isn't already connect
-
-
- Loading... - -
- -
-
-
@@ -141,6 +141,25 @@ exports[`MobileAppConnection it shows a loading message if it is currently disco
+
+
+ Loading... + +
+ +
+
+
@@ -227,25 +246,6 @@ exports[`MobileAppConnection it shows a loading message if it is currently disco
-
-
- Loading... - -
- -
-
-
@@ -267,6 +267,25 @@ exports[`MobileAppConnection it shows a loading message if it is currently fetch
+
+
+ Loading... + +
+ +
+
+
@@ -353,25 +372,6 @@ exports[`MobileAppConnection it shows a loading message if it is currently fetch
-
-
- Loading... - -
- -
-
-
@@ -434,6 +434,15 @@ exports[`MobileAppConnection it shows an error message if there was an error dis
+
+ + There was an error disconnecting your mobile app. Please try again. + +
@@ -520,15 +529,6 @@ exports[`MobileAppConnection it shows an error message if there was an error dis
-
- - There was an error disconnecting your mobile app. Please try again. - -
@@ -550,6 +550,15 @@ exports[`MobileAppConnection it shows an error message if there was an error fet
+
+ + There was an error fetching your QR code. Please try again. + +
@@ -636,15 +645,6 @@ exports[`MobileAppConnection it shows an error message if there was an error fet
-
- - There was an error fetching your QR code. Please try again. - -
diff --git a/grafana-plugin/src/containers/MobileAppConnection/parts/LinkLoginButton/LinkLoginButton.tsx b/grafana-plugin/src/containers/MobileAppConnection/parts/LinkLoginButton/LinkLoginButton.tsx index 54f97245..da308987 100644 --- a/grafana-plugin/src/containers/MobileAppConnection/parts/LinkLoginButton/LinkLoginButton.tsx +++ b/grafana-plugin/src/containers/MobileAppConnection/parts/LinkLoginButton/LinkLoginButton.tsx @@ -25,7 +25,7 @@ export const LinkLoginButton: FC = (props: Props) => { window.open(mobileDeepLink, '_blank'); }} > - Sign in + Connect Mobile App ); diff --git a/grafana-plugin/src/containers/MobileAppConnection/parts/LinkLoginButton/__snapshots__/LinkLoginButton.test.tsx.snap b/grafana-plugin/src/containers/MobileAppConnection/parts/LinkLoginButton/__snapshots__/LinkLoginButton.test.tsx.snap index f68e7860..077cae5c 100644 --- a/grafana-plugin/src/containers/MobileAppConnection/parts/LinkLoginButton/__snapshots__/LinkLoginButton.test.tsx.snap +++ b/grafana-plugin/src/containers/MobileAppConnection/parts/LinkLoginButton/__snapshots__/LinkLoginButton.test.tsx.snap @@ -34,7 +34,7 @@ exports[`LinkLoginButton it renders properly 1`] = ` - Sign in + Connect Mobile App