Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
22a11e4
added survey webview
msivasubramaniaan May 26, 2023
74a857c
Merge branch 'main' into add-survey-webview
msivasubramaniaan May 26, 2023
365c17c
added feedback UI code with mentioned changes
msivasubramaniaan Jun 1, 2023
522de5f
Merge branch 'main' into add-survey-webview
msivasubramaniaan Jun 1, 2023
fedb8de
changed the survey compile based on latest esbuild
msivasubramaniaan Jun 1, 2023
376a18f
added telemetry event for post the survey
msivasubramaniaan Jun 1, 2023
9044c44
changed name to feedback
msivasubramaniaan Jun 1, 2023
904c871
addressed review comment
msivasubramaniaan Jun 1, 2023
30a6063
show submit button atleaset one question was answered
msivasubramaniaan Jun 2, 2023
cc5916f
Update src/webview/feedback/json.js
msivasubramaniaan Jun 5, 2023
d3faa5f
Update src/webview/feedback/json.js
msivasubramaniaan Jun 5, 2023
93adbf3
Update src/webview/feedback/json.js
msivasubramaniaan Jun 5, 2023
847f736
Update src/webview/feedback/json.js
msivasubramaniaan Jun 5, 2023
297e74b
addressed the review comments
msivasubramaniaan Jun 5, 2023
9dd761b
Merge branch 'main' into add-survey-webview
msivasubramaniaan Jun 6, 2023
eb32832
added caption text
msivasubramaniaan Jun 6, 2023
77e5321
Update src/webview/feedback/app/feedback.tsx
msivasubramaniaan Jun 6, 2023
0514587
Update src/webview/feedback/app/index.html
msivasubramaniaan Jun 6, 2023
a264d6b
make underying on Rate us on Marketplace text
msivasubramaniaan Jun 6, 2023
197b8b1
added the share feedback
msivasubramaniaan Jun 6, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ src/webview/devfile-registry
src/webview/welcome
src/webview/git-import
src/webview/helm-chart
src/webview/feedback
test/sandbox-registration
1 change: 1 addition & 0 deletions build/esbuild.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const webviews = [
'helm-chart',
'log',
'welcome',
'feedback'
];

