Skip to content

Add CSS and Icons for Code/Quote Blocks - #124

Merged
malibio merged 2 commits into
mainfrom
feature/issue-118-code-quote-block-css
Sep 26, 2025
Merged

malibio merged 2 commits into
mainfrom
feature/issue-118-code-quote-block-css

Conversation

@malibio

@malibio malibio commented Sep 26, 2025

Copy link
Copy Markdown
Collaborator

Closes #118

malibio and others added 2 commits September 26, 2025 07:31
- Document complete requirements in contenteditable-implementation.md
- Create step-by-step implementation guide for 6 GitHub issues
- Include code examples, testing guidelines, and acceptance criteria

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
#118)

## Summary
Added comprehensive support for code blocks (```) and quote blocks (>) as
text node variants with proper focus/blur behavior, syntax visibility,
and design system compliance.

## Changes
- **CSS & Icons**: Added extended markdown styling with proper containers,
  backgrounds, and accent bars matching design patterns
- **Focus/Blur Logic**: Implemented dual-representation editing with
  syntax markers visible when focused, hidden when blurred
- **Content Processing**: Enhanced ContentEditableController with block
  detection, rendering, and content reconstruction methods
- **Demo Content**: Added sample nodes showcasing both code and quote blocks
- **UI Improvements**: Fixed scrolling, padding, and bottom spacing issues

## Key Features
- Code blocks: Full-width containers with monospace font and gray backgrounds
- Quote blocks: Blue accent bars with italic text and proper line spacing
- All-or-nothing principle: Nodes contain pure text, pure code, or pure quotes
- Proper syntax marker management during focus/blur transitions
- Design system compliance with correct padding and spacing

## Technical Implementation
- Extended markdown block detection via content pattern matching
- CSS-based styling with focus/blur state management
- Content extraction and reconstruction preserving markdown syntax
- Enhanced text processing with line break preservation
- Responsive design with proper scrolling and visibility

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
@malibio
malibio merged commit 8dd87ee into main Sep 26, 2025
@malibio
malibio deleted the feature/issue-118-code-quote-block-css branch September 26, 2025 08:04
malibio added a commit that referenced this pull request Sep 26, 2025
## Summary
Added comprehensive visual documentation for the new extended markdown
blocks feature (code blocks and quote blocks) to the design system patterns.

## Changes
- **Visual Examples**: Added live examples of code and quote blocks with
  proper styling and formatting
- **CSS Patterns**: Documented the styling approach with accent bars,
  backgrounds, and typography
- **Icon System**: Added square icons with {} for code blocks and " for quotes
- **Behavior Documentation**: Explained all-or-nothing principle and
  focus/blur syntax behavior
- **Implementation Guide**: Clear visual reference for developers

## Documentation Includes
- Code block examples (JavaScript and CSS)
- Quote block examples (single and multi-line)
- Icon specifications and styling
- Accessibility and behavior notes
- Complete CSS implementation patterns

This complements the PR #124 implementation with comprehensive design
system documentation for the extended markdown blocks feature.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
malibio added a commit that referenced this pull request Sep 26, 2025
* Add extended markdown blocks documentation to design patterns

## Summary
Added comprehensive visual documentation for the new extended markdown
blocks feature (code blocks and quote blocks) to the design system patterns.

## Changes
- **Visual Examples**: Added live examples of code and quote blocks with
  proper styling and formatting
- **CSS Patterns**: Documented the styling approach with accent bars,
  backgrounds, and typography
- **Icon System**: Added square icons with {} for code blocks and " for quotes
- **Behavior Documentation**: Explained all-or-nothing principle and
  focus/blur syntax behavior
- **Implementation Guide**: Clear visual reference for developers

## Documentation Includes
- Code block examples (JavaScript and CSS)
- Quote block examples (single and multi-line)
- Icon specifications and styling
- Accessibility and behavior notes
- Complete CSS implementation patterns

This complements the PR #124 implementation with comprehensive design
system documentation for the extended markdown blocks feature.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>

* Refactor node architecture for consistent naming conventions

- Rename TextNodeViewer → TextNode (node wrapper)
- Rename DateNodeViewer → DateNode (node wrapper)
- Rename DatePageViewer → DateNodeViewer (viewer wrapper)
- Update all imports and references across codebase
- Remove legacy TextNode wrapper component
- Update CSS class names and component comments
- Establish clear architectural pattern:
  * *Node = wraps BaseNode
  * *NodeViewer = wraps BaseNodeViewer

All type checks pass with 0 errors/warnings.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>

---------

Co-authored-by: Claude <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add CSS and Icons for Code/Quote Blocks

1 participant