-
Notifications
You must be signed in to change notification settings - Fork 220
Fix TypeScript type errors in VSCode Elements event handlers and refs #4264
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: copilot/fix-github-actions-workflow-again
Are you sure you want to change the base?
Fix TypeScript type errors in VSCode Elements event handlers and refs #4264
Conversation
Co-authored-by: d10c <[email protected]>
Co-authored-by: d10c <[email protected]>
Co-authored-by: d10c <[email protected]>
| })} | ||
| </Button> | ||
| <Button | ||
| appearance="primary" |
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.
@copilot Why was this line deleted? Is there another attribute that would be equivalent, such as <Button primary .../>?
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 appearance attribute is not supported by VscodeButton in @vscode-elements v0.9.0. The button has primary appearance by default. To make it secondary, you add the secondary boolean attribute. Since this button doesn't have secondary, it already has the primary appearance. No changes needed - the fix in commit 42b1cb7 is correct.
|
@copilot There appear to be test failures and |
I've investigated the test results: View tests: All 39 test suites pass (364 tests passed, 2 skipped). ✅ Console errors: The warnings are pre-existing issues unrelated to my changes:
I verified these same console.error warnings exist on the base commit (ad70ecd) before my changes. None of the files with warnings were modified by my TypeScript type fixes. Vscode-integration tests: Fail due to network connectivity issues (ENOTFOUND update.code.visualstudio.com) in the test environment, not related to code changes. My changes only fixed TypeScript event handler and ref types, which don't affect the runtime behavior that causes these pre-existing HTML validation warnings. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
TypeScript compilation was failing due to type mismatches between React synthetic events and native DOM events expected by
@vscode-elements/[email protected].Changes
Event handler type corrections (7 files):
ChangeEvent<T>andInputEventto nativeEventtype in:CodeFlowsDropdown.tsx,ModelTypeTextbox.tsx(also fixed HTMLSelectElement → HTMLInputElement cast)RepoRow.tsx,ModelAlertsSort.tsx,RepositoriesFilter.tsx,RepositoriesResultFormat.tsx,RepositoriesSort.tsxRef type corrections (3 files):
React.Ref<HTMLElement | undefined>→React.Ref<HTMLDivElement>in:DataGrid.tsx(DataGridRow and DataGridCell components)MethodRow.tsx(ModelableMethodRow, UnmodelableMethodRow, and parent useRef)Component prop fixes (2 files):
$sizeprop optional inTextButton.tsxstyled componentappearanceprop fromVscodeButtoninVariantAnalysisActions.tsxWarning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
https://api.github.com/repos/github/vscode-codeql/actions/runs/21145906696/jobs/usr/bin/curl curl -s -H Authorization: Bearer REDACTED tsc --noEmit(http block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.