-
Notifications
You must be signed in to change notification settings - Fork 52
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
chore: Remove footer and move links to status bar MAASENG-2058 #5193
Conversation
Demo starting at https://maas-ui-5193.demos.haus |
@@ -208,3 +210,50 @@ it("displays last image sync timestamp for a rack or region+rack controller", () | |||
`Last image sync: ${controller.last_image_sync}` | |||
); | |||
}); | |||
|
|||
it("displays the feedback link when analytics enabled and not in development environment", () => { | |||
process.env = { ...originalEnv, NODE_ENV: "production" }; |
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.
Do these changes to process.env
persist beyond these tests? I would suggest reverting it after each test in this suite is run to prevent it from causing problems elsewhere
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.
That's a good point, thanks for spotting this. Will follow up with a commit to reset this after each test
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.
Looks good, I left a few comments
Local documentation | ||
</a> | ||
</li> | ||
<li className="p-inline-list__item"> |
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.
Should these links open in place or in a new tab? Please advise @dgtlntv
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.
+1. I copied the original implementation directly, which opens them in the same tab, but some UX guidance would be really helpful here
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, I'll go ahead and approve this pending UX review
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.
Good point! I think opening in a new tab would be better!
I realised just now that, because the status bar is light blue, the contrast between the status bar and the link is too small so it doesn't pass WCAG AA for small text. We might need to adjust either of the colours. |
And as mentioned in the chat I think we should try to make the "Give feedback" button work again while we are at it. |
IMO I think the status bar colour is the better/easier one to change. Link colour is defined within vanilla AFAIK, so changing it in the footer would mean less consistency with Vanilla. The old design used to have a dark footer with light text, which may be better. And in any case, the status bar is the only place we see this colour being used in the UI, so changing it won't affect consistency with anything else. |
Agreed, changing the link colour wouldn't be a good idea. The color for the status bar in the Vanilla example is |
</a> | ||
</li> | ||
<li className="p-inline-list__item"> | ||
<a |
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.
Any reason why you couldn't use Link from react components?
We actually have an ExternalLink in maas-site-manager that has the behaviour you discussed (e.g. opening in a new tab built-in). That makes it a good candidate for addition to the library. I'll look into this.
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.
That's a good point, we should add that. Only reason I didn't use it here was that I was direct;y copying the original implementation in the footer. Will update to use this.
Done
#F7F7F7
QA steps
Fixes
Fixes:
Screenshots
Before
After
Notes
The "Give feedback" link may not be visible locally, since this only appears in production (and if "Enable analytics" is true). You can test this by negating line 110 in
src/app/base/components/StatusBar/StatusBar.tsx