Skip to content

Commit

Permalink
Fixed Popover corners and styleguide tweaks (deephaven#293)
Browse files Browse the repository at this point in the history
  • Loading branch information
bmingles committed Mar 7, 2024
1 parent cfade93 commit b37cf3f
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/code-studio/src/styleguide/SamplesMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export function SamplesMenu(): JSX.Element {
);

const spectrumComparisonSamples = document.querySelector(
`#${SPECTRUM_COMPARISON_SAMPLES_ID}`
`#sample-section-${SPECTRUM_COMPARISON_SAMPLES_ID}`
);

document
Expand Down
16 changes: 13 additions & 3 deletions packages/code-studio/src/styleguide/SpectrumComponents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,22 @@ import {
} from '@adobe/react-spectrum';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { dhTruck, vsEmptyWindow } from '@deephaven/icons';
import { SPECTRUM_COMPONENT_SAMPLES_ID } from './constants';
import { sampleSectionIdAndClassesSpectrum } from './utils';
import {
SAMPLE_SECTION_E2E_IGNORE,
SPECTRUM_COMPONENT_SAMPLES_ID,
} from './constants';
import {
sampleSectionIdAndClasses,
sampleSectionIdAndClassesSpectrum,
} from './utils';

export function SpectrumComponents(): JSX.Element {
return (
<div id={SPECTRUM_COMPONENT_SAMPLES_ID}>
<div
{...sampleSectionIdAndClasses(SPECTRUM_COMPONENT_SAMPLES_ID, [
SAMPLE_SECTION_E2E_IGNORE,
])}
>
<h2 className="ui-title" data-no-menu>
Spectrum Components
</h2>
Expand Down
2 changes: 1 addition & 1 deletion packages/code-studio/src/styleguide/StyleGuide.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ function StyleGuide(): React.ReactElement {
<Buttons />
<Progress />
<Inputs />
<Pickers />
<ItemListInputs />
<DraggableLists />
<TimeSliderInputs />
Expand All @@ -112,7 +113,6 @@ function StyleGuide(): React.ReactElement {
<ContextMenus />
<DropdownMenus />
<Navigations />
<Pickers />
<Tooltips />
<Icons />
<Editors />
Expand Down
8 changes: 6 additions & 2 deletions packages/components/scss/BaseStyleSheet.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,12 @@

color: var(--dh-color-text);

.spectrum-theme-provider,
[class*='_spectrum--'] {
.spectrum-theme-provider {
// This is important for portals with rounded corners (e.g. Popover) so that
// the underlying background color shows.
--dh-spectrum-theme-provider-bg: unset;

background-color: var(--dh-spectrum-theme-provider-bg);
color: var(--dh-color-text);
}
}
Expand Down

0 comments on commit b37cf3f

Please sign in to comment.