-
Notifications
You must be signed in to change notification settings - Fork 13
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
feat: Banner for production #583
Conversation
|
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 there a way for me to test locally?!
frontend/README.md
Outdated
@@ -40,6 +40,7 @@ Help on both things is given in the linked resources above. | |||
- `PRODUCTION_DOMAIN`: (optional) Required in order to enable [plausible.io statistics](https://github.com/moritzsternemann/vue-plausible#configuration). In addition to adding it here, the domain (e.g. `auctions.makerdao.network`) should also be registered within [plausible dashboard](https://plausible.io/). | |||
- `CONTACT_EMAIL`: (optional) Required in order to display contact link in the footer. This email should be able to accept and manage bug reports and other contact requests. | |||
- `STAGING_BANNER_URL`: (optional) When set a banner will be displayed, warning the user that they are using a staging version. The text will use `STAGING_BANNER_URL` as a link to production UI. | |||
- `PRODUCTION_BANNER_URL`: (optional) When set a banner will be displayed, notifying the user that they can also use an electron app. The text will use `STAGING_BANNER_URL` as a link the electron app. |
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.
- 2nd sentence probably needs to be adjusted to "Production_Banner_URL"?!
set the variable in the terminal according to the readme export PRODUCTION_BANNER_URL='https://asdfalsdjf`
npm run dev |
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 wouldn't merge this very noticeable banner on top of every page, until we have updation strategy in place. Otherwise, we will end up with users downloading the app and never updating it (and not even knowing that it's outdated)
Good point. Didn't think about it tbh. So I agree here. Let's keep the PR open for now. |
@valiafetisov can we merge this one as well as the updation strategy got merged? |
Let's wait for the #589 as well 🙂 Although I wouldn't actually announce electron app via such annoying banner, which kind of suggests to go and install the electron instead of using the web app. I think instead we might want to just add electron somewhere to the main page, close to the regular links [1] or as a separate "block". |
See your point. I'd suggest to still show the banner but in a way more subtle way by giving it a more decent greyish color.
Agree. There is a PR for it already: #593 |
Ok, let's do it using warning/info antd Alert, also closable similar to the #589 |
I had to revert the changes made in |
<Alert v-else-if="status === 'production'" type="info" show-icon banner closable class="text-center"> | ||
<template #message> | ||
You can now run the Unified Auctions UI locally as a desktop application. Please see its release at | ||
<a class="underline" :href="url" target="_blank">{{ url }}</a | ||
>. | ||
</template> | ||
</Alert> |
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.
What it has to do with the ElectronUpdateBanner
or its states? Please move it back to its dedicated component and just use closable Alert
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.
My logic was that it is an electron-related topic, so instead of editing multiple components, just use an existing one that follows the same pattern.
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.
The code looks good.
- Have you checked if the image is correctly built when
PRODUCTION_BANNER_URL
is provided (locally)? (ie: please check how docker file forSTAGING_BANNER_URL
) - I don't see the code which passes desired env var from the secrets to the build process in CI (ie: please check how it's done for
STAGING_BANNER_URL
) - Was the required url added to the production secrets?
- key: PRODUCTION_BANNER_URL | ||
value_from_secret: auction-ui/main.auction-ui.k8s.sidestream.tech/frontend/production_banner_url |
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.
This will only add it to the main.auction-ui.k8s.sidestream.tech
(which is staging). You also need to add it down to publish-frontend-makerdao-on-tag
step
I've added it via:
Is it a correct path @aomafarag? |
Yes, the above screenshot is from local testing.
Added
If by this you mean adding it to our secrets storage on AWS, I don't believe I have the privileges to do that. |
The path is correct. However, the variable name should be all lowercase to match our secrets pattern. |
Closes #581
Checklist:
#
)