Skip to content

Commit

Permalink
feat: Non-monospace font
Browse files Browse the repository at this point in the history
  • Loading branch information
ernestii committed Jun 5, 2024
1 parent 3b29721 commit 41dafc3
Show file tree
Hide file tree
Showing 11 changed files with 18 additions and 16 deletions.
4 changes: 0 additions & 4 deletions packages/app/.storybook/preview-head.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,3 @@
href="https://fonts.gstatic.com"
crossorigin="anonymous"
/>
<link
href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@300;400;500;600;700&display=swap"
rel="stylesheet"
/>
3 changes: 2 additions & 1 deletion packages/app/src/AppNav.components.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export const AppNavUserMenu = ({
m="sm"
mt={8}
px={8}
py={4}
py={6}
radius="md"
{...(isCollapsed && {
p: 2,
Expand All @@ -85,6 +85,7 @@ export const AppNavUserMenu = ({
<Text
size="xs"
c="dimmed"
lh={1.1}
style={{
fontSize: 11,
maxWidth: '100%',
Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/AutocompleteInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ export default function AutocompleteInput({
ref={inputRef}
type="text"
placeholder={placeholder}
className="border-0 fs-7"
className="border-0 fs-7 mono"
value={value}
size={size}
onChange={e => onChange(e.target.value)}
Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/LogSidePanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2124,7 +2124,7 @@ function SidePanelHeader({
<div>
<div
className="bg-hdx-dark p-3 overflow-auto"
style={{ maxHeight: 300 }}
style={{ maxHeight: 300, fontFamily: 'var(--font-family-mono)' }}
>
{stripAnsi(logData.body)}
</div>
Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/LogTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ export const RawLogTable = memo(

return (
<div
className="overflow-auto h-100 fs-8 bg-inherit"
className="overflow-auto h-100 fs-8 bg-inherit mono"
onScroll={e => {
fetchMoreOnBottomReached(e.target as HTMLDivElement);

Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/PatternTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ const MemoPatternTable = memo(

return (
<div
className="overflow-auto h-100 fs-8 bg-inherit"
className="overflow-auto h-100 fs-8 bg-inherit mono"
ref={tableContainerRef}
// Fixes flickering scroll bar: https://github.com/TanStack/virtual/issues/426#issuecomment-1403438040
// style={{ overflowAnchor: 'none' }}
Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/TeamPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const APIKeyCopyButton = ({
</div>
}
>
<div data-test-id={dataTestId} className="text-wrap text-break">
<div data-test-id={dataTestId} className="text-wrap text-break mono">
{value}
</div>
</MButton>
Expand Down
1 change: 1 addition & 0 deletions packages/app/src/UserPreferencesModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {
import { UserPreferences, useUserPreferences } from './useUserPreferences';

const OPTIONS_FONTS = [
'IBM Plex Sans',
'IBM Plex Mono',
'Roboto Mono',
'Inter',
Expand Down
1 change: 1 addition & 0 deletions packages/app/src/components/HyperJson.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
flex-direction: column;
padding: 0px 4px;
font-size: 12px;
font-family: var(--font-family-mono);
}

.withTabulate {
Expand Down
4 changes: 2 additions & 2 deletions packages/app/src/useUserPreferences.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export type UserPreferences = {
isUTC: boolean;
timeFormat: '12h' | '24h';
theme: 'light' | 'dark';
font: 'IBM Plex Mono' | 'Inter';
font: 'IBM Plex Mono' | 'IBM Plex Sans' | 'Roboto Mono' | 'Inter' | string;
backgroundEnabled?: boolean;
backgroundUrl?: string;
backgroundBlur?: number;
Expand All @@ -21,7 +21,7 @@ export const userPreferencesAtom = atomWithStorage<UserPreferences>(
isUTC: false,
timeFormat: '12h',
theme: 'dark',
font: 'IBM Plex Mono',
font: 'IBM Plex Sans',
},
);

Expand Down
11 changes: 7 additions & 4 deletions packages/app/styles/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
@import '~bootstrap/scss/bootstrap';
@import url('https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css');
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;400;500;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:[email protected]&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:[email protected]&display=swap');
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&display=swap');

.inter {
font-family: Inter, Roboto, 'Helvetica Neue', sans-serif;
Expand All @@ -16,6 +15,10 @@
font-family: 'IBM Plex Mono', monospace;
}

:root {
--font-family-mono: 'IBM Plex Mono', monospace;
}

html,
body,
html[class~='dark'] body {
Expand Down Expand Up @@ -158,7 +161,7 @@ html[class~='dark'] body {
}

body {
font-family: 'IBM Plex Mono', monospace;
font-family: 'IBM Plex Sans', sans-serif;
font-size: $font-size-base * 0.875;
}

Expand Down Expand Up @@ -522,7 +525,7 @@ div.react-datepicker {
// background-color: $bg-dark;
background-color: $body-bg;

font-family: 'IBM Plex Mono', monospace;
font-family: 'IBM Plex Sans', monospace;
font-size: 14px;

// Calendar Month Header
Expand Down

0 comments on commit 41dafc3

Please sign in to comment.