Skip to content

Commit dadd3b3

Browse files
committed
Configure the code editor such that the user will only able to
scroll till the last line
1 parent 9e1e1c2 commit dadd3b3

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

ai/usage-log.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,30 @@ Request to create a simple client-side auth guard that prevents browser back nav
392392
- UX improvements: immediate redirect prevents brief flash of protected content
393393
- Maintainability: simple, reusable component for future auth requirements
394394

395+
396+
## Entry 13
397+
398+
# Date/Time:
399+
2025-09-19 19:00
400+
401+
# Tool:
402+
Gemini (Tried to google the answer online and Google's AI overview mentioned the recommendations)
403+
404+
# Prompt/Command:
405+
Ask on how to disable scrollbar and to not create additional empty spaces when there is still sufficient space to enter code.
406+
407+
# Output Summary:
408+
- Explain that Monaco Editor has a field called "scrollBeyondLastLine" that when disabled will cause the scrollbar to scroll only till the last line.
409+
410+
# Action Taken:
411+
- [X] Accepted as-is
412+
- [ ] Modified
413+
- [ ] Rejected
414+
415+
# Author Notes:
416+
- Add the field "scrollBeyondLastLine" and set it to false in the Monaco Editor configuration
417+
- Tested the UI and found that the scrollbar will not appear if there is sufficient space for code to be entered. If code entered has exceeded the maximum container height, the scrollbar will only allow the user to scroll till the last line.
418+
395419
---
396420

397421

frontend/src/app/components/collab/CodingComponent.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ export default function CodingComponent() {
6363
theme="vs-dark"
6464
language={selectedLanguage.toLowerCase()}
6565
onChange={(value) => setInitialContent(value)}
66+
options={{scrollBeyondLastLine: false}}
6667
></Editor>
6768
</div>
6869
);

0 commit comments

Comments
 (0)