-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add indicators to let the user know if they are on staging or dev #2506
Conversation
// Prod and staging set the icon in the electron-builder config, so only update it here for dev | ||
if (isDev) { | ||
app.dock.setIcon(`${__dirname}/icon-dev.png`); | ||
app.setName('Expensify.cash'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On dev, Electron
is still shown in the dock and in the OS menu bar. https://www.electronjs.org/docs/tutorial/application-distribution had some examples on how to make this display properly on mac but I wasn't able to sort it out. Open to suggestions to fix that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I personally think that this is fine to leave on dev.
src/styles/styles.js
Outdated
@@ -231,7 +231,6 @@ const styles = { | |||
|
|||
badge: { | |||
backgroundColor: themeColors.badgeDefaultBG, | |||
borderRadius: 14, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the IOUbadge, this border-radius is now set to 12 instead of 14 since I wanted to keep the increments of small/medium/large as multiples of 4 like we do for the spacing file. @shawnborton let me know if this should be set back to 14 and I can update the value in the new borders.js file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think for badges, we want them to look like rounded pills and not rounded rectangles because buttons look like rounded rectangles. So maybe go the other way and jack this up to 16 or 20?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm I am not seeing a difference. Just to make sure we're on the same page, I think the style we are using for the $2.00
in your mockup is the general style we have for badges, and we should just reuse that style for the Chats header too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah ok sounds good, I'll revert the styles then so both badges have the old border-radius that the IOUBadge had
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For some reason the pill doesn't look perfectly rounded, but maybe my eyes are playing tricks on me. Can you double check that the "DEV" pill is only 20px tall? if that's the case, a border radius of > 10px should make it perfectly round.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it just me, or is the text in the pill (both DEV
and $2.00
) not completely centered?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we see w/ borderRadius: 14
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some minor comments, haven't tested yet
src/styles/styles.js
Outdated
@@ -231,7 +231,6 @@ const styles = { | |||
|
|||
badge: { | |||
backgroundColor: themeColors.badgeDefaultBG, | |||
borderRadius: 14, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it just me, or is the text in the pill (both DEV
and $2.00
) not completely centered?
src/styles/styles.js
Outdated
@@ -231,7 +231,6 @@ const styles = { | |||
|
|||
badge: { | |||
backgroundColor: themeColors.badgeDefaultBG, | |||
borderRadius: 14, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we see w/ borderRadius: 14
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, code LGTM 👍
@shawnborton I leave any remaining design-themed reviews in your capable hands 🙇🏽♂️
@shawnborton pulling this out of the thread, here's the updated border-radius of 14 for both badges |
Looks good to me! |
@Jag96 Sorry bud, you've got conflicts 🙂 |
Conflicts resolved |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool. This PR just makes the staging / QA process feel so much more real for me. 😁
🚀 Deployed to staging in version: 1.0.31-2🚀
|
iOS/Android - STG badge doesn't appearExpected ResultAn STG badge appears on the sign-in screen icon, and in the main app next to Chats and Settings (after login) Actual ResultSTG badge doesn't appear Action performed
PlatformIssue confirmed in: iOS ✔️ |
@isagoico thanks! I'll create an issue and have a look, no need to block the deploy |
🚀 Deployed to production in version: 1.0.39-5🚀
|
@roryabraham @shawnborton will you please review this?
Details
This PR adds visuals to the sign in screen, the main app screen, and the desktop icon to let the user know what environment they are running the app in (dev/staging/prod).
Fixed Issues
Fixes https://github.com/Expensify/Expensify/issues/158445
Tests
dev
badge on the sign-in screen logo. On desktop, confirm you see adev
badge for the doc icon.dev
badge on the main app screen next toChats
, and that the badge also shows up inSettings
npm run desktop-build-staging
, then open the Expensify.cash app insidedist/mac
. Confirm the icon has thestg
badge.stg
badge. Sign in and confirm thestg
badge shows up next toChats
andSettings
.env
file to includeENVIRONMENT=STAGING
and run the app on web/ios/android, confirm you see thestg
badge on the sign-in screen and in the app.env
file to includeENVIRONMENT=PRODUCTION
and run the app on web/ios/android, confirm you see no badges on the sign-in screen and in the appQA Steps
STG
badge appears on the sign in screen icon, and in the main app next toChats
andSettings
(after login)2. Confirm that on desktop, the desktop icon shows with the
STG
badgeTested On
Screenshots
Web/Mobile Web/Desktop
iOS/Android