-
Notifications
You must be signed in to change notification settings - Fork 60
Add feedback webview #2925
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
msivasubramaniaan
merged 20 commits into
redhat-developer:main
from
msivasubramaniaan:add-survey-webview
Jun 6, 2023
Merged
Add feedback webview #2925
Changes from 16 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
22a11e4
added survey webview
msivasubramaniaan 74a857c
Merge branch 'main' into add-survey-webview
msivasubramaniaan 365c17c
added feedback UI code with mentioned changes
msivasubramaniaan 522de5f
Merge branch 'main' into add-survey-webview
msivasubramaniaan fedb8de
changed the survey compile based on latest esbuild
msivasubramaniaan 376a18f
added telemetry event for post the survey
msivasubramaniaan 9044c44
changed name to feedback
msivasubramaniaan 904c871
addressed review comment
msivasubramaniaan 30a6063
show submit button atleaset one question was answered
msivasubramaniaan cc5916f
Update src/webview/feedback/json.js
msivasubramaniaan d3faa5f
Update src/webview/feedback/json.js
msivasubramaniaan 93adbf3
Update src/webview/feedback/json.js
msivasubramaniaan 847f736
Update src/webview/feedback/json.js
msivasubramaniaan 297e74b
addressed the review comments
msivasubramaniaan 9dd761b
Merge branch 'main' into add-survey-webview
msivasubramaniaan eb32832
added caption text
msivasubramaniaan 77e5321
Update src/webview/feedback/app/feedback.tsx
msivasubramaniaan 0514587
Update src/webview/feedback/app/index.html
msivasubramaniaan a264d6b
make underying on Rate us on Marketplace text
msivasubramaniaan 197b8b1
added the share feedback
msivasubramaniaan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,6 +16,7 @@ const webviews = [ | |
| 'helm-chart', | ||
| 'log', | ||
| 'welcome', | ||
| 'feedback' | ||
| ]; | ||
|
|
||
| function kebabToCamel(text) { | ||
|
|
||
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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'); | ||
| } | ||
|
|
||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| .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 { | ||
| height: 48px; | ||
| width: 54px; | ||
| object-fit: contain; | ||
| } | ||
|
|
||
| .highlight { | ||
| color: #EE0000; | ||
| display: inline; | ||
| } | ||
|
|
||
| .foreGroundColor { | ||
| color: var(--vscode-foreground); | ||
| font-weight: normal; | ||
| } | ||
|
|
||
| .headerContainer { | ||
| display: flex; | ||
| flex-direction: row; | ||
| border-bottom: 3px solid #EE0000; | ||
| } | ||
|
|
||
| .captionHeader { | ||
| display: flex; | ||
| flex-direction: column; | ||
| gap: 2px; | ||
| justify-content: center; | ||
| margin: auto; | ||
| margin-top: 1rem; | ||
| word-spacing: 2px; | ||
| } | ||
|
|
||
| .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; | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,85 @@ | ||
| /*----------------------------------------------------------------------------------------------- | ||
| * 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((sender, _options) => { | ||
| if (Object.keys(sender.getAllValues()).length > 0) { | ||
| sender.showNavigationButtons = true; | ||
| } else { | ||
| sender.showNavigationButtons = false; | ||
| } | ||
| }); | ||
|
|
||
| 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='h6' style={{ marginTop: '2px' }} className='foreGroundColor'>Your opinion matters to us!</Typography> | ||
| </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/issues'> | ||
| <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'> | ||
| <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> | ||
|
msivasubramaniaan marked this conversation as resolved.
|
||
| </Stack> | ||
| </div> | ||
| </a> | ||
| </label> | ||
| </div> | ||
| </div> | ||
| <div className='captionHeader'> | ||
| <Typography variant='subtitle2' className='foreGroundColor'>The Red Hat OpenShift Toolkit extension team would like to learn from your experience to improve the extension workflow.</Typography> | ||
| <Typography variant='subtitle2' className='foreGroundColor'>This survey will take about 3 minutes. Your feedback is extremely valuable and will directly impact the product moving forward.</Typography> | ||
|
msivasubramaniaan marked this conversation as resolved.
Outdated
|
||
| </div> | ||
| <Survey model={feedbackModal} /> | ||
|
msivasubramaniaan marked this conversation as resolved.
|
||
| </div> | ||
| ); | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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-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; | ||
| outline: 0 !important; | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.