Skip to content

feat: add font size control to increase/decrease editor font size#145

Open
devendra-w wants to merge 2 commits into
Debmallya-03:mainfrom
devendra-w:feat/font-size-control
Open

feat: add font size control to increase/decrease editor font size#145
devendra-w wants to merge 2 commits into
Debmallya-03:mainfrom
devendra-w:feat/font-size-control

Conversation

@devendra-w
Copy link
Copy Markdown
Contributor

@devendra-w devendra-w commented May 27, 2026

Summary

Adds a font size control (− and + buttons) to the toolbar that lets users increase or decrease the Monaco editor font size. The preference is persisted in localStorage.

Closes #142

Type of Change

  • New feature

Changes Made

  • Added fontSize state to app/page.tsx initialized to 14px
  • Added useEffect to load saved font size from localStorage on mount
  • Added font size control UI (− size +) to the toolbar between Download and theme toggle
  • Passed fontSize prop to all 6 MonacoEditor instances
  • Added fontSize prop to MonacoEditorProps interface in app/components/monaco-editor.tsx
  • Added useEffect in monaco-editor.tsx to call editor.updateOptions({ fontSize }) when prop changes

How to Test

  1. Run npm install and npm run dev
  2. Navigate to http://localhost:3000
  3. Click + in the toolbar - verify editor font size increases
  4. Click - verify font size decreases
  5. Refresh the page - verify font size is remembered

Screenshots

image

Checklist

  • Linked issue in summary
  • Self-reviewed the diff
  • Added/updated tests if applicable

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 27, 2026

@devendra-w is attempting to deploy a commit to the debmallya-03's projects Team on Vercel.

A member of the Team first needs to authorize it.

@netlify
Copy link
Copy Markdown

netlify Bot commented May 27, 2026

Deploy Preview for webifynet failed. Why did it fail? →

Name Link
🔨 Latest commit eae37c9
🔍 Latest deploy log https://app.netlify.com/projects/webifynet/deploys/6a1698139fd86e0008f92ced

@devendra-w
Copy link
Copy Markdown
Contributor Author

Hi @Debmallya-03 ! I've resolved the merge conflicts. All changes are in place font size control with localStorage persistence, passed to all Monaco editor instances. Ready for review!

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.

[FEAT] Add font size control to increase/decrease editor font size

1 participant