Skip to content

Commit a075370

Browse files
authored
Merge pull request #13 from aliyun/feat/webview-style-upgrade
Optimized the UI interface of webview
2 parents f7e2a8d + 02b582b commit a075370

35 files changed

+2047
-932
lines changed

.prettierrc

Lines changed: 0 additions & 6 deletions
This file was deleted.

.prettierrc.js

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
module.exports = {
2+
plugins: ['prettier-plugin-tailwindcss'],
3+
// 一行最多 120 字符
4+
printWidth: 120,
5+
// 使用 2 个空格缩进
6+
tabWidth: 2,
7+
// 不使用缩进符,而使用空格
8+
useTabs: false,
9+
// 行尾需要有分号
10+
semi: true,
11+
// 使用单引号
12+
singleQuote: false,
13+
// 对象的 key 仅在必要时用引号
14+
quoteProps: 'as-needed',
15+
// jsx 不使用单引号,而使用双引号
16+
jsxSingleQuote: false,
17+
// 末尾需要有逗号
18+
trailingComma: 'all',
19+
// 大括号内的首尾需要空格
20+
bracketSpacing: true,
21+
// 箭头函数,只有一个参数的时候,也需要括号
22+
arrowParens: 'always',
23+
// 不需要写文件开头的 @prettier
24+
requirePragma: false,
25+
// 不需要自动在文件开头插入 @prettier
26+
insertPragma: false,
27+
// 使用默认的折行标准
28+
proseWrap: 'preserve',
29+
// 根据显示样式决定 html 要不要折行
30+
htmlWhitespaceSensitivity: 'css',
31+
// vue 文件中的 script 和 style 内不用缩进
32+
vueIndentScriptAndStyle: false,
33+
// 换行符使用 lf
34+
endOfLine: 'lf',
35+
// 格式化内嵌代码
36+
embeddedLanguageFormatting: 'auto',
37+
};

