Skip to content

Commit c9f9435

Browse files
authored
feat(amazonq): Update quick action styles and grouping (#4800)
Problem: - quick actions list should not have a title anymore and needs a separator between /transform, /dev commands and the /help, /clear commands. - Webview content is not fitting to its parent panel Solution: - Updated quick action commands group look&feel with mynah-ui v4.6.4 - Removed the groupName from /dev group. /transform and /dev combined in one group. - Applied necessary body and html width and height styles to the webview's content which were not coming from mynah-ui.
1 parent 4f19990 commit c9f9435

File tree

7 files changed

+36
-23
lines changed

7 files changed

+36
-23
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type": "Bug Fix",
3+
"description": "Amazon Q Chat: Q panel doesn't fit to its parent"
4+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type": "Feature",
3+
"description": "Amazon Q Chat: Updates quick action commands style and groupings"
4+
}

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4316,7 +4316,7 @@
43164316
"@aws-sdk/property-provider": "3.46.0",
43174317
"@aws-sdk/smithy-client": "^3.46.0",
43184318
"@aws-sdk/util-arn-parser": "^3.46.0",
4319-
"@aws/mynah-ui": "^4.5.6",
4319+
"@aws/mynah-ui": "^4.6.4",
43204320
"@gerhobbelt/gitignore-parser": "^0.2.0-9",
43214321
"@iarna/toml": "^2.2.5",
43224322
"@smithy/shared-ini-file-loader": "^2.2.8",
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
body,
2+
html {
3+
background-color: var(--mynah-color-bg);
4+
color: var(--mynah-color-text-default);
5+
height: 100%;
6+
width: 100%;
7+
overflow: hidden;
8+
margin: 0;
9+
padding: 0;
10+
}

packages/core/src/amazonq/webview/ui/main.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import { TextMessageHandler } from './messages/handler'
1616
import { MessageController } from './messages/controller'
1717
import { getActions, getDetails } from './diffTree/actions'
1818
import { DiffTreeFileInfo } from './diffTree/types'
19+
import '../../../../resources/css/amazonq-webview.css'
1920

2021
export const createMynahUI = (ideApi: any, amazonQEnabled: boolean) => {
2122
// eslint-disable-next-line prefer-const

packages/core/src/amazonq/webview/ui/quickActions/generator.ts

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -22,33 +22,28 @@ export class QuickActionGenerator {
2222

2323
public generateForTab(tabType: TabType): QuickActionCommandGroup[] {
2424
const quickActionCommands = [
25-
...(this.isFeatureDevEnabled
26-
? [
27-
{
28-
groupName: 'Application Development',
29-
commands: [
25+
{
26+
commands: [
27+
...(this.isFeatureDevEnabled
28+
? [
3029
{
3130
command: '/dev',
3231
placeholder: 'Briefly describe a task or issue',
3332
description:
3433
'Use all project files as context for code suggestions (increases latency).',
3534
},
36-
],
37-
},
38-
]
39-
: []),
40-
...(this.isGumbyEnabled
41-
? [
42-
{
43-
commands: [
35+
]
36+
: []),
37+
...(this.isGumbyEnabled
38+
? [
4439
{
4540
command: '/transform',
4641
description: 'Transform your Java 8 or 11 Maven project to Java 17',
4742
},
48-
],
49-
},
50-
]
51-
: []),
43+
]
44+
: []),
45+
],
46+
},
5247
{
5348
commands: [
5449
{
@@ -90,7 +85,6 @@ export class QuickActionGenerator {
9085

9186
return quickActionCommands.map(commandGroup => {
9287
return {
93-
groupName: commandGroup.groupName,
9488
commands: commandGroup.commands.map((commandItem: QuickActionCommand) => {
9589
const commandNotAvailable = commandUnavailability[tabType].unavailableItems.includes(
9690
commandItem.command

0 commit comments

Comments
 (0)