function kebabToCamel(text) {
Expand Down
Binary file added images/openshift_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 35 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@
"sinon-chai": "^3.7.0",
"source-map-support": "^0.5.21",
"style-loader": "^3.3.1",
"survey-react-ui": "^1.9.89",
"targz": "^1.0.1",
"ts-loader": "^9.2.6",
"tslint": "^5.20.1",
Expand Down Expand Up @@ -377,6 +378,12 @@
"light": "images/title/light/icon-issue.svg"
}
},
{
"command": "openshift.show.feedback",
"title": "Share your feedback",
"category": "OpenShift",
"icon": "$(feedback)"
},
{
"command": "openshift.project.create",
"title": "New Project",
Expand Down Expand Up @@ -1122,6 +1129,11 @@
"when": "view == openshiftProjectExplorer",
"group": "navigation@4"
},
{
"command": "openshift.show.feedback",
"when": "view == openshiftProjectExplorer",
"group": "navigation@5"
},
{
"command": "openshift.component.createFromLocal",
"when": "view == openshiftComponentsView",
Expand Down
1 change: 1 addition & 0 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ export async function activate(extensionContext: ExtensionContext): Promise<any>
'./componentsView',
'./webview/devfile-registry/registryViewLoader',
'./webview/helm-chart/helmChartLoader',
'./feedback'
)),
commands.registerCommand('clusters.openshift.useProject', (context) =>
commands.executeCommand('extension.vsKubernetesUseNamespace', context),
Expand Down
15 changes: 15 additions & 0 deletions src/feedback.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*-----------------------------------------------------------------------------------------------
* Copyright (c) Red Hat, Inc. All rights reserved.
* Licensed under the MIT License. See LICENSE file in the project root for license information.
*-----------------------------------------------------------------------------------------------*/
import { vsCommand } from './vscommand';
import FeedbackLoader from './webview/feedback/feedbackLoader';

export class Feedback {

@vsCommand('openshift.show.feedback')
static async openFeedbackWindow(): Promise<void> {
await FeedbackLoader.loadView('Feedback');
}

}
58 changes: 58 additions & 0 deletions src/webview/feedback/app/feedback.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
.parentContainer {
display: flex;
flex-direction: column;
background-color: var(--vscode-editor-background) !important;
color: var(--vscode-editor-foreground) !important;
font-family: var(--vscode-editor-font-family) !important;
font-size: var(--vscode-editor-font-size) !important;
font-weight: var(--vscode-editor-font-weight) !important;
}

.header__logo {
margin-top: 1rem;
margin-left: 1rem;
display: flex;
flex-direction: row;
justify-content: left;
gap: 3px;
}

.image__logo {
Comment thread
msivasubramaniaan marked this conversation as resolved.
height: 48px;
width: 54px;
}

.highlight {
color: #EE0000;
display: inline;
}

.foreGroundColor {
color: var(--vscode-foreground);
font-weight: normal;
}

.headerContainer {
display: flex;
flex-direction: row;
}

.section__header-hint {
width: 550px;
justify-content: center;
word-spacing: 5px;
text-align: justify;
color: var(--vscode-foreground);
font-weight: normal;
font-family: var(--vscode-font-family);
font-size: 14px;
}

.section__footer {
width: fit-content;
word-spacing: 0px;
}

.footerText:hover {
border-bottom: 3px solid #EE0000 !important;
}
77 changes: 77 additions & 0 deletions src/webview/feedback/app/feedback.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
/*-----------------------------------------------------------------------------------------------
* Copyright (c) Red Hat, Inc. All rights reserved.
* Licensed under the MIT License. See LICENSE file in the project root for license information.
*-----------------------------------------------------------------------------------------------*/
import React from 'react';
import { Icon, Stack, Typography } from '@mui/material';
import { Model } from 'survey-core';
import { Survey } from 'survey-react-ui';
import { DefaultProps } from '../../common/propertyTypes';
import { json } from '../json';
import { VSCodeMessage } from './vsCodeMessage';
import GitHubIcon from '@mui/icons-material/GitHub';
import OpenShiftExtensionIcon from '../../../../images/openshift_icon.png';
import MicrosoftIcon from '../../../../images/welcome/microsoft.svg';
import 'survey-core/defaultV2.css';
import './feedback.css'

export const FeedbackComponent: React.FC<DefaultProps> = ({ }) => {

const feedbackModal = new Model(json);

feedbackModal.onComplete.add((sender, options) => {
options.showSaveInProgress();
VSCodeMessage.postMessage({
action: 'postFeedback',
data: sender.data
});
options.showSaveSuccess();
});

feedbackModal.onValueChanged.add((feedbackModal, _question) => {
feedbackModal.showNavigationButtons = true;
});

feedbackModal.completeText = 'Submit';
feedbackModal.showNavigationButtons = false;

return (
<div className='parentContainer'>
<div className='headerContainer'>
<header className='header__logo' style={{ width: '50%' }}>
<img className='image__logo' src={OpenShiftExtensionIcon} />
<div style={{ display: 'flex', flexDirection: 'column' }}>
<label style={{ display: 'flex', flexDirection: 'row', textAlign: 'center' }}>
<Typography variant='h4' className='highlight'>OpenShift</Typography>
<Typography variant='h4' style={{ paddingLeft: '1rem' }} className='foreGroundColor'>Toolkit</Typography>
</label>
<Typography variant='caption' style={{ marginTop: '2px' }} className='foreGroundColor'>Your opinion matters to us!</Typography>
Comment thread
msivasubramaniaan marked this conversation as resolved.
Outdated
</div>
</header>
<div style={{ width: '50%' }}>
<label style={{ display: 'flex', flexDirection: 'row', gap: '1rem', textAlign: 'center', float: 'right', margin: '1rem' }}>
<a href='https://github.com/redhat-developer/vscode-openshift-tools'>
Comment thread
msivasubramaniaan marked this conversation as resolved.
Outdated
<div className='section__header-hint section__footer'>
<Stack direction='row' alignItems='center' gap={1}>
<GitHubIcon style={{ fontSize: 25 }} />
<Typography variant='body2' className='footerText'>Contact us on GitHub</Typography>
</Stack>
</div>
</a>
<a href='https://marketplace.visualstudio.com/items?itemName=redhat.vscode-openshift-connector&ssr=false#review-details' style={{ marginTop: '2px' }}>
<div className='section__header-hint section__footer'>
<Stack direction='row' alignItems='center' gap={1}>
<Icon fontSize='small'>
<img src={MicrosoftIcon} />
</Icon>
<Typography variant='body2' className='footerText'>Rate us on Marketplace</Typography>
Comment thread
msivasubramaniaan marked this conversation as resolved.
</Stack>
</div>
</a>
</label>
</div>
</div>
<Survey model={feedbackModal} />
Comment thread
msivasubramaniaan marked this conversation as resolved.
</div>
);
}
83 changes: 83 additions & 0 deletions src/webview/feedback/app/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
.sd-root-modern,
.sd-container-modern,
.sd-title.sd-container-modern__title {
background-color: var(--vscode-editor-background) !important;
color: var(--vscode-editor-foreground) !important;
font-family: var(--vscode-editor-font-family) !important;
font-size: var(--vscode-editor-font-size) !important;
font-weight: var(--vscode-editor-font-weight) !important;
}

.sd-header__text .sd-title {
color: #EE0000 !important;
}

.sd-title.sd-container-modern__title {
box-shadow: 0px 2px 0px var(--sjs-primary-backcolor, #ee0000) !important;
}

.sd-progress,
.sd-progress__bar {
background-color: var(--sjs-border-light, var(--border-light, #EE0000)) !important;
}

.sd-rating__item:focus-within {
border-color: var(--sjs-primary-backcolor, var(--primary, #EE0000)) !important;

}

.sd-rating__item--selected {
background-color: var(--sjs-primary-backcolor, var(--primary, #EE0000)) !important;
border-color: var(--sjs-primary-backcolor, var(--primary, #EE0000)) !important;
}

.sd-boolean__control:focus~.sd-boolean__switch {
box-shadow: inset 0 0 0 2px var(--sjs-primary-backcolor, var(--primary, #fff)) !important;
}

.sd-boolean__thumb,
.sd-btn {
color: var(--sjs-primary-backcolor, var(--primary, #EE0000)) !important;
}

.sd-btn--action {
background-color: var(--sjs-primary-backcolor, var(--primary, #EE0000)) !important;
color: var(--sjs-primary-backcolor, var(--primary, var(--vscode-button-foreground))) !important;
}

.sv-logo--left {
width: 5rem !important;
}

.sd-description {
color: var(--vscode-descriptionForeground) !important;
}

.sd-element__title span {
background-color: var(--vscode-editor-background) !important;
color: var(--vscode-editor-foreground) !important;
font-size: var(--vscode-editor-font-size) !important;
font-weight: var(--vscode-editor-font-weight) !important;
}

.svc-logic-question-value,
.sd-element--with-frame {
background-color: transparent !important;
}

.sd-rating__item-text.sd-rating__item-text {
border: none !important;
}

.sd-rating__item-smiley {
background-color: #ffd700 !important;
fill: black !important;
}

a:link {
text-decoration: none !important;
}

a:focus {
box-shadow: none !important;
}
Loading