Skip to content
Merged
Changes from all commits
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
128 changes: 66 additions & 62 deletions packages/code-studio/src/styleguide/StyleGuide.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,78 +45,82 @@ function StyleGuide(): React.ReactElement {
const hasMultipleThemes = themes.length > 1;

return (
<div className="container style-guide-container">
{/* For e2e tests this allows us to isolate sections for snapshots. This
// Needs a tabindex to capture focus on popper blur
// AppMainContainer has a tabindex of -1 in the app itself
<div tabIndex={-1} role="main">
Comment thread
bmingles marked this conversation as resolved.
<div className="container style-guide-container">
{/* For e2e tests this allows us to isolate sections for snapshots. This
mitigates an issue where a change to a section in the styleguide can cause
subtle pixel shifts in other sections */}
{isolateSection && (
<style>
{`.${HIDE_FROM_E2E_TESTS_CLASS}, .sample-section:not(${window.location.hash}), :not(.sample-section) > h2 {
{isolateSection && (
<style>
{`.${HIDE_FROM_E2E_TESTS_CLASS}, .sample-section:not(${window.location.hash}), :not(.sample-section) > h2 {
display: none;
}`}
</style>
)}
<Flex
justifyContent="space-between"
alignItems="center"
marginTop="2rem"
marginBottom="1rem"
>
<h1 style={{ paddingTop: '2rem' }}>Deephaven UI Components</h1>
</Flex>
</style>
)}
<Flex
justifyContent="space-between"
alignItems="center"
marginTop="2rem"
marginBottom="1rem"
>
<h1 style={{ paddingTop: '2rem' }}>Deephaven UI Components</h1>
</Flex>

<Flex
{...stickyProps}
UNSAFE_className={HIDE_FROM_E2E_TESTS_CLASS}
marginTop={-56}
top={20}
gap={10}
alignItems="end"
>
{hasMultipleThemes ? <ThemePicker /> : null}
<SamplesMenu />
</Flex>
<Flex
{...stickyProps}
UNSAFE_className={HIDE_FROM_E2E_TESTS_CLASS}
top="calc(100vh - 40px)"
marginTop={-32}
marginEnd={hasMultipleThemes ? -234 : 0}
>
<GotoTopButton />
</Flex>
<Flex
{...stickyProps}
UNSAFE_className={HIDE_FROM_E2E_TESTS_CLASS}
marginTop={-56}
top={20}
gap={10}
alignItems="end"
>
{hasMultipleThemes ? <ThemePicker /> : null}
<SamplesMenu />
</Flex>
<Flex
{...stickyProps}
UNSAFE_className={HIDE_FROM_E2E_TESTS_CLASS}
top="calc(100vh - 40px)"
marginTop={-32}
marginEnd={hasMultipleThemes ? -234 : 0}
>
<GotoTopButton />
</Flex>

<Typograpy />
<Typograpy />

<SampleMenuCategory data-menu-category="Colors" />
<Colors />
<ThemeColors />
<SampleMenuCategory data-menu-category="Colors" />
<Colors />
<ThemeColors />

<SampleMenuCategory data-menu-category="Layout" />
<GoldenLayout />
<SampleMenuCategory data-menu-category="Layout" />
<GoldenLayout />

<SampleMenuCategory data-menu-category="Components" />
<Buttons />
<Progress />
<Inputs />
<ItemListInputs />
<DraggableLists />
<TimeSliderInputs />
<Dialog />
<Modals />
<ContextMenus />
<DropdownMenus />
<Navigations />
<Tooltips />
<Icons />
<Editors />
<Grids />
<Charts />
<ContextMenuRoot />
<RandomAreaPlotAnimation />
<SampleMenuCategory data-menu-category="Components" />
<Buttons />
<Progress />
<Inputs />
<ItemListInputs />
<DraggableLists />
<TimeSliderInputs />
<Dialog />
<Modals />
<ContextMenus />
<DropdownMenus />
<Navigations />
<Tooltips />
<Icons />
<Editors />
<Grids />
<Charts />
<ContextMenuRoot />
<RandomAreaPlotAnimation />

<SampleMenuCategory data-menu-category="Spectrum Components" />
<SpectrumComponents />
<SampleMenuCategory data-menu-category="Spectrum Components" />
<SpectrumComponents />
</div>
</div>
);
}
Expand Down