Skip to content
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(ui): add request poc panel #6838

Merged
merged 4 commits into from
Jan 16, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion src/pageLayout/containers/MainNavigation.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
.helpBarStyle {
@import '@influxdata/clockface/dist/variables.scss';

.nav-item-support {
margin-top: auto !important;
}

.nav-item-poc {
background: rgba(241, 241, 243, 0.05);
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
padding: $cf-space-s;
text-align: center;
margin-top: auto;

.cf-button {
margin-top: $cf-space-s;
}

+ .nav-item-support {
margin-top: $cf-space-s !important;
}
}
31 changes: 29 additions & 2 deletions src/pageLayout/containers/MainNavigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,14 @@ import {Link, useLocation} from 'react-router-dom'
import {useDispatch, useSelector} from 'react-redux'

// Components
import {Icon, IconFont, PopoverPosition, TreeNav} from '@influxdata/clockface'
import {
Button,
ComponentColor,
Icon,
IconFont,
PopoverPosition,
TreeNav,
} from '@influxdata/clockface'
import UserWidget from 'src/pageLayout/components/UserWidget'
import NavHeader from 'src/pageLayout/components/NavHeader'

Expand Down Expand Up @@ -302,6 +309,12 @@ export const MainNavigation: FC = () => {
event('helpBar.contactSupportRequest.overlay.shown')
}

const handleRequestPocClick = () => {
event('nav.requestPOC.clicked')
const newTab = window.open('https://www.influxdata.com/proof-of-concept/')
mavarius marked this conversation as resolved.
Show resolved Hide resolved
newTab.focus()
}

return (
<TreeNav
expanded={navbarMode === 'expanded'}
Expand Down Expand Up @@ -373,13 +386,27 @@ export const MainNavigation: FC = () => {
</TreeNav.Item>
)
})}
{accountType === 'free' && (
<div className="nav-item-poc">
<span>
This is a rate limited environment. Want to test the performance and
scalability of your workload?
</span>
<Button
icon={IconFont.Flask}
text="Request a POC"
color={ComponentColor.Primary}
onClick={handleRequestPocClick}
/>
</div>
)}
<TreeNav.Item
id="support"
testID="nav-item-support"
icon={<Icon glyph={IconFont.QuestionMark_Outline} />}
label="Help &amp; Support"
shortLabel="Support"
className="helpBarStyle"
className="nav-item-support"
>
<TreeNav.SubMenu position={PopoverPosition.ToTheRight}>
<TreeNav.SubHeading label="Support" />
Expand Down
Loading