-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
cody: cleanup the design of the VSCode History view #51246
Conversation
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 🚀
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 love it! Awesome design Tim!! (also tysm to much for cleaning up that CSS and putting it in a module 🙏)
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.
Apart from the overflow issues as mentioned, I really like the new design, def much better than what we have now!
} | ||
|
||
return ( | ||
<VSCodeButton |
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.
We replaced VSCodeButton with div originally because of an UI glitch that caused a weird line to show up when the button is wider than 300px.
Edit: fixed a typo. Want to add that the recipe page also have the same problem so this is not a request for change on this issue, just wanted to provide some background info 😂
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.
Here is a screenshot that shows the weird line in each buttons as reported previously in #50960 :
margin: 0 1rem; | ||
display: flex; | ||
gap: 1rem; | ||
flex-direction: column; |
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.
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.
Ooh good catch! Thanks @abeatrix. I've just updated it back to using our own <button>
(styling the shadow root element is impossible), and fixed recipe buttons while I was there.
I couldn't replicate the wrapping problem though. Could you check this PR again with your local data? Thank you!
Looks like it's fixed, we will need to update the dependencies for this: microsoft/vscode-webview-ui-toolkit#384 |
…1726) Close #51719 Unblock #51246 Thanks @eseliger and @philipp-spiess for the help with [upgrading the packages](https://sourcegraph.slack.com/archives/C052G9Y5Y8H/p1683728783413159) 🙇 ## Issues There was an issue with VS Code Webview buttons displaying a light border due to max-width set to 300 in the upstream package, which was then fixed in microsoft/vscode-webview-ui-toolkit#384 ![image](https://github.com/sourcegraph/sourcegraph/assets/68532117/3143b960-3008-4f31-b409-39aafa7ad8ab) Text is squeezed to the side due to max width issue: ![image](https://github.com/sourcegraph/sourcegraph/assets/68532117/7e77d525-6f00-4f77-8d5a-18bf06142edb) ## Fixs After updating the package, there is still a border for the height, but the width constrain has been removed which solve the issue where the text is squeezed to the side: <img width="557" alt="image" src="https://github.com/sourcegraph/sourcegraph/assets/68532117/b07cbd16-2ae5-46e7-bca9-8d1459fc076c"> Overriding the border color manually worked: <img width="616" alt="image" src="https://github.com/sourcegraph/sourcegraph/assets/68532117/72afcb1d-cf4a-4785-83fc-6d99438ddb71"> ## Test plan <!-- All pull requests REQUIRE a test plan: https://docs.sourcegraph.com/dev/background-information/testing_principles --> Package updated and working fine locally. See screenshots above
all: unset; | ||
box-sizing: border-box; | ||
display: inline-flex; | ||
justify-content: center; |
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.
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've updated the package that has the fix for the max-width issue and looks like it works with your changes too.
The only issue is the justify-content: center;
I mentioned above but other than that i think it's good to go :D
Here is what it looks like on my side after updating from center
to flex-start
with width set to 100%:
Amazing, thank you @abeatrix! I'll get this cleaned up and ready to go. |
This is ready to go |
…1726) Close sourcegraph/sourcegraph#51719 Unblock sourcegraph/sourcegraph#51246 Thanks @eseliger and @philipp-spiess for the help with [upgrading the packages](https://sourcegraph.slack.com/archives/C052G9Y5Y8H/p1683728783413159) 🙇 ## Issues There was an issue with VS Code Webview buttons displaying a light border due to max-width set to 300 in the upstream package, which was then fixed in microsoft/vscode-webview-ui-toolkit#384 ![image](https://github.com/sourcegraph/sourcegraph/assets/68532117/3143b960-3008-4f31-b409-39aafa7ad8ab) Text is squeezed to the side due to max width issue: ![image](https://github.com/sourcegraph/sourcegraph/assets/68532117/7e77d525-6f00-4f77-8d5a-18bf06142edb) ## Fixs After updating the package, there is still a border for the height, but the width constrain has been removed which solve the issue where the text is squeezed to the side: <img width="557" alt="image" src="https://github.com/sourcegraph/sourcegraph/assets/68532117/b07cbd16-2ae5-46e7-bca9-8d1459fc076c"> Overriding the border color manually worked: <img width="616" alt="image" src="https://github.com/sourcegraph/sourcegraph/assets/68532117/72afcb1d-cf4a-4785-83fc-6d99438ddb71"> ## Test plan <!-- All pull requests REQUIRE a test plan: https://docs.sourcegraph.com/dev/background-information/testing_principles --> Package updated and working fine locally. See screenshots above
As a warmup to starting work on the VSCode Extension, I did some cleanups of the design of the Cody VSCode chat history. This pushes the most important content in the history panel (the history items themselves) much higher, and moves the clear history to just a button next to the header (instead of a whole section).
Notes:
Future Fixes / Discussions
Perhaps it could say "I've updated your code." instead of "Here is my attempt at rewriting the selected code:"
Test plan
Would appreciate another person’s manual test of this, given it's my first contribution to the extension 🙏🏼