.vscode/settings.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"editor.formatOnSave": true,
3+
"eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact"],
4+
"editor.defaultFormatter": "esbenp.prettier-vscode",
5+
"editor.codeActionsOnSave": {
6+
"source.organizeImports": "explicit"
7+
}
8+
}

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,10 @@ Submit bug reports and feature requests on [our Github repository](https://githu
8282

8383
## Release Notes
8484

85+
### 0.0.8
86+
- Fixed some Windows compatibility issues.
87+
- Optimized the UI interface of webview.
88+
8589
### 0.0.7
8690
- Launch experience satisfaction questionnaire survey
8791
- You are welcome to submit your questions and suggestions on the [experience questionnaire](https://g.alicdn.com/aes/tracker-survey-preview/0.0.13/survey.html?pid=fePxMy&id=3486).

README.zh_CN.md

Lines changed: 31 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,18 @@ Alibaba Cloud API Toolkit 是一个轻量化的阿里云 API 工具,支持在
1111

1212
## 功能
1313

14-
* **阿里云产品订阅:** 插件提供了一键订阅阿里云产品的功能,你可以通过 `ctrl+cmd+k` 搜索和订阅阿里云产品。
14+
- **阿里云产品订阅:** 插件提供了一键订阅阿里云产品的功能,你可以通过 `ctrl+cmd+k` 搜索和订阅阿里云产品。
1515

16-
* **API 搜索:** 你可以通过 `ctrl+cmd+l` 搜索并查看已订阅的 API 文档。
16+
- **API 搜索:** 你可以通过 `ctrl+cmd+l` 搜索并查看已订阅的 API 文档。
1717

18-
* **API 文档预览:** 点击 API 可以打开一个新的标签页,并显示对应的 API 文档,包括描述、请求参数、响应参数和错误码。
18+
- **API 文档预览:** 点击 API 可以打开一个新的标签页,并显示对应的 API 文档,包括描述、请求参数、响应参数和错误码。
1919

20-
* **API 调试:** 你可以在插件中使用表单的方式调试阿里云 API,并查看结果。
21-
22-
* **SDK 代码示例:** 你可以在插件中获得 SDK 代码示例,并在编辑器中快速打开对应的 SDK 代码。
20+
- **API 调试:** 你可以在插件中使用表单的方式调试阿里云 API,并查看结果。
21+
- **SDK 代码示例:** 你可以在插件中获得 SDK 代码示例,并在编辑器中快速打开对应的 SDK 代码。
2322

24-
* **Code Snippets:** 支持代码片段功能,帮助你快速编写 SDK 代码。
23+
- **Code Snippets:** 支持代码片段功能,帮助你快速编写 SDK 代码。
2524

26-
* 更多功能正在开发中,敬请期待...
25+
- 更多功能正在开发中,敬请期待...
2726

2827
## 插件 UI 导览
2928

@@ -37,12 +36,14 @@ Alibaba Cloud API Toolkit 是一个轻量化的阿里云 API 工具,支持在
3736

3837
![API Serching](https://img.alicdn.com/imgextra/i1/O1CN01KaWkBF1UfCUkY0N3v_!!6000000002544-0-tps-1286-518.jpg)
3938

40-
### API 调试
39+
### API 调试
4140

4241
调试功能需要配置你的 AK/SK 信息,配置方法如下:
42+
4343
1. 安装 [Alibaba Cloud CLI Tools](https://marketplace.visualstudio.com/items?itemName=alibabacloud-openapi.aliyuncli) 插件,
4444
2. 打开命令行安装 aliyun-cli `brew install aliyun-cli`
4545
3. 输入 `aliyun configure` 命令,按照提示进行配置,
46+
4647
```
4748
$ aliyun configure
4849
Configuring profile 'default' ...
@@ -52,19 +53,24 @@ Default Region Id [None]: cn-hangzhou
5253
Default output format [json]: json
5354
Default Language [zh]: zh
5455
```
56+
5557
4. 点击 VS Code 状态栏中的阿里云图标,管理你的 profiles,
56-
![](https://img.alicdn.com/imgextra/i1/O1CN0144NU9N1L4G1cq89Uf_!!6000000001245-0-tps-248-46.jpg)
57-
![](https://img.alicdn.com/imgextra/i2/O1CN01btLUkc1ldEHJQ0w4S_!!6000000004841-0-tps-1206-190.jpg)
58+
![](https://img.alicdn.com/imgextra/i1/O1CN0144NU9N1L4G1cq89Uf_!!6000000001245-0-tps-248-46.jpg)
59+
![](https://img.alicdn.com/imgextra/i2/O1CN01btLUkc1ldEHJQ0w4S_!!6000000004841-0-tps-1206-190.jpg)
5860
1. 更多信息请参考 [Alibaba Cloud CLI Documentation](https://github.com/aliyun/aliyun-cli?tab=readme-ov-file#configure)
5961

6062
![API debug](https://img.alicdn.com/imgextra/i4/O1CN01F1qI7S1BunIFJPiAt_!!6000000000006-0-tps-2618-2050.jpg)
6163

64+
![API debug](https://learn.microsoft.com/zh-cn/visualstudio/ide/media/vs-2022/copilot-chat-visual-studio.gif?view=vs-2022#lightbox)
65+
6266
### SDK 示例
67+
6368
你能够通过调试表单生成 SDK 代码示例,并在编辑器中打开对应的 SDK 代码。
6469

6570
![sdk demo](https://img.alicdn.com/imgextra/i1/O1CN01GVhWTl1waRdYmCn7E_!!6000000006324-0-tps-2630-2038.jpg)
6671

6772
### Code Snippets
73+
6874
你能通过代码片段快速生成 SDK 代码示例。
6975

7076
在编辑器输入你已订阅的 API 即可搜索到对应 API 的代码段。
@@ -76,33 +82,45 @@ Default Language [zh]: zh
7682
![code snippets](https://img.alicdn.com/imgextra/i3/O1CN01dmGwmX1ZyVHozyKx4_!!6000000003263-1-tps-842-468.gif)
7783

7884
## 反馈
85+
7986
欢迎在我们的 [Github repository](https://github.com/aliyun/alibabacloud-api-vscode-toolkit/issues) 上提交你的问题和建议。
8087

8188
## Requirements
89+
8290
- Need VS Code 1.75.0 or above.
8391

8492
## Release Notes
8593

94+
### 0.0.8
95+
- Fixed some Windows compatibility issues.
96+
- Optimized the UI interface of webview.
97+
8698
### 0.0.7
99+
87100
- Launch experience satisfaction questionnaire survey.
88101
- You are welcome to submit your questions and suggestions on the [experience questionnaire](https://g.alicdn.com/aes/tracker-survey-preview/0.0.13/survey.html?pid=fePxMy&id=3486).
89102

90103
### 0.0.6
104+
91105
- Surpport code snippets.
92106

93107
### 0.0.5
108+
94109
- Added aliyun-cli installation instructions.
95110

96111
### 0.0.3
112+
97113
- Support API calling.
98114
- Support SDK code sample.
99115

100-
### 0.0.1
116+
### 0.0.1
117+
101118
Initial release
119+
102120
- Support product searching and subscription.
103121
- Support API searching.
104122
- Support API Document View.
105123

106124
## License
107125

108-
See the [Apache License 2.0](./LICENSE).
126+
See the [Apache License 2.0](./LICENSE).

media/package.json

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,23 @@
3737
"version": "0.3.70",
3838
"repository": "[email protected]:aliyun/alibabacloud-api-vscode-toolkit.git",
3939
"devDependencies": {
40-
"less": "^4.2.0",
41-
"@vitejs/plugin-react": "^1.3.2",
42-
"vite": "^2.9.7",
40+
"@types/blueimp-md5": "^2.7.0",
4341
"@types/fs-extra": "^5.1.0",
4442
"@types/lodash": "^4.14.182",
43+
"@types/node": "^20",
4544
"@types/react": "^18.0.8",
4645
"@types/react-dom": "^18.0.3",
4746
"@types/vscode": "^1.47.0",
4847
"@types/vscode-webview": "^1.57.0",
49-
"@types/blueimp-md5": "^2.7.0"
48+
"@vitejs/plugin-react": "^1.3.2",
49+
"autoprefixer": "^10.0.1",
50+
"eslint": "^8",
51+
"eslint-config-next": "14.1.4",
52+
"less": "^4.2.0",
53+
"postcss": "^8",
54+
"prettier": "^3.2.5",
55+
"tailwindcss": "^3.4.3",
56+
"typescript": "^5",
57+
"vite": "^2.9.7"
5058
}
5159
}

media/postcss.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = {
2+
plugins: {
3+
tailwindcss: {},
4+
autoprefixer: {},
5+
},
6+
};
Lines changed: 20 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,21 @@
1-
.pontx-ui-api {
2-
min-width: 540px;
3-
overflow: auto;
4-
.web-debug{
5-
margin: 12px 40px 12px;
6-
float:right
7-
}
8-
.debug-comp-content{
9-
display: flex;
10-
flex-direction: row;
11-
}
12-
.debug-comp-content-column {
13-
flex-direction: column;
14-
}
15-
.left-panel {
16-
.head-content{
17-
padding: 20px;
18-
border-bottom: 1px #ccc solid;
19-
}
20-
.middle-content{
21-
/* border: 1px #ccc solid;
22-
border-top: 0px; */
23-
padding: 20px;
24-
height: calc(100vh - 370px);
25-
overflow: auto;
26-
}
27-
.footer-content{
28-
padding: 20px;
29-
border-top: 1px #ccc solid;
30-
display: flex;
31-
justify-content: space-between;
32-
}
33-
34-
}
35-
.left-panel-column {
36-
overflow: auto;
37-
border: #ccc 1px solid;
38-
.middle-content{
39-
/* border: 1px #ccc solid;
40-
border-top: 0px; */
41-
padding: 20px;
42-
height: 200px;
43-
overflow: auto;
44-
}
45-
}
46-
.right-panel {
47-
min-width: 540px;
48-
border-left: 1px #ccc solid;
49-
.right-ops{
50-
padding: 0 16px;
51-
font-weight: 500;
52-
}
53-
.content{
54-
padding: 0 0 16px 20px;
55-
height: calc(100vh - 270px);
56-
overflow: auto;
57-
.api-params-doc{
58-
overflow: auto;
59-
}
60-
.semix-schema-table{
61-
table-layout: fixed;
62-
.param-name {
63-
width: 280px;
64-
}
65-
.param-name div > div{
66-
display: flex;
67-
flex-wrap: wrap;
68-
}
69-
}
70-
/* .param-name.semix-table-td{
71-
max-width: 280px;
72-
} */
73-
}
74-
}
1+
.expand-arrow {
2+
position: absolute;
3+
top: 256px;
4+
left: 413px;
5+
z-index: 999;
6+
width: 12px;
7+
height: 82px;
8+
line-height: 36px;
9+
background-color: #fff;
10+
border: 1px solid rgb(229, 229, 229);
11+
border-radius: 0 2px 2px 0;
12+
cursor: pointer;
13+
/* .codicon {
14+
position: relative !important;
15+
line-height: 79px !important;
16+
right: 3px !important;
17+
} */
18+
&:hover {
19+
background-color: #f5f5f5;
20+
}
7521
}
76-

0 commit comments

Comments
 (0)