-
Notifications
You must be signed in to change notification settings - Fork 11
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
d2-vscode-extension #11
Conversation
exciting, looking forward to test driving it! (feel free to add me to reviewer when it's rdy) |
@alixander It’s as ready as it’ll ever be. Only prerequisite needed is to have d2 on your path. |
Added context menus everywhere it made sense and changed temp file deletion to be more deterministic.
If I can make a change to the d2 executable to not launch the browser when in watch mode (e.g. --nobrowser switch), I can change the extension to connect to the localhost and display the result. Although that might be a cleaner solution, it doesn't allow for multiple input files without additional work (my kludge/solution does allow for this). |
@BarryNolte |
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.
Auto generated spew, no use for it once the project is setup and working. Co-authored-by: gavin-ts <85081687+gavin-ts@users.noreply.github.com>
This is why I bought one of the first commercially available spell checkers, so I could graduate college. Co-authored-by: gavin-ts <85081687+gavin-ts@users.noreply.github.com>
Co-authored-by: gavin-ts <85081687+gavin-ts@users.noreply.github.com>
Co-authored-by: gavin-ts <85081687+gavin-ts@users.noreply.github.com>
Co-authored-by: gavin-ts <85081687+gavin-ts@users.noreply.github.com>
Setup eslint and fixed errors and warnings. Made "fit" as the default on load Changed update timer code to be simpler Changed preview HTML to load from disk
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.
Co-authored-by: gavin-ts <85081687+gavin-ts@users.noreply.github.com>
Co-authored-by: gavin-ts <85081687+gavin-ts@users.noreply.github.com>
Co-authored-by: gavin-ts <85081687+gavin-ts@users.noreply.github.com>
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.
I think it should be good to merge with these changes
Also noting for a follow up, I think we will want to change the d2 call to be async since it can cause typing in the .d2 file to lag on larger layouts
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.
nice! it is very nice to have the preview window with render right there while editing .d2 files 🚀
@BarryNolte this looks great, i think this is ready to merge, just wanted to double check with you it's set? |
Yes, please. PR #16 has more features, some bug fixes and few better ways of doing things as I figured them out. After that PR is merged, then we can drill down on bugs/features/enhancements with more targeted and smaller PR's. |
@BarryNolte could you sign the commits please? I have it turned on as a branch protection org-wide. terrastruct/d2#557 (comment) |
First PR creating the viewer for d2 files in VsCode. d2-vscode-extension Added wrapper around displayed SVG tag to allow for zooming and fitting to screen. Revert "d2-vscode-extension" This reverts commit 55049ca. Revert "Revert "d2-vscode-extension"" This reverts commit d189451. Added context menus and code cleanup Added context menus everywhere it made sense and changed temp file deletion to be more deterministic. Update tsconfig.json Auto generated spew, no use for it once the project is setup and working. Co-authored-by: gavin-ts <85081687+gavin-ts@users.noreply.github.com> Update src/refreshTimer.ts This is why I bought one of the first commercially available spell checkers, so I could graduate college. Co-authored-by: gavin-ts <85081687+gavin-ts@users.noreply.github.com> Update src/docToPreviewGenerator.ts Co-authored-by: gavin-ts <85081687+gavin-ts@users.noreply.github.com> Update src/browserWindow.ts Co-authored-by: gavin-ts <85081687+gavin-ts@users.noreply.github.com> Update src/browserWindow.ts Co-authored-by: gavin-ts <85081687+gavin-ts@users.noreply.github.com> Changes from Review Setup eslint and fixed errors and warnings. Made "fit" as the default on load Changed update timer code to be simpler Changed preview HTML to load from disk Updated branding Update package.json Co-authored-by: gavin-ts <85081687+gavin-ts@users.noreply.github.com> Update package.json Co-authored-by: gavin-ts <85081687+gavin-ts@users.noreply.github.com>
Co-authored-by: gavin-ts <85081687+gavin-ts@users.noreply.github.com>
I tried, but failed to get all commits signed. Couldn't get beyond the latest commit being signed. |
@BarryNolte looks like it's been set up then, can you rewrite the commits? https://superuser.com/a/1123928 (except replace |
First PR creating the viewer for d2 files in VsCode. d2-vscode-extension Added wrapper around displayed SVG tag to allow for zooming and fitting to screen. Revert "d2-vscode-extension" This reverts commit 55049ca. Revert "Revert "d2-vscode-extension"" This reverts commit d189451. Added context menus and code cleanup Added context menus everywhere it made sense and changed temp file deletion to be more deterministic. Update tsconfig.json Auto generated spew, no use for it once the project is setup and working. Co-authored-by: gavin-ts <85081687+gavin-ts@users.noreply.github.com> Update src/refreshTimer.ts This is why I bought one of the first commercially available spell checkers, so I could graduate college. Co-authored-by: gavin-ts <85081687+gavin-ts@users.noreply.github.com> Update src/docToPreviewGenerator.ts Co-authored-by: gavin-ts <85081687+gavin-ts@users.noreply.github.com> Update src/browserWindow.ts Co-authored-by: gavin-ts <85081687+gavin-ts@users.noreply.github.com> Update src/browserWindow.ts Co-authored-by: gavin-ts <85081687+gavin-ts@users.noreply.github.com> Changes from Review Setup eslint and fixed errors and warnings. Made "fit" as the default on load Changed update timer code to be simpler Changed preview HTML to load from disk Updated branding Update package.json Co-authored-by: gavin-ts <85081687+gavin-ts@users.noreply.github.com> Update package.json Co-authored-by: gavin-ts <85081687+gavin-ts@users.noreply.github.com>
Added wrapper around displayed SVG tag to allow for zooming and fitting to screen.
This reverts commit 55049ca.
This reverts commit d189451.
Added context menus everywhere it made sense and changed temp file deletion to be more deterministic.
Setup eslint and fixed errors and warnings. Made "fit" as the default on load Changed update timer code to be simpler Changed preview HTML to load from disk
@alixander - I was able to partially get commits verified, but not all of them. I had found that article you suggested and thought it would be unpleasant to use that technique, and it was. Suggestion: Create another PR with one signed commit that's the same as the last commit on this PR. Merge it, and abandon this one. I'll do the same for my other PR and then continue to sign each commit to avoid this in the future. |
yeah that'd work! @BarryNolte |
Wow, that should have been easier... See PR #19 After that's merged, we can pull the plug on this PR. |
sorry about the hoops @BarryNolte , ty for bearing with that, really excited to be merging all this for users (looks like the extension has been downloaded over 3k times now) |
I've had worse hoops 😄 I probably should have been signing my commits years ago. Lesson learned and my love/hate relationship with git continues. On to the next PR... |
First PR creating the viewer for d2 files in VsCode.
#4 - For Reference
Fixes:
#9 and #13