Skip to content

Commit 2caaf86

Browse files
authored
Merge pull request #971 from oracle/feature/PDPDEVTOOL-6272-DevAssist-Feedback-Loop-UI
PDPDEVTOOL-6272: Create UI to provide Feedback Loop for DevAssist
2 parents e1a372a + b44e7cd commit 2caaf86

19 files changed

+895
-34
lines changed

packages/node-cli/src/ApplicationConstants.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,5 +68,11 @@ module.exports = {
6868
SUITECLOUD_CI: 'SUITECLOUD_CI',
6969
SUITECLOUD_CI_PASSKEY: 'SUITECLOUD_CI_PASSKEY',
7070
SUITECLOUD_FALLBACK_PASSKEY: 'SUITECLOUD_FALLBACK_PASSKEY'
71-
}
71+
},
72+
HTTP_RESPONSE_CODE: {
73+
UNAUTHORIZED: 401,
74+
FORBIDDEN: 403,
75+
INTERNAL_SERVER_ERROR: 500,
76+
SERVICE_UNAVAILABLE: 503,
77+
},
7278
};

packages/node-cli/src/services/SuiteCloudAuthProxyService.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ const {
2525
} = require('../utils/AuthenticationUtils');
2626
const {
2727
AUTHORIZATION_PROPERTIES_KEYS,
28+
HTTP_RESPONSE_CODE,
2829
} = require('../ApplicationConstants');
2930

3031
/** Message literal service method */
@@ -39,14 +40,6 @@ const LOCAL_HOSTNAME = '127.0.0.1';
3940
/** Target server port */
4041
const TARGET_SERVER_PORT = 443;
4142

