Skip to content

Commit 8760bb7

Browse files
authored
Decision Process Design Tweaks (#714)
Updates to Proposal Editor and Process Builder ### updated proposal editor color and font sizes <img width="1125" height="406" alt="Screenshot 2026-03-05 at 14 43 40" src="https://github.com/user-attachments/assets/4e21fc6f-3f07-43f4-97bb-d0e2ba08ee44" /> ### Proposal card button sizes <img width="374" height="272" alt="Screenshot 2026-03-05 at 14 50 00" src="https://github.com/user-attachments/assets/008e2ab6-bb53-425d-8b29-6fed13a7aa0d" /> ### Process Builder font sizes <img width="136" height="229" alt="Screenshot 2026-03-05 at 14 50 55" src="https://github.com/user-attachments/assets/178fbb4a-feb3-463f-94a9-f46153285abb" /> ### Attachments in Proposals <img width="878" height="315" alt="Screenshot 2026-03-05 at 15 24 41" src="https://github.com/user-attachments/assets/0588cdcf-6230-4304-8a21-1bd412094424" /> Issues: https://app.asana.com/1/1108348036672214/project/1213315744811204/task/1213319501728095?focus=true https://app.asana.com/1/1108348036672214/project/1213315744811204/task/1213319501728141?focus=true https://app.asana.com/1/1108348036672214/project/1213315744811204/task/1213319501728099?focus=true https://app.asana.com/1/1108348036672214/project/1213315744811204/task/1213319501728149?focus=true
1 parent 2d1ade5 commit 8760bb7

File tree

8 files changed

+42
-17
lines changed

8 files changed

+42
-17
lines changed

apps/app/src/components/IconProvider.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { IconContext } from 'react-icons';
44

55
export const IconProvider = ({ children }: { children: React.ReactNode }) => {
66
return (
7-
<IconContext.Provider value={{ className: 'stroke-[1.5]' }}>
7+
<IconContext.Provider value={{ className: 'stroke-1' }}>
88
{children}
99
</IconContext.Provider>
1010
);

apps/app/src/components/RichTextEditor/RichTextEditorToolbar.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
'use client';
22

33
import { useFileUpload } from '@/hooks/useFileUpload';
4+
import { cn } from '@op/ui/utils';
45
import type { Editor } from '@tiptap/react';
56
import {
67
AlignCenter,
@@ -110,7 +111,12 @@ export function RichTextEditorToolbar({
110111
`shrink-0 rounded p-2 hover:bg-gray-100 ${active ? 'bg-gray-200' : ''}`;
111112

112113
return (
113-
<div className={`justify-between border-b px-6 py-2 ${className}`}>
114+
<div
115+
className={cn(
116+
'justify-between border-b px-6 py-2 text-neutral-charcoal',
117+
className,
118+
)}
119+
>
114120
<div className="mx-auto scrollbar-hide flex max-w-fit min-w-0 items-center gap-1 overflow-x-auto">
115121
{/* Undo/Redo */}
116122
<button

apps/app/src/components/decisions/ProcessBuilder/stepContent/template/TemplateEditorSidebar.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
'use client';
22

33
import { Button } from '@op/ui/Button';
4+
import { Header4 } from '@op/ui/Header';
45
import { Sidebar, useSidebar } from '@op/ui/Sidebar';
56
import type { IconType } from 'react-icons';
67
import { LuAlignJustify } from 'react-icons/lu';
@@ -96,9 +97,7 @@ function SidebarContent({
9697
</div>
9798

9899
<div className="mt-2 md:mt-4">
99-
<h3 className="mb-2 text-sm font-medium text-neutral-gray4">
100-
{t('Fields')}
101-
</h3>
100+
<Header4 className="mb-2">{t('Fields')}</Header4>
102101
<ul className="space-y-1">
103102
{fields.map((field) => {
104103
const Icon =
@@ -109,7 +108,7 @@ function SidebarContent({
109108
}
110109
return (
111110
<li key={field.id}>
112-
<div className="flex w-full items-center gap-2 rounded px-2 py-1.5 text-left text-sm text-neutral-charcoal">
111+
<div className="flex w-full items-center gap-2 rounded px-2 py-1.5 text-left text-base text-neutral-charcoal">
113112
<Icon className="size-4 shrink-0 text-neutral-gray4" />
114113
<span className="truncate">{field.label}</span>
115114
</div>

apps/app/src/components/decisions/ProposalCard/ProposalCardActions.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,12 @@ export function ProposalCardOwnerActions({
118118
return (
119119
<>
120120
<div className="flex w-full items-center gap-4">
121-
<ButtonLink href={editHref} color="secondary" className="w-full">
121+
<ButtonLink
122+
href={editHref}
123+
color="secondary"
124+
size="small"
125+
className="w-full"
126+
>
122127
<Pencil className="size-4" />
123128
{t('Edit')}
124129
</ButtonLink>
@@ -129,6 +134,7 @@ export function ProposalCardOwnerActions({
129134
<Button
130135
onPress={() => setIsDeleteModalOpen(true)}
131136
color="secondary"
137+
size="small"
132138
className="w-full"
133139
isDisabled={deleteProposalMutation.isPending}
134140
>

apps/app/src/components/decisions/ProposalCard/ProposalCardComponents.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export function ProposalCard({
5353
<Surface
5454
variant={isDraft ? 'filled' : 'empty'}
5555
className={cn(
56-
'relative flex w-full min-w-80 flex-col justify-between gap-4 p-6',
56+
'relative flex w-full min-w-80 flex-col justify-between gap-3 p-4',
5757
className,
5858
)}
5959
{...props}
@@ -383,10 +383,7 @@ export function ProposalCardPreview({
383383

384384
return (
385385
<p
386-
className={cn(
387-
'mb-4 line-clamp-3 text-base text-neutral-charcoal',
388-
className,
389-
)}
386+
className={cn('line-clamp-3 text-base text-neutral-charcoal', className)}
390387
>
391388
{displayText}
392389
</p>

apps/app/src/components/decisions/ProposalEditorLayout.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
'use client';
22

33
import { Button } from '@op/ui/Button';
4+
import { Header4 } from '@op/ui/Header';
45
import { LoadingSpinner } from '@op/ui/LoadingSpinner';
56
import { useRouter } from 'next/navigation';
67
import { ReactNode, useState } from 'react';
@@ -61,10 +62,10 @@ export function ProposalEditorLayout({
6162
<span className="hidden sm:block">{t('Back')}</span>
6263
</button>
6364

64-
<div className="flex justify-center text-lg font-medium text-neutral-black">
65-
<span className="hidden sm:block">
65+
<div className="flex justify-center">
66+
<Header4 className="hidden sm:block">
6667
{title ? title : t('Untitled Proposal')}
67-
</span>
68+
</Header4>
6869
</div>
6970

7071
<div className="flex items-center justify-end gap-4">

packages/ui/src/components/FileDropZone.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ const dropZoneStyles = tv({
4545
root: 'group/dropzone flex w-full',
4646
button: [
4747
'flex flex-1 cursor-pointer flex-col items-center justify-center gap-6',
48-
'rounded-2xl border border-dashed border-neutral-gray2 bg-neutral-offWhite',
49-
'px-12 py-8',
48+
'rounded-lg border border-dashed border-neutral-gray2 bg-neutral-offWhite',
49+
'px-12 py-6',
5050
'outline-hidden transition-colors duration-200',
5151
'focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-teal-500',
5252
'group-data-[drop-target]/dropzone:border-teal-500 group-data-[drop-target]/dropzone:bg-teal-50/30',

packages/ui/src/components/Header.tsx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,22 @@ export const Header3 = ({
4242
);
4343
};
4444

45+
export const Header4 = ({
46+
children,
47+
className,
48+
}: {
49+
children: React.ReactNode;
50+
className?: string;
51+
}) => {
52+
return (
53+
<h4
54+
className={cn('font-serif text-title-sm14 text-neutral-black', className)}
55+
>
56+
{children}
57+
</h4>
58+
);
59+
};
60+
4561
export const GradientHeader = ({
4662
children,
4763
className,

0 commit comments

Comments
 (0)