Skip to content

feat(apollo-react): add formatting toolbar to sticky notes#423

Closed
david-rios-uipath wants to merge 1 commit intomainfrom
feat/sticky-note-formatting-toolbar
Closed

feat(apollo-react): add formatting toolbar to sticky notes#423
david-rios-uipath wants to merge 1 commit intomainfrom
feat/sticky-note-formatting-toolbar

Conversation

@david-rios-uipath
Copy link
Copy Markdown
Contributor

@david-rios-uipath david-rios-uipath commented Mar 30, 2026

Summary

Adds an opinionated markdown editor UI for sticky notes.

It supports bold, italic, strikethrough, bullet lists, and numbered lists.

Interaction modes:

  • Toolbar
  • Keyboard
image
2026-03-30.17.37.18.mp4

Changes

  • FormattingToolbar component — toolbar with icon buttons for bold, italic, strikethrough, bullet list, and numbered list
  • Keyboard shortcuts — Cmd+B (bold), Cmd+I (italic), Cmd+Shift+X (strikethrough)
  • Smart toggle — clicking a format button when cursor is inside a formatted region removes the markers instead of inserting redundant ones
  • Bold+italic detection — correctly detects and toggles ***combined*** markers in toolbar state
  • List-aware formatting — applies inline formatting per-line in lists, protecting - and N. prefixes from being wrapped
  • Enter key list continuation — auto-inserts next bullet/number on Enter; exits list on empty item
  • Line-scoped detection — format detection respects line boundaries to prevent cross-line false positives
  • Double-click guard — prevents toolbar double-clicks from selecting all textarea content
  • Toolbar styling — adjusted spacing and padding for editing mode

Flow

flowchart TD
    A[User action: click toolbar / keyboard shortcut] --> B{Has selection?}
    B -->|No| C{Cursor inside formatted region?}
    C -->|Yes| D[Remove surrounding markers]
    C -->|No| E{On list line?}
    E -->|Yes| F[Wrap line content after prefix]
    E -->|No| G[Insert empty markers at cursor]
    B -->|Yes| H{Multi-line with list items?}
    H -->|Yes| I[Apply formatting per-line, protect prefixes]
    H -->|No| J[Wrap/unwrap selection]
    D --> K[Update activeFormats + set cursor via rAF]
    F --> K
    G --> K
    I --> K
    J --> K
Loading

Testing

  • pnpm run test passes (67 suites, 1344 tests)
  • pnpm run typecheck passes
  • pnpm run lint passes
  • Manual testing performed
  • Unit tests added (61 tests for markdownFormatting, 10 for FormattingToolbar component)

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 30, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (PT)
apollo-canvas 🟢 Ready Preview, Logs Mar 30, 2026, 02:55:39 PM
apollo-landing 🟢 Ready Preview, Logs Mar 30, 2026, 02:53:02 PM
apollo-ui-react 🟢 Ready Preview, Logs Mar 30, 2026, 02:54:32 PM
apollo-vertex 🟢 Ready Preview, Logs Mar 30, 2026, 02:54:03 PM
apollo-wind 🟢 Ready Preview, Logs Mar 30, 2026, 02:53:11 PM

@david-rios-uipath david-rios-uipath marked this pull request as draft March 30, 2026 19:49
@github-actions github-actions bot added the size:XXL 1,000+ changed lines. label Mar 30, 2026
@github-actions
Copy link
Copy Markdown

Dependency License Review

  • 1924 package(s) scanned
  • ✅ No license issues found
  • ⚠️ 3 package(s) excluded (see details below)
License distribution
License Packages
MIT 1689
ISC 89
Apache-2.0 56
BSD-3-Clause 28
BSD-2-Clause 23
BlueOak-1.0.0 8
MPL-2.0 5
MIT OR Apache-2.0 3
MIT-0 3
CC0-1.0 3
LGPL-3.0-or-later 2
(MIT OR Apache-2.0) 2
Unlicense 2
Python-2.0 1
CC-BY-4.0 1
(MPL-2.0 OR Apache-2.0) 1
Unknown 1
Artistic-2.0 1
(WTFPL OR MIT) 1
(BSD-2-Clause OR MIT OR Apache-2.0) 1
CC-BY-3.0 1
0BSD 1
(MIT OR CC0-1.0) 1
MIT AND ISC 1
Excluded packages
Package Version License Reason
@img/sharp-libvips-linux-x64 1.2.4 LGPL-3.0-or-later LGPL pre-built binary, not linked
@img/sharp-libvips-linuxmusl-x64 1.2.4 LGPL-3.0-or-later LGPL pre-built binary, not linked
khroma 2.1.0 Unknown MIT per GitHub repo, missing license field in package.json

@david-rios-uipath david-rios-uipath force-pushed the feat/sticky-note-formatting-toolbar branch 5 times, most recently from e99d2ea to 9d21596 Compare March 30, 2026 21:51
Add formatting toolbar to sticky notes with inline markdown editing.

- FormattingToolbar component with bold, italic, strikethrough, bullet
  list, and numbered list buttons with ApTooltip
- Keyboard shortcuts (Cmd+B, Cmd+I, Cmd+Shift+X)
- Smart toggle: detects when cursor is inside formatted region and
  removes markers on toggle (no selection required)
- Bold+italic combined marker (***) detection for toolbar state
- List-aware formatting: protects bullet/number prefixes when applying
  inline formatting to list items
- Enter key continues bullet and numbered lists with auto-increment;
  empty item exits the list
- Format detection respects line boundaries (no cross-line false positives)
- Split markdown formatting into markdown-formatting/ module
@david-rios-uipath david-rios-uipath force-pushed the feat/sticky-note-formatting-toolbar branch from 9d21596 to 3bd3187 Compare March 30, 2026 21:51
@david-rios-uipath
Copy link
Copy Markdown
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL 1,000+ changed lines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant