-
Notifications
You must be signed in to change notification settings - Fork 53
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
Changes from all commits
a9b2ed3
9789030
f055b36
954b1c1
7405edd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
import type { ReactNode } from "react"; | ||
|
||
import { Button, Link } from "@canonical/react-components"; | ||
import { useSelector } from "react-redux"; | ||
|
||
import { useUsabilla } from "app/base/hooks"; | ||
import configSelectors from "app/store/config/selectors"; | ||
import controllerSelectors from "app/store/controller/selectors"; | ||
import { | ||
|
@@ -53,6 +55,7 @@ export const StatusBar = (): JSX.Element | null => { | |
const activeMachine = useSelector(machineSelectors.active); | ||
const version = useSelector(versionSelectors.get); | ||
const maasName = useSelector(configSelectors.maasName); | ||
const allowUsabilla = useUsabilla(); | ||
|
||
if (!(maasName && version)) { | ||
return null; | ||
|
@@ -95,6 +98,37 @@ export const StatusBar = (): JSX.Element | null => { | |
: | ||
<span data-testid="status-bar-version">{version}</span> | ||
</div> | ||
<ul className="p-inline-list--middot u-no-margin--bottom"> | ||
<li className="p-inline-list__item"> | ||
<Link | ||
href={`${process.env.REACT_APP_BASENAME}/docs/`} | ||
rel="noreferrer" | ||
target="_blank" | ||
> | ||
Local documentation | ||
</Link> | ||
</li> | ||
<li className="p-inline-list__item"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe 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 commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. Good point! I think opening in a new tab would be better! |
||
<Link | ||
href="https://www.ubuntu.com/legal" | ||
rel="noreferrer" | ||
target="_blank" | ||
> | ||
Legal information | ||
</Link> | ||
</li> | ||
{allowUsabilla ? ( | ||
<li className="p-inline-list__item"> | ||
<Button | ||
appearance="link" | ||
className="u-no-margin u-no-padding" | ||
onClick={() => window.usabilla_live("click")} | ||
> | ||
Give feedback | ||
</Button> | ||
</li> | ||
) : null} | ||
</ul> | ||
{status && ( | ||
<div | ||
className="p-status-bar__secondary u-flex--grow u-flex--wrap" | ||
|
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 elsewhereThere 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