Skip to content

Commit

Permalink
Add better anchors for product tours (#180)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeljguarino authored Jan 5, 2023
1 parent 5bf3bb0 commit 3dd4afc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
4 changes: 3 additions & 1 deletion assets/src/components/Console.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export const TOOLBAR_HEIGHT = '55px'
export const SIDEBAR_WIDTH = '200px'
const APP_ICON = `${process.env.PUBLIC_URL}/console-full.png`

export function Icon({ icon, text, selected, path, onClick, size, align }) {
export function Icon({ id, icon, text, selected, path, onClick, size, align }) {
const dropRef = useRef()
const history = useHistory()
const [hover, setHover] = useState(false)
Expand All @@ -59,6 +59,7 @@ export function Icon({ icon, text, selected, path, onClick, size, align }) {
ref={dropRef}
focusIndicator={false}
className={`sidebar-icon${selected ? ' selected' : ''}`}
id={id}
align="center"
justify="center"
margin={{ horizontal: 'xsmall' }}
Expand Down Expand Up @@ -270,6 +271,7 @@ export default function Console() {
<AutoRefresh />
<SocialLinks />
<Icon
id="installer"
icon={<Install size="18px" />}
text="Install"
size="40px"
Expand Down
5 changes: 4 additions & 1 deletion assets/src/components/Installations.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,11 @@ export function InstallationsFlyout() {
)
}

export function ToolbarItem({ children, onClick, open }) {
export function ToolbarItem({ id, children, onClick, open }) {
return (
<Box
flex={false}
id={id}
direction="row"
round="xsmall"
background={open ? 'sidebarHover' : null}
Expand Down Expand Up @@ -336,6 +337,7 @@ export function Installations() {
align="center"
>
<Icon
id="application-information"
icon={<CircleInformation size="18px" />}
text="Application Details"
size="40px"
Expand All @@ -344,6 +346,7 @@ export function Installations() {
onClick={() => setModal(true)}
/>
<ToolbarItem
id="application-selector"
onClick={() => setOpen(true)}
open={open}
>
Expand Down
2 changes: 2 additions & 0 deletions assets/src/components/Sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export function SidebarIcon({ icon, text, name: sidebarName, selected, path, san
>
<Box
focusIndicator={false}
className={`sidebar-${text}`}
fill="horizontal"
align="center"
direction="row"
Expand Down Expand Up @@ -90,6 +91,7 @@ function CompressedIcon({ icon, text, selected, path, sandboxed }) {
<Box
ref={setRef}
focusIndicator={false}
className={`sidebar-${text}`}
align="center"
justify="center"
direction="row"
Expand Down

0 comments on commit 3dd4afc

Please sign in to comment.