Skip to content

Commit

Permalink
Reverted font and fixed sample scrolling
Browse files Browse the repository at this point in the history
  • Loading branch information
bmingles committed Nov 14, 2023
1 parent 22b8b9f commit 4a2e627
Show file tree
Hide file tree
Showing 14 changed files with 14 additions and 5 deletions.
1 change: 0 additions & 1 deletion packages/code-studio/src/styleguide/Grids.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ function Grids(): ReactElement {
autoSelectRow: true,
});
const [contextTheme] = useState<Partial<GridThemeType>>({
font: '12px sans-serif',
rowHeight: 40,
});
return (
Expand Down
18 changes: 14 additions & 4 deletions packages/code-studio/src/styleguide/SamplesMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,25 @@ export function SamplesMenu(): JSX.Element {
el.id = id;

currentCategory.items.push({ id, label: el.textContent });

if (`#${id}` === window.location.hash) {
el.scrollIntoView();
}
});

setLinks(categories);
}, []);

useEffect(() => {
const el =
window.location.hash === ''
? null
: document.querySelector(window.location.hash);

if (el) {
// Give everything a chance to render before scrolling
setTimeout(() => {
el.scrollIntoView();
}, 0);
}
}, []);

const onAction = useCallback((key: Key) => {
const id = String(key);
const el = document.getElementById(id);
Expand Down
Binary file modified tests/styleguide.spec.ts-snapshots/grids-async-firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/styleguide.spec.ts-snapshots/grids-async-webkit-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/styleguide.spec.ts-snapshots/grids-data-bar-webkit-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/styleguide.spec.ts-snapshots/grids-grid-firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/styleguide.spec.ts-snapshots/grids-grid-webkit-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/styleguide.spec.ts-snapshots/grids-static-firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/styleguide.spec.ts-snapshots/grids-static-webkit-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/styleguide.spec.ts-snapshots/grids-tree-firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/styleguide.spec.ts-snapshots/grids-tree-webkit-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 4a2e627

Please sign in to comment.