Cody: Fix button border display issue & update webview UI toolkit (#51726)

Close https://github.com/sourcegraph/sourcegraph/issues/51719
Unblock https://github.com/sourcegraph/sourcegraph/pull/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
https://github.com/microsoft/vscode-webview-ui-toolkit/issues/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
This commit is contained in:
Beatrix 2023-05-10 09:29:07 -07:00 committed by GitHub
parent 52fad38a0c
commit b578c52450
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 642 additions and 125 deletions

View File

@ -8,6 +8,8 @@ All notable changes to Sourcegraph Cody will be documented in this file.
### Fixed
- UI bug that capped buttons at 300px max-width with visible border [pull/51726](https://github.com/sourcegraph/sourcegraph/pull/51726)
### Changed
## [0.1.1]

View File

@ -14,6 +14,8 @@
color: var(--vscode-sideBar-foreground);
background-color: var(--vscode-sideBar-background);
height: 100%;
/* Override VS Code Webview Toolkit elements */
--border-width: none;
}
html,

View File

@ -221,6 +221,7 @@
"@types/testing-library__jest-dom": "5.9.5",
"@types/uuid": "8.0.1",
"@types/vscode": "^1.76.0",
"@types/vscode-webview": "^1.57.1",
"@types/webpack-bundle-analyzer": "^4.6.0",
"@types/webpack-stats-plugin": "^0.3.2",
"@types/yauzl": "^2.9.2",
@ -395,7 +396,7 @@
"@visx/text": "2.10.0",
"@visx/voronoi": "^2.10.0",
"@vscode/codicons": "^0.0.29",
"@vscode/webview-ui-toolkit": "^0.9.0",
"@vscode/webview-ui-toolkit": "^1.2.2",
"agent-base": "6.0.2",
"ajv": "^8.6.3",
"ajv-formats": "^2.1.1",

File diff suppressed because it is too large Load Diff