Skip to content
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

Make UI vscode styled and refactor webview js #730

Merged
merged 11 commits into from
Dec 17, 2024

Conversation

GrahamSH-LLK
Copy link
Contributor

@GrahamSH-LLK GrahamSH-LLK commented Dec 9, 2024

  • Restyles UI to fit in with vscode
    image
  • Refactors the webview js
    • Previously, this used innerHTML to create the content and created eventListeners in another function based on DOM attributes. This refactors to create through document.createElement, giving access to the elements on creation so eventListeners can be created there (and version info captured). This also means that a malicious (or just broken?) vendordep can't inject any html into the sidebar and break it
  • Removes vestigial stuff from the original dep view PR
    • There were some unused CSS files and noop commands from the example extension I assume this was built on.

TODO: figure out how to make the deps bundled (probably requires bundling main.js too?) done

Copy link

@Gold856 Gold856 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor formatting thing: I looked through the repo and determined this set of Prettier settings is the most consistent with the existing code. I'm considering doing a formatting job, so for consistency, these are the formatting settings you should use.

{
    "singleQuote": true,
    "endOfLine": "crlf",
    "trailingComma": "es5"
}

@jasondaming
Copy link
Member

Can you explain more what you are trying to do with "figure out how to make the deps bundled"?

@GrahamSH-LLK
Copy link
Contributor Author

Can you explain more what you are trying to do with "figure out how to make the deps bundled"?

node_modules don’t exist in the built vsix, so the way I’m importing vscode-elements currently (uri from there) won’t work. I think I can get webpack to load the dependencies I need using raw-loader and inline as a script element. I’m open to other ideas, though!

@GrahamSH-LLK GrahamSH-LLK requested a review from Gold856 December 10, 2024 15:54
Copy link

@Gold856 Gold856 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@PeterJohnson
Copy link
Member

Needs conflicts resolved.

@GrahamSH-LLK
Copy link
Contributor Author

Needs conflicts resolved.

Done!

@PeterJohnson
Copy link
Member

Build is failing

@PeterJohnson PeterJohnson merged commit b9ceadd into wpilibsuite:main Dec 17, 2024
6 checks passed
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.

5 participants