From 52190ff26db837f398415019bd0015725b06a90d Mon Sep 17 00:00:00 2001 From: dwindown Date: Thu, 25 Dec 2025 11:51:46 +0700 Subject: [PATCH] Fix Tiptap editor visual formatting and improve badge contrast MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Tiptap Editor Improvements: - Active toolbar buttons now use primary background (black) instead of accent (gray) for better visibility - Added visual formatting for headings (h1: 2xl bold, h2: xl bold with proper spacing) - Added visual styling for blockquotes (left border, italic, muted foreground) Badge Contrast Fixes: - Product detail page badges now use primary background (black with white text) instead of secondary/accent (gray) - Fixed product type badge and "Anda memiliki akses" badge - Fixed "Rekaman segera tersedia" badge API Query Fix: - Fixed consulting_slots 400 error by removing unsupported nested relationship filter - Changed to filter in JavaScript after fetching data from Supabase 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 --- src/components/RichTextEditor.tsx | 22 +++++++++++----------- src/pages/ProductDetail.tsx | 6 +++--- src/pages/member/MemberDashboard.tsx | 14 ++++++++++---- 3 files changed, 24 insertions(+), 18 deletions(-) diff --git a/src/components/RichTextEditor.tsx b/src/components/RichTextEditor.tsx index b7285af..ab99d3b 100644 --- a/src/components/RichTextEditor.tsx +++ b/src/components/RichTextEditor.tsx @@ -449,7 +449,7 @@ export function RichTextEditor({ content, onChange, placeholder = 'Tulis konten. variant="ghost" size="sm" onClick={() => editor.chain().focus().toggleBold().run()} - className={editor.isActive('bold') ? 'bg-accent' : ''} + className={editor.isActive('bold') ? 'bg-primary text-primary-foreground' : ''} > @@ -458,7 +458,7 @@ export function RichTextEditor({ content, onChange, placeholder = 'Tulis konten. variant="ghost" size="sm" onClick={() => editor.chain().focus().toggleItalic().run()} - className={editor.isActive('italic') ? 'bg-accent' : ''} + className={editor.isActive('italic') ? 'bg-primary text-primary-foreground' : ''} > @@ -467,7 +467,7 @@ export function RichTextEditor({ content, onChange, placeholder = 'Tulis konten. variant="ghost" size="sm" onClick={() => editor.chain().focus().toggleHeading({ level: 1 }).run()} - className={editor.isActive('heading', { level: 1 }) ? 'bg-accent' : ''} + className={editor.isActive('heading', { level: 1 }) ? 'bg-primary text-primary-foreground' : ''} > @@ -476,7 +476,7 @@ export function RichTextEditor({ content, onChange, placeholder = 'Tulis konten. variant="ghost" size="sm" onClick={() => editor.chain().focus().toggleHeading({ level: 2 }).run()} - className={editor.isActive('heading', { level: 2 }) ? 'bg-accent' : ''} + className={editor.isActive('heading', { level: 2 }) ? 'bg-primary text-primary-foreground' : ''} > @@ -485,7 +485,7 @@ export function RichTextEditor({ content, onChange, placeholder = 'Tulis konten. variant="ghost" size="sm" onClick={() => editor.chain().focus().toggleBulletList().run()} - className={editor.isActive('bulletList') ? 'bg-accent' : ''} + className={editor.isActive('bulletList') ? 'bg-primary text-primary-foreground' : ''} > @@ -494,7 +494,7 @@ export function RichTextEditor({ content, onChange, placeholder = 'Tulis konten. variant="ghost" size="sm" onClick={() => editor.chain().focus().toggleOrderedList().run()} - className={editor.isActive('orderedList') ? 'bg-accent' : ''} + className={editor.isActive('orderedList') ? 'bg-primary text-primary-foreground' : ''} > @@ -503,7 +503,7 @@ export function RichTextEditor({ content, onChange, placeholder = 'Tulis konten. variant="ghost" size="sm" onClick={() => editor.chain().focus().toggleBlockquote().run()} - className={editor.isActive('blockquote') ? 'bg-accent' : ''} + className={editor.isActive('blockquote') ? 'bg-primary text-primary-foreground' : ''} > @@ -512,7 +512,7 @@ export function RichTextEditor({ content, onChange, placeholder = 'Tulis konten. variant="ghost" size="sm" onClick={addLink} - className={editor.isActive('link') ? 'bg-accent' : ''} + className={editor.isActive('link') ? 'bg-primary text-primary-foreground' : ''} > @@ -626,9 +626,9 @@ export function RichTextEditor({ content, onChange, placeholder = 'Tulis konten.
-
{uploading && ( diff --git a/src/pages/ProductDetail.tsx b/src/pages/ProductDetail.tsx index 8bbbbdd..a0306e7 100644 --- a/src/pages/ProductDetail.tsx +++ b/src/pages/ProductDetail.tsx @@ -267,7 +267,7 @@ export default function ProductDetail() { Gabung Webinar - ) : Rekaman segera tersedia; + ) : Rekaman segera tersedia; case 'bootcamp': return (