42-
/** Http codes */
43-
const HTTP_RESPONSE_CODE = {
44-
UNAUTHORIZED: 401,
45-
FORBIDDEN: 403,
46-
INTERNAL_SERVER_ERROR: 500,
47-
SERVICE_UNAVAILABLE: 503,
48-
};
49-
5043
class SuiteCloudAuthProxyService extends EventEmitter {
5144
constructor(sdkPath, executionEnvironmentContext) {
5245
super();

packages/vscode-extension/messages.json

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,12 @@
1010
"ANSWERS_NO": "No",
1111
"ANSWERS_YES": "Yes",
1212

13+
"BUTTONS_DONT_SHOW_AGAIN": "Don't show again",
14+
"BUTTONS_GIVE_FEEDBACK": "Give Feedback",
15+
"BUTTONS_OK": "Ok",
16+
"BUTTONS_OPEN_SETTINGS": "Open Settings",
1317
"BUTTONS_RESTART_NOW": "Restart Now",
1418
"BUTTONS_SEE_DETAILS": "See Details",
15-
"BUTTONS_OK": "Ok",
1619

1720
"COMMAND_ERROR": "Something went wrong with '{0}'.",
1821
"COMMAND_SUCCESS": "'{0}' has been successfully executed.",
@@ -54,6 +57,21 @@
5457
"DEPLOY_QUESTIONS_CHOICES_ACCOUNT_SPECIFIC_VALUES_CANCEL_PROCESS": "Cancel the deployment process",
5558
"DEPLOY_QUESTIONS_CHOICES_ACCOUNT_SPECIFIC_VALUES_DISPLAY_WARNING": "Display a warning and continue the deployment process",
5659

60+
"DEVASSIST_SERVICE_FEEDBACK_FORM_GENERIC_VALIDATION_ERROR_WRAPPER": "Some fields have validation errors.<br>{0}",
61+
"DEVASSIST_SERVICE_FEEDBACK_FORM_FIELD_VALIDATION_ERROR": "{0}: {1}",
62+
"DEVASSIST_SERVICE_FEEDBACK_FORM_FIELD_CANNOT_BE_EMPTY_TEXT": "This field cannot not be empty.",
63+
"DEVASSIST_SERVICE_FEEDBACK_FORM_FIELD_CANNOT_BE_EMPTY_MULTIPLE_OPTION": "At least one of the available options must be selected.",
64+
"DEVASSIST_SERVICE_FEEDBACK_FORM_FIELD_CANNOT_BE_EMPTY_NUMERIC": "Choose a satisfaction level (for example, 3 out of 5 stars).",
65+
"DEVASSIST_SERVICE_FEEDBACK_FORM_FIELD_CANNOT_BE_TOO_LONG": "This field can only contain up to {0} characters.",
66+
"DEVASSIST_SERVICE_FEEDBACK_FORM_FIELD_CANNOT_HAVE_REPEATED_VALUES": "Select unique values (provided: {0}).",
67+
"DEVASSIST_SERVICE_FEEDBACK_FORM_FIELD_MUST_HAVE_BE_A_VALID_NUMBER": "Choose a natural number between {0} and {1}.",
68+
"DEVASSIST_SERVICE_FEEDBACK_FORM_FIELD_MUST_HAVE_SPECIFIC_VALUES": "Select any values from the ones available: {0}.",
69+
"DEVASSIST_SERVICE_FEEDBACK_FORM_SUBMITTING_ERROR_REAUTHORIZE_TOAST": "Error 403: {0}",
70+
"DEVASSIST_SERVICE_FEEDBACK_FORM_SUBMITTING_ERROR_TOAST": "Unable to connect to the SuiteCloud Developer Assistant service. Is it running?",
71+
"DEVASSIST_SERVICE_FEEDBACK_FORM_SUBMITTING_EXTERNAL_ERROR": "A server error has occurred while submitting feedback for the SuiteCloud Developer Assistant (Error {0}: {1}).",
72+
"DEVASSIST_SERVICE_FEEDBACK_FORM_SUBMITTING_INTERNAL_ERROR": "There was a problem while submitting feedback for the SuiteCloud Developer Assistant. Is it running?{0}",
73+
"DEVASSIST_SERVICE_FEEDBACK_FORM_SUBMIT_SUCCESS": "Your feedback for the SuiteCloud Developer Assistant was successfully submitted.",
74+
5775
"DEVASSIST_SERVICE_OUTPUT_PROXY_ERROR": "There was a problem while running SuiteCloud Developer Assistant service.\n{0}",
5876
"DEVASSIST_SERVICE_OUTPUT_SERVER_ERROR": "There was a server error while running SuiteCloud Developer Assistant service.\n{0}",
5977
"DEVASSIST_SERVICE_OUTPUT_SERVER_ERROR_ON_REFRESH": "There was a problem refreshing credentials while running SuiteCloud Developer Assistant service.\n{0}",
@@ -66,13 +84,9 @@
6684
"DEVASSIST_SERVICE_IS_STOPPED_OUTPUT": "There was a problem when starting SuiteCloud Developer Assistant service.\n{0}",
6785
"DEVASSIST_SERVICE_IS_STOPPED_STATUSBAR": "Dev Assist: stopped",
6886
"DEVASSIST_SERVICE_SERVER_ERROR_OUTPUT": "A server error has occurred while running SuiteCloud Developer Assistant service.\nError: {0}",
69-
"DEVASSIST_SERVICE_STARTUP_BUTTON_DONT_SHOW_AGAIN": "Don't show again",
70-
"DEVASSIST_SERVICE_STARTUP_BUTTON_OPEN_SETTINGS": "Open Settings",
71-
"DEVASSIST_SERVICE_SEE_DETAILS_BUTTON": "See Details",
7287
"DEVASSIST_SERVICE_STARTUP_MESSAGE": "SuiteCloud Developer Assistant is here. Open settings to start using it.",
7388
"DEVASSIST_SERVICE_STATUSBAR_TOOLTIP": "Shows the status of SuiteCloud Developer Assistant service.",
7489

75-
7690
"DISMISS": "Dismiss",
7791

7892
"ERRORS_COURRUPTED_SDK_JAR_DEPENDENCY": "There was a problem with SuiteCloud Extension dependencies. Restart your Visual Studio Code instance.",

packages/vscode-extension/package.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,13 @@
111111
"title": "Open DevAssist settings",
112112
"category": "SuiteCloud",
113113
"enablement": "false"
114-
}
114+
},
115+
{
116+
"command": "suitecloud.opendevassistfeedbackform",
117+
"title": "Open DevAssist Feedback Form",
118+
"category": "SuiteCloud",
119+
"enablement": "false"
120+
}
115121
],
116122
"keybindings": [
117123
{
Lines changed: 229 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,229 @@
1+
:root {
2+
--gap: 12px;
3+
--radius: 12px;
4+
--border: #e5e7eb;
5+
--text: #111827;
6+
--muted: #6b7280
7+
}
8+
9+
* {
10+
box-sizing: border-box
11+
}
12+
13+
body {
14+
font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica, Arial, sans-serif;
15+
color: var(--text);
16+
background: #f8fafc;
17+
margin: 0;
18+
padding: 24px
19+
}
20+
21+
.card {
22+
max-width: 760px;
23+
margin: auto;
24+
background: #fff;
25+
border: 1px solid var(--border);
26+
border-radius: var(--radius);
27+
box-shadow: 0 10px 25px rgba(0, 0, 0, .05)
28+
}
29+
30+
.card header {
31+
padding: 20px 24px;
32+
border-bottom: 1px solid var(--border)
33+
}
34+
35+
h1 {
36+
font-size: 20px;
37+
margin: 0
38+
}
39+
40+
.content {
41+
padding: 20px 24px;
42+
display: grid;
43+
gap: var(--gap)
44+
}
45+
46+
label {
47+
font-weight: 600
48+
}
49+
50+
textarea {
51+
width: 100%;
52+
min-height: 120px;
53+
padding: 12px;
54+
border: 1px solid var(--border);
55+
border-radius: 10px;
56+
resize: vertical;
57+
font: inherit
58+
}
59+
60+
fieldset {
61+
border: 1px solid var(--border);
62+
border-radius: 10px;
63+
padding: 12px
64+
}
65+
66+
legend {
67+
padding: 0 6px;
68+
color: var(--muted)
69+
}
70+
71+
.checks {
72+
display: grid;
73+
grid-template-columns:repeat(auto-fit, minmax(220px, 1fr));
74+
gap: 8px 14px;
75+
margin-top: 6px
76+
}
77+
78+
.checks label {
79+
font-weight: 500;
80+
display: flex;
81+
align-items: center;
82+
gap: 8px
83+
}
84+
85+
.checks input {
86+
transform: translateY(1px)
87+
}
88+
89+
.stars {
90+
display: inline-flex;
91+
flex-direction: row-reverse; /* shows stars in correct LTR order */
92+
gap: 6px;
93+
width: fit-content;
94+
}
95+
.stars input {
96+
display: none;
97+
}
98+
.star {
99+
cursor: pointer;
100+
font-size: 28px;
101+
line-height: 1;
102+
filter: grayscale(.6);
103+
transition: transform .05s ease;
104+
}
105+
.star::before {
106+
content: "☆";
107+
}
108+
/* On hover, fill all stars to the left (and including hovered) */
109+
.stars label.star:hover,
110+
.stars label.star:hover ~ label.star {
111+
transform: scale(1.25);
112+
}
113+
.stars label.star:hover::before,
114+
.stars label.star:hover ~ label.star::before {
115+
content: "★";
116+
color: #f59e0b;
117+
filter: none;
118+
}
119+
.stars label.star:hover,
120+
.stars label.star:hover ~ label.star {
121+
color: #f59e0b;
122+
filter: none;
123+
}
124+
125+
/* On checked, fill all stars to the left (and including selected) */
126+
.stars input:checked ~ label.star::before,
127+
.stars input:checked ~ label.star {
128+
content: "★";
129+
color: #f59e0b;
130+
filter: none;
131+
}
132+
133+
.row {
134+
display: grid;
135+
gap: 6px
136+
}
137+
138+
button {
139+
appearance: none;
140+
border: 1px solid var(--border);
141+
background: #111827;
142+
color: #fff;
143+
padding: 10px 14px;
144+
border-radius: 10px;
145+
font-weight: 600;
146+
cursor: pointer
147+
}
148+
149+
button.secondary {
150+
background: #fff;
151+
color: #111827
152+
}
153+
154+
.note {
155+
color: var(--muted);
156+
font-size: 12px
157+
}
158+
159+
pre {
160+
background: #0b1020;
161+
color: #d1d5db;
162+
padding: 12px;
163+
border-radius: 10px;
164+
overflow: auto;
165+
max-height: 240px
166+
}
167+
168+
.actions {
169+
display: flex;
170+
gap: 10px;
171+
justify-content: flex-end;
172+
margin-top: 8px
173+
}
174+
175+
#alert-container {
176+
position: fixed;
177+
z-index: 9999;
178+
bottom: 24px;
179+
right: 24px;
180+
display: flex;
181+
flex-direction: column-reverse; /* new alerts on top */
182+
gap: 12px;
183+
max-width: 860px;
184+
margin-left: 64px;
185+
pointer-events: none;
186+
}
187+
.toast-alert {
188+
display: flex;
189+
align-items: start;
190+
background: #e7f5ff;
191+
color: #155577;
192+
border-left: 4px solid #228be6;
193+
border-radius: 6px;
194+
box-shadow: 0 2px 8px rgba(0,0,0,0.13);
195+
margin: 0;
196+
padding: 16px 44px 16px 16px;
197+
font-size: 15px;
198+
position: relative;
199+
min-width: 220px;
200+
max-width: 100%;
201+
pointer-events: auto;
202+
}
203+
.toast-alert.toast-info {
204+
background: #e7f5ff;
205+
border-color: #228be6;
206+
color: #155577;
207+
}
208+
.toast-alert.toast-error {
209+
background: #ffceca;
210+
border-color: #ff4d4f;
211+
color: #a8071a;
212+
}
213+
.toast-close {
214+
position: absolute;
215+
top: 8px;
216+
right: 10px;
217+
background: none;
218+
border: none;
219+
color: inherit;
220+
font-size: 19px;
221+
cursor: pointer;
222+
line-height: 1;
223+
padding: 0;
224+
opacity: 0.65;
225+
transition: opacity 0.19s;
226+
}
227+
.toast-close:hover {
228+
opacity: 1;
229+
}

0 commit comments

Comments
 (0)