Skip to content

Commit 3dd4afc

Browse files
Add better anchors for product tours (#180)
1 parent 5bf3bb0 commit 3dd4afc

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

assets/src/components/Console.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export const TOOLBAR_HEIGHT = '55px'
4848
export const SIDEBAR_WIDTH = '200px'
4949
const APP_ICON = `${process.env.PUBLIC_URL}/console-full.png`
5050

51-
export function Icon({ icon, text, selected, path, onClick, size, align }) {
51+
export function Icon({ id, icon, text, selected, path, onClick, size, align }) {
5252
const dropRef = useRef()
5353
const history = useHistory()
5454
const [hover, setHover] = useState(false)
@@ -59,6 +59,7 @@ export function Icon({ icon, text, selected, path, onClick, size, align }) {
5959
ref={dropRef}
6060
focusIndicator={false}
6161
className={`sidebar-icon${selected ? ' selected' : ''}`}
62+
id={id}
6263
align="center"
6364
justify="center"
6465
margin={{ horizontal: 'xsmall' }}
@@ -270,6 +271,7 @@ export default function Console() {
270271
<AutoRefresh />
271272
<SocialLinks />
272273
<Icon
274+
id="installer"
273275
icon={<Install size="18px" />}
274276
text="Install"
275277
size="40px"

assets/src/components/Installations.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,11 @@ export function InstallationsFlyout() {
131131
)
132132
}
133133

134-
export function ToolbarItem({ children, onClick, open }) {
134+
export function ToolbarItem({ id, children, onClick, open }) {
135135
return (
136136
<Box
137137
flex={false}
138+
id={id}
138139
direction="row"
139140
round="xsmall"
140141
background={open ? 'sidebarHover' : null}
@@ -336,6 +337,7 @@ export function Installations() {
336337
align="center"
337338
>
338339
<Icon
340+
id="application-information"
339341
icon={<CircleInformation size="18px" />}
340342
text="Application Details"
341343
size="40px"
@@ -344,6 +346,7 @@ export function Installations() {
344346
onClick={() => setModal(true)}
345347
/>
346348
<ToolbarItem
349+
id="application-selector"
347350
onClick={() => setOpen(true)}
348351
open={open}
349352
>

assets/src/components/Sidebar.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ export function SidebarIcon({ icon, text, name: sidebarName, selected, path, san
4848
>
4949
<Box
5050
focusIndicator={false}
51+
className={`sidebar-${text}`}
5152
fill="horizontal"
5253
align="center"
5354
direction="row"
@@ -90,6 +91,7 @@ function CompressedIcon({ icon, text, selected, path, sandboxed }) {
9091
<Box
9192
ref={setRef}
9293
focusIndicator={false}
94+
className={`sidebar-${text}`}
9395
align="center"
9496
justify="center"
9597
direction="row"

0 commit comments

Comments
 (0)