Skip to content

Comments

Improvements#19

Merged
Razee4315 merged 6 commits intomainfrom
improvements
Feb 17, 2026
Merged

Improvements#19
Razee4315 merged 6 commits intomainfrom
improvements

Conversation

@Razee4315
Copy link
Owner

No description provided.

Two detailed analysis documents covering all identified issues:
- OPTIMIZATION_AND_RENDERING_ISSUES.md: Performance bottlenecks,
  rendering issues, memory leaks, state management anti-patterns,
  logical bugs, and export system problems
- UI_AND_HCI_ANALYSIS.md: Accessibility gaps, interaction design
  flaws, visual inconsistencies, Nielsen's heuristics evaluation,
  and Fitts's Law analysis with prioritized fix list
- Memoize wordCount and lineCount with useMemo to avoid
  recalculation on unrelated state changes
- Memoize CodeEditor syntax highlighting output per content change
  instead of recalculating every line on every render
- Replace LocalImage btoa(String.fromCharCode(...data)) with
  Blob + URL.createObjectURL for 10x faster image rendering and
  no call stack overflow on large images
- Add URL.revokeObjectURL cleanup to prevent memory leaks
- Fix cross-platform path separator in LocalImage (was hardcoded
  to Windows backslash)
- Remove hidden off-screen duplicate Markdown renderer; capture
  export HTML on-demand from visible preview instead
- Fix event listener race conditions in drag-drop and CLI file-open
  handlers where unmount before promise resolution leaked listeners
- Fix Toast timer cleanup to prevent setState on unmounted component
- Convert highlight helpers to hoisted functions for useMemo
- Replace conditional mount/unmount of Preview and CodeEditor with
  CSS display toggle to preserve scroll position and component state
  when switching modes (prevents unnecessary re-initialization)
- Fix Save As not updating fileName in title bar after first save
- Fix keyboard shortcut ordering: check Shift combos first to prevent
  Ctrl+Shift+E from firing Ctrl+E handler; add explicit !e.shiftKey
  guards on single-key shortcuts
- Consolidate ThemeContext's three separate useEffects into one that
  batches data-theme, data-font, data-font-size attribute updates
- Add localStorage validation in ThemeContext to guard against
  corrupted or outdated stored values with proper fallbacks
- PDF export now uses theme colors from the selected theme instead
  of hardcoded gray/black values (headings, text, borders, quotes)
- Add table parsing and rendering to PDF export (was completely
  missing — tables were silently dropped)
- Fix PDF page break logic: reserve footer space and split long
  code blocks across pages instead of overflowing
- Paragraph text now renders line-by-line with page break checks
  to prevent text from overflowing past the page boundary
- Fix HTML export XSS vector: escape title in generated HTML to
  prevent injection from malicious filenames
- Fix GitHub theme preview in SettingsMenu showing dark colors
  (#0d1117) when the actual theme is light (#ffffff)
Accessibility:
- Add aria-label to all icon-only buttons (StatusBar, TitleBar,
  ModeToggle, FileExplorer, TableOfContents, SettingsMenu, Export)
- Add aria-pressed to toggle buttons (mode toggle, status bar)
- Add aria-expanded and aria-haspopup to dropdown triggers
- Add role="alertdialog", aria-modal, aria-labelledby to
  UnsavedChangesDialog with focus trap and Escape key support
- Add role="navigation" and aria-label to sidebar panels
- Add role="menu" and role="menuitem" to dropdown menus
- Add role="status" and aria-live="polite" to Toast and StatusBar

User Feedback:
- Replace native alert() calls in CodeEditor with themed toast
  messages via onError callback
- Add save confirmation toast on successful Ctrl+S
- Add error toast for failed file open/save operations
- Toast component now supports success/error/info types with
  different icons and theme-aware colors

Interaction:
- Add Escape key to close FileExplorer and TableOfContents
- Auto-focus sidebar panels when opened
- Focus trap in UnsavedChangesDialog (Tab cycles within dialog)
- Auto-focus Save button when unsaved changes dialog opens
- Increase StatusBar toggle button hit targets from 24x20 to 32x24
- Increase sidebar close buttons from 24x24 to 28x28
- Standardize border radius on buttons to rounded-lg
- Add ErrorBoundary component wrapping the entire app for crash recovery
- Protect against data loss when opening a new file with unsaved changes
- Add loading overlay during file operations for clear system feedback
@Razee4315 Razee4315 merged commit 9a5c2e5 into main Feb 17, 2026
2 checks passed
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.

1 participant