Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
## Description
<!-- Provide a clear and concise description of your changes -->

## Type of Change
<!-- Mark the appropriate option with an [x] -->
- [ ] Bug fix
- [ ] New feature
- [ ] Enhancement
- [ ] Documentation update
- [ ] Other (please describe)

## Validation Checklist
<!-- Confirm that you have completed these checks -->
- [ ] I have run `npm run validate-pr` and all checks passed
- [ ] I have added/updated tests for my changes
- [ ] I have updated relevant documentation
- [ ] I have tested edge cases and error scenarios
- [ ] My code follows the project's coding standards and TypeScript strict mode guidelines

## Testing Steps
<!-- Provide steps to test your changes -->
1.
2.
3.

## Related Issues
<!-- Link any related issues using #issue_number -->

## Additional Notes
<!-- Add any other context about the PR here -->
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
"watch-extensions": "node --max-old-space-size=8192 ./node_modules/gulp/bin/gulp.js watch-extensions watch-extension-media",
"watch-extensionsd": "deemon npm run watch-extensions",
"kill-watch-extensionsd": "deemon --kill npm run watch-extensions",
"precommit": "node build/hygiene.js",
"precommit": "npm run validate-pr",
"validate-pr": "bash ./scripts/validate-pr.sh",
"gulp": "node --max-old-space-size=8192 ./node_modules/gulp/bin/gulp.js",
"electron": "node build/lib/electron",
"7z": "7z",
Expand Down Expand Up @@ -237,4 +238,4 @@
"optionalDependencies": {
"windows-foreground-love": "0.5.0"
}
}
}
32 changes: 32 additions & 0 deletions scripts/validate-pr.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash
set -e

# Run TypeScript checks
echo "Running TypeScript checks..."
npm run monaco-compile-check
npm run tsec-compile-check
npm run vscode-dts-compile-check

# Run linting
echo "Running linting checks..."
npm run eslint
npm run stylelint

# Run tests
echo "Running tests..."
npm run test-node
npm run test-browser

# Run smoke tests
echo "Running smoke tests..."
npm run smoketest

# Run layer validation
echo "Running layer validation..."
npm run valid-layers-check

# Run hygiene checks
echo "Running hygiene checks..."
npm run hygiene

echo "All checks passed successfully!"
9 changes: 6 additions & 3 deletions src/tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@
"noUnusedLocals": true,
"allowUnreachableCode": false,
"strict": true,
"exactOptionalPropertyTypes": false,
"useUnknownInCatchVariables": false,
"exactOptionalPropertyTypes": true,
"useUnknownInCatchVariables": true,
"noUncheckedIndexedAccess": true,
"noImplicitAny": true,
"noFallthroughCasesInSwitch": true,
"forceConsistentCasingInFileNames": true,
"target": "es2022",
"useDefineForClassFields": false,
Expand All @@ -22,4 +25,4 @@
],
"allowSyntheticDefaultImports": true
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,12 @@ export class AuxiliaryWindow extends BaseWindow implements IAuxiliaryWindow {

this._register(addDisposableListener(this.window, EventType.RESIZE, () => this.layout()));

this._register(addDisposableListener(this.container, EventType.SCROLL, () => this.container.scrollTop = 0)); // Prevent container from scrolling (#55456)
this._register(addDisposableListener(this.container, EventType.SCROLL, (e: Event) => {
// Only prevent scrolling if it's not from a user interaction or programmatic scroll
if (!e.isTrusted || !this.container.contains(document.activeElement)) {
this.container.scrollTop = 0;
}
})); // Prevent unwanted automatic scrolling while allowing user interaction (#55456)

if (isWeb) {
this._register(addDisposableListener(this.container, EventType.DROP, e => EventHelper.stop(e, true))); // Prevent default navigation on drop
Expand Down Expand Up @@ -525,4 +530,4 @@ export class BrowserAuxiliaryWindowService extends Disposable implements IAuxili
}
}

registerSingleton(IAuxiliaryWindowService, BrowserAuxiliaryWindowService, InstantiationType.Delayed);
registerSingleton(IAuxiliaryWindowService, BrowserAuxiliaryWindowService, InstantiationType.Delayed);