-
-
Notifications
You must be signed in to change notification settings - Fork 59
[ FIXED ISSUE #198] Added Basic Editor Options and Fixed some minor changes #199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
@Stonebanks-js is attempting to deploy a commit to the Dhanush Nehru's projects Team on Vercel. A member of the Team first needs to authorize it. |
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds basic editor customization options to the code editor, allowing users to control line numbers visibility, word wrap behavior, and font size. The implementation provides a professional settings panel in the sidebar with immediate visual feedback for all changes.
- Added toggle switches for line numbers and word wrap functionality
- Implemented an interactive font size slider with range 12-20px
- Created a dedicated editor settings section with Material-UI components
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
src/pages/EditorComponent.js | Added state management for editor settings, event handlers, and UI controls in sidebar |
src/components/css/EditorComponent.css | Added styling for editor settings panel with dark mode support |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
@Stonebanks-js please resolve the issues |
@DhanushNehru I have resolved the issue kindly run the check, it is the connection failure in the vercel deployment but no error in my code, as the github copilot has sent me the notification "No Conflicts in the main branch " As the code is dependent on other pull requests and commiting changes maybe it will be resolved by itself Kindly merge it into the main and if you can tell me some changes to fix, mention them I will re run all the checks. I have attached the 3rd attempt of running the code and it shows no conflicts with main branch. |
@DhanushNehru This is to inform you that in my latest 2 commits, named as "Enhancements of Output panel" and "Resolved Linting Errors" I have resolved all the linting errors locally, the checks have no errors and the repository is also now synced correctly. also the 2nd commit resolves my issue number 200. if you want a 2nd pull request for issue 200 then kindly inform me, or else this pull request will resolved both the active issues Final Comment - there are no conflicts with the main branch. All the checks have passed CC - @DhanushNehru |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
const copyOutput = async () => { | ||
if (!output || output.length === 0) { | ||
enqueueSnackbar("No output to copy", { variant: "warning" }); | ||
return; | ||
} | ||
|
||
const outputText = Array.isArray(output) ? output.join("\n") : output.toString(); | ||
try { | ||
await navigator.clipboard.writeText(outputText); | ||
enqueueSnackbar("Output copied to clipboard!", { variant: "success" }); | ||
} catch (err) { | ||
// Fallback for browsers that don't support clipboard API | ||
const textArea = document.createElement("textarea"); | ||
textArea.value = outputText; | ||
document.body.appendChild(textArea); | ||
textArea.select(); | ||
try { | ||
document.execCommand("copy"); | ||
enqueueSnackbar("Output copied to clipboard!", { variant: "success" }); | ||
} catch (fallbackErr) { | ||
enqueueSnackbar("Failed to copy output", { variant: "error" }); | ||
} | ||
document.body.removeChild(textArea); | ||
} | ||
}; |
Copilot
AI
Oct 13, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fallback clipboard implementation uses the deprecated document.execCommand('copy'). Consider using the modern Clipboard API with proper feature detection or a clipboard library for better browser compatibility.
Copilot uses AI. Check for mistakes.
<div className="output-content"> | ||
{Array.isArray(output) && output.length > 0 ? ( | ||
output.map((result, i) => ( | ||
<div key={i} className="output-line">{result}</div> | ||
)) | ||
) : ( | ||
<div className="output-empty">No output yet. Run your code to see results!</div> | ||
)} | ||
</div> |
Copilot
AI
Oct 13, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using array index as key in the map function can cause rendering issues if the output array is modified. Consider using a more stable key if possible, or ensure the output array is only appended to.
Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <[email protected]>
Description
This PR implements basic editor customization options that are commonly expected in modern code editors. Users can now control line numbers visibility, word wrap behavior, and font size directly from the sidebar.
🎯 Issue Resolved #198
Issue: Add Basic Editor Options: Line Numbers, Word Wrap, and Font Size Controls
✨ Features Added
1. Line Numbers Toggle
2. Word Wrap Toggle
3. Font Size Control
4. Professional UI Design
🔧 Technical Implementation
Files Modified
1.
src/pages/EditorComponent.js
Changes:
FormControlLabel
,Switch
,Typography
,Slider
2.
src/components/css/EditorComponent.css
Changes:
.editor-settings
- Main container styling.editor-settings-title
- Section title styling.editor-settings-control
- Individual control styling.editor-settings-slider
- Slider container stylingCode Quality
🧪 Testing
Manual Testing Completed
Device Testing
🎨 UI/UX Improvements
Before
After
Metrics
Optimization
👥 Reviewers
Suggested Reviewers:
Review Focus Areas:
📝 Additional Notes
Why This Enhancement?
This enhancement addresses a common user request for basic editor customization. Modern code editors like VS Code, Sublime Text, and others provide these fundamental options, making them expected by users.
User Impact
Technical Debt
No technical debt introduced. The implementation follows React best practices and integrates seamlessly with existing codebase patterns.
Ready for Review ✅
This PR is ready for code review and testing. All acceptance criteria have been met, and the implementation is complete and functional.
CC - @DhanushNehru The PR is ready for review and has no conflicts with the main branch, Kindly add the Hacktoberfest2025 related labels,
Signature of Author - @Stonebanks-js