Skip to content

#1 PDF Application on GitHub that lets you edit PDFs on any device anywhere

Portal Home: SVG quick-action icons (#6998)

Anthony Stirlingb5d0c4a5ed74
diff --git a/frontend/editor/src/portal/views/Home.css b/frontend/editor/src/portal/views/Home.css
index e1af68b768..3027dfa1bc 100644
--- a/frontend/editor/src/portal/views/Home.css
+++ b/frontend/editor/src/portal/views/Home.css
@@ -93,8 +93,11 @@
width: 1.75rem;
height: 1.75rem;
border-radius: var(--radius-md);
- font-size: 0.875rem;
- font-weight: 600;
+ flex-shrink: 0;
+}
+.portal-home__quick-icon svg {
+ width: 1.05rem;
+ height: 1.05rem;
}
.portal-home__quick-text {
@@ -116,9 +119,13 @@
}
.portal-home__quick-arrow {
- font-size: 0.875rem;
+ display: inline-flex;
color: var(--color-text-5);
}
+.portal-home__quick-arrow svg {
+ width: 1rem;
+ height: 1rem;
+}
.portal-home__quick-row:hover .portal-home__quick-arrow {
color: var(--color-blue);
diff --git a/frontend/editor/src/portal/views/Home.tsx b/frontend/editor/src/portal/views/Home.tsx
index a1829d5476..2f8f812581 100644
--- a/frontend/editor/src/portal/views/Home.tsx
+++ b/frontend/editor/src/portal/views/Home.tsx
@@ -13,31 +13,52 @@ import "@portal/views/Home.css";
/* Quick actions card */
/* ──────────────────────────────────────────────────────────────────────── */
+/** A stroke icon used inside the quick-action badge (replaces the old text
+ glyphs ⌃ ⇢ ⚙, which rendered off-style vs the portal's icon set). */
+function QuickIcon({ d }: { d: string }) {
+ return (
+ <svg
+ viewBox="0 0 24 24"
+ fill="none"
+ stroke="currentColor"
+ strokeWidth="1.7"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ aria-hidden
+ >
+ <path d={d} />
+ </svg>
+ );
+}
+
/** Rows for the Quick Actions list. Each `view` navigates the portal. */
const QUICK_ACTIONS: Array<{
key: string;
- glyph: string;
+ iconD: string;
bg: string;
fg: string;
view: ViewId;
}> = [
{
key: "buildPipeline",
- glyph: "⌃",
+ iconD:
+ "M6 4a2 2 0 100 4 2 2 0 000-4zM18 16a2 2 0 100 4 2 2 0 000-4zM6 8v6a4 4 0 004 4h4",
bg: "var(--color-purple-light)",
fg: "var(--color-purple)",
view: "pipelines",
},
{
key: "connectSource",
- glyph: "⇢",
+ iconD:
+ "M10 13a5 5 0 007 0l3-3a5 5 0 00-7-7l-1 1M14 11a5 5 0 00-7 0l-3 3a5 5 0 007 7l1-1",
bg: "var(--color-green-light)",
fg: "var(--color-green-dark)",
view: "sources",
},
{
key: "issueApiKey",
- glyph: "⚙",
+ iconD:
+ "M2.6 17.4A2 2 0 002 18.8V21a1 1 0 001 1h3a1 1 0 001-1v-1a1 1 0 011-1h1a1 1 0 001-1v-1a1 1 0 011-1h.2a2 2 0 001.4-.6l.8-.8a6.5 6.5 0 10-4-4z M16.5 7.5 h.01",
bg: "var(--color-amber-light)",
fg: "var(--color-amber-dark)",
view: "infrastructure",
@@ -75,12 +96,21 @@ function QuickActions() {
style={{ background: action.bg, color: action.fg }}
aria-hidden
>
- {action.glyph}
+ <QuickIcon d={action.iconD} />
</span>
}
rightSection={
<span className="portal-home__quick-arrow" aria-hidden>
- →
+ <svg
+ viewBox="0 0 24 24"
+ fill="none"
+ stroke="currentColor"
+ strokeWidth="2"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ >
+ <path d="M9 6l6 6-6 6" />
+ </svg>
</span>
}
>