Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

style(fonts): actually use Inter, swap mono for Roboto (#2112)

Seamus0f58bd41636e
diff --git a/js/app/bun.lock b/js/app/bun.lock
index 9a42aeaf60..8cf3856e54 100644
--- a/js/app/bun.lock
+++ b/js/app/bun.lock
@@ -22,6 +22,7 @@
"@date-fns/tz": "^1.4.1",
"@floating-ui/dom": "^1.7.4",
"@fontsource-variable/inter": "^5.2.8",
+ "@fontsource-variable/roboto-mono": "^5.2.8",
"@inkibra/tauri-plugins": "git+https://github.com/seanaye/tauri-plugins.git#0c932ffd3202145b40645246d87a38deb72ba09c",
"@kobalte/core": "^0.13.11",
"@leeoniya/ufuzzy": "^1.0.19",
@@ -707,6 +708,8 @@
"@fontsource-variable/inter": ["@fontsource-variable/[email protected]", "", {}, "sha512-kOfP2D+ykbcX/P3IFnokOhVRNoTozo5/JxhAIVYLpea/UBmCQ/YWPBfWIDuBImXX/15KH+eKh4xpEUyS2sQQGQ=="],
+ "@fontsource-variable/roboto-mono": ["@fontsource-variable/[email protected]", "", {}, "sha512-6M2U3wGIUxYNKRrUoKls8BRRIPDA57T8J0agqwyDkiEHrLEEAqptsxcUl3eTm6tnRNEn6yEm4pCefvtnujebDA=="],
+
"@gerrit0/mini-shiki": ["@gerrit0/[email protected]", "", { "dependencies": { "@shikijs/engine-oniguruma": "^3.13.0", "@shikijs/langs": "^3.13.0", "@shikijs/themes": "^3.13.0", "@shikijs/types": "^3.13.0", "@shikijs/vscode-textmate": "^10.0.2" } }, "sha512-mCrNvZNYNrwKer5PWLF6cOc0OEe2eKzgy976x+IT2tynwJYl+7UpHTSeXQJGijgTcoOf+f359L946unWlYRnsg=="],
"@google-cloud/common": ["@google-cloud/[email protected]", "", { "dependencies": { "@google-cloud/projectify": "^4.0.0", "@google-cloud/promisify": "^4.0.0", "arrify": "^2.0.1", "duplexify": "^4.1.1", "extend": "^3.0.2", "google-auth-library": "^9.0.0", "html-entities": "^2.5.2", "retry-request": "^7.0.0", "teeny-request": "^9.0.0" } }, "sha512-V7bmBKYQyu0eVG2BFejuUjlBt+zrya6vtsKdY+JxMM/dNntPF41vZ9+LhOshEUH01zOHEqBSvI7Dad7ZS6aUeA=="],
diff --git a/js/app/package.json b/js/app/package.json
index fbae3db065..cb4d47ffab 100644
--- a/js/app/package.json
+++ b/js/app/package.json
@@ -38,6 +38,7 @@
"@date-fns/tz": "^1.4.1",
"@floating-ui/dom": "^1.7.4",
"@fontsource-variable/inter": "^5.2.8",
+ "@fontsource-variable/roboto-mono": "^5.2.8",
"@inkibra/tauri-plugins": "git+https://github.com/seanaye/tauri-plugins.git#0c932ffd3202145b40645246d87a38deb72ba09c",
"@kobalte/core": "^0.13.11",
"@leeoniya/ufuzzy": "^1.0.19",
diff --git a/js/app/packages/app/index.css b/js/app/packages/app/index.css
index 2174d58074..bf46c4d64e 100644
--- a/js/app/packages/app/index.css
+++ b/js/app/packages/app/index.css
@@ -516,8 +516,9 @@
@theme default {
/* Font families */
- --font-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
- --font-mono: "Forma DJR Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
+ --font-sans: "Inter Variable", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
+ /*--font-mono: "Roboto Mono Variable", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;*/
+ --font-mono: "Roboto Mono Variable", monospace;
--font-serif: "Georgia", ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
--text-xxs: 0.625rem;
@@ -615,6 +616,7 @@
-moz-osx-font-smoothing: grayscale;
color: var(--color-ink);
+ font-feature-settings: "dlig" 1, "calt" 1;
}
@font-face {
@@ -622,15 +624,6 @@
src: url("./asset/fonts/OoohBaby-Regular.woff2") format("truetype");
}
- @font-face {
- font-family: "Forma Macro Mono";
- src: url("./asset/fonts/FormaMacroMonoVariable.woff2") format("woff2");
- font-weight: 200 700;
- font-style: normal italic;
- font-display: swap;
- font-feature-settings: "ss11" on, "ss19" on, "calt", "liga", "rlig", "rvrn", "kern", "rclt";
- }
-
/* This is ugly, and we can probably do better, but it stops text from being selectable by default, which is important for mobile usage */
:where(*, ::before, ::after) {
user-select: none;
diff --git a/js/app/packages/app/index.tsx b/js/app/packages/app/index.tsx
index d9297da470..3cfd4e046d 100644
--- a/js/app/packages/app/index.tsx
+++ b/js/app/packages/app/index.tsx
@@ -1,8 +1,8 @@
import './index.css';
import '@fontsource-variable/inter';
+import '@fontsource-variable/roboto-mono';
// SolidDevtools retains disposed memos, causes memory leak
// import 'solid-devtools';
-
import * as analytics from '@coparse/analytics';
import { initializeLexical } from '@core/component/LexicalMarkdown/init';
import { isTouchDevice } from '@core/mobile/isTouchDevice';
diff --git a/js/app/packages/core/component/LexicalMarkdown/component/accessory/CodeBoxAccessory.tsx b/js/app/packages/core/component/LexicalMarkdown/component/accessory/CodeBoxAccessory.tsx
index b98d66e22b..b87c8c719b 100644
--- a/js/app/packages/core/component/LexicalMarkdown/component/accessory/CodeBoxAccessory.tsx
+++ b/js/app/packages/core/component/LexicalMarkdown/component/accessory/CodeBoxAccessory.tsx
@@ -3,8 +3,7 @@
* language selector.
*/
import { isInBlock, useIsNestedBlock } from '@core/block';
-import { DeprecatedIconButton } from '@core/component/DeprecatedIconButton';
-import { DeprecatedTextButton } from '@core/component/DeprecatedTextButton';
+
import { DropdownMenuContent, MenuItem } from '@core/component/Menu';
import { toast } from '@core/component/Toast/Toast';
import { ENABLE_SVG_PREVIEW } from '@core/constant/featureFlags';
@@ -47,6 +46,7 @@ import {
import { Dynamic } from 'solid-js/web';
import { glueToElement } from '../../directive/glueToElement';
import { autoRegister } from '../../plugins/shared/utils';
+import { Button } from '@ui/components/Button';
false && glueToElement;
@@ -106,14 +106,19 @@ export function CodeLanguageSelector(props: {
when={editable()}
fallback={<StaticLabel language={validCurrentLanguage()} />}
>
- <DeprecatedTextButton
+ <Button
// TODO: Icon mapping moved to frontend package
- icon={LanguageIcons[validCurrentLanguage()]}
- theme="extraMuted"
- text={LanguageDefinitions[validCurrentLanguage()].label}
- showChevron
+ variant="ghost"
+ size="sm"
+ class="text-ink-extra-muted/50 rounded-xs p-1.5"
tabIndex={-1}
- />
+ >
+ <Dynamic
+ component={LanguageIcons[validCurrentLanguage()]}
+ class="size-4"
+ />
+ <span>{LanguageDefinitions[validCurrentLanguage()].label}</span>
+ </Button>
</Show>
</DropdownMenu.Trigger>
<DropdownMenu.Portal>
@@ -228,13 +233,13 @@ export function CodeBoxAccessory(props: {
}));
}}
>
- <div class="w-full flex justify-between content-center items-center p-1 pointer-events-auto text-ink-extra-muted">
+ <div class="w-full flex justify-between content-center items-start p-1 pointer-events-auto text-ink-extra-muted">
<CodeLanguageSelector
language={language}
setLanguage={setLanguageOnNode}
editor={props.editor}
/>
- <div class="flex gap-2 items-center">
+ <div class="flex gap-2 items-center h-full">
<Show when={showPreviewToggle()}>
<div class="flex items-center gap-2">
<div class="text-xs text-ink-extra-muted">Preview</div>
@@ -252,16 +257,19 @@ export function CodeBoxAccessory(props: {
</Switch>
</div>
</Show>
- <DeprecatedIconButton
- theme="extraMuted"
- icon={Copy}
- tooltip={{ label: 'Copy Code' }}
+ <Button
+ variant="ghost"
+ size="icon-sm"
+ class="text-ink-extra-muted rounded-xs h-full"
+ tooltip="Copy Code"
on:click={(e) => {
e.stopPropagation();
e.preventDefault();
copyCode();
}}
- />
+ >
+ <Copy />
+ </Button>
</div>
</div>
<Show when={isPreviewMode() && showPreviewToggle()}>
@@ -417,16 +425,19 @@ export const StaticCodeBoxAccessory = (props: {
</Switch>
</div>
</Show>
- <DeprecatedIconButton
- theme="extraMuted"
- icon={() => <Copy class={`size-5 ${textColor()}`} />}
- tooltip={{ label: 'Copy Code' }}
+ <Button
+ variant="ghost"
+ size="icon-sm"
+ class="text-ink-extra-muted rounded-xs h-full"
+ tooltip="Copy Code"
on:click={(e) => {
e.stopPropagation();
e.preventDefault();
copyCode();
}}
- />
+ >
+ <Copy />
+ </Button>
</div>
</div>
<Show when={isPreviewMode() && showPreviewToggle()}>