Skip to content

Commit

Permalink
Reenable inline comment webview split diff view, fix styling
Browse files Browse the repository at this point in the history
Summary:
The inline comment webview's diff view was previous disabled due to build issues it caused. This stack has fixed all those issues, so we can reenable this now.

While at it, let's fix up a few things:
- simplify files
- add root css file, import correct css file in htmlForWebview
- use stylex declaration in css for production builds to work
- fix build issue not adding the inline webview as an input

Differential Revision: D64488795

fbshipit-source-id: b7748b9a3dbdf000504aa58f0939ad948f80c8b2
  • Loading branch information
evangrayk authored and facebook-github-bot committed Oct 17, 2024
1 parent afcd85b commit df3916c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion addons/vscode/inlineCommentWebview.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
<div id="root"></div>
<script
type="module"
src="/extension/facebook/comments/webview/InlineCommentEntrypoint.tsx"></script>
src="/extension/facebook/comments/webview/inlineCommentWebview.tsx"></script>
</body>
</html>
4 changes: 3 additions & 1 deletion addons/vscode/vite.config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@ const isInternal = existsSync(path.resolve(__dirname, 'facebook/README.facebook.
const input = [normalizeInputPath('webview.html')];
if (isInternal) {
// Currently, the inline comment webview is not used in OSS
normalizeInputPath('inlineCommentWebview.html');
input.push(normalizeInputPath('inlineCommentWebview.html'));
}

console.log(isInternal ? 'Building internal version' : 'Building OSS version');

// vite-plugin-stylex doesn't support renaming the output CSS file, so we have to do that ourselves.
function moveStylexFilenamePlugin(): Plugin {
return {
Expand Down

0 comments on commit df3916c

Please sign in to comment.