-
Notifications
You must be signed in to change notification settings - Fork 627
OCV first pass #10355
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
Merged
OCV first pass #10355
Changes from 27 commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
d31eca8
plumbing for showing the feedback iframe
srietkerk f55fca2
add https flag to the cli to use https when debugging ocv iframe
srietkerk c705f96
Merge branch 'master' of https://github.com/microsoft/pxt into srietk…
srietkerk 87236db
more config, removed functions, changed height and width of iframe
srietkerk 0593552
using different modal for the feedback
srietkerk 5259143
added feedback menu item to editor menu
srietkerk 9354dc2
got rid of iframe border
srietkerk a764d25
some small changes and styling
srietkerk 6446b2a
added comments
srietkerk 2120588
move app id to configs
srietkerk 4da2fdc
fix onclose reference
srietkerk 05d4be7
moved frame url to configs
srietkerk 816c662
remove tutorial completion feedback for now
srietkerk 8336f42
use emoji instead of sui icon
srietkerk bab52a2
merged master
srietkerk f905236
update iframeelement variable in event listener
srietkerk 4a4eb79
add space to less file
srietkerk 6c86476
another iframe element var change
srietkerk cd43ef9
moved height, width to less file, fixed some styling
srietkerk be206b5
remove redundant jsdoc types
srietkerk 2bb7a05
use pxt log functions, fix spacing in the event listener
srietkerk b209592
move emoji out of lf
srietkerk 9438c18
use lf for the displayed strings for the rating
srietkerk 158939c
types added
srietkerk c714b42
move types to localtypings and wrap them in a namespace
srietkerk 728ebd8
change to using the comment bubble icon
srietkerk 69ec94d
added types
srietkerk 9dc5367
actually using feedback kind
srietkerk 3e8c6ba
rename feedback app theme field
srietkerk 83b45f8
move iframe init and posting code to helper function
srietkerk 980020a
use optional chaining for ondismiss call
srietkerk 3b6a3ff
move current theme into send update theme function, update theme options
srietkerk 943c493
move questions for rating config to a function
srietkerk 36c823c
move appid, frame url to apptheme
srietkerk 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
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,271 @@ | ||
| declare namespace ocv { | ||
| const enum FeedbackAgeGroup { | ||
| Undefined = "Undefined", | ||
| MinorWithoutParentalConsent = "MinorWithoutParentalConsent", | ||
| MinorWithParentalConsent = "MinorWithParentalConsent", | ||
| NotAdult = "NotAdult", | ||
| Adult = "Adult", | ||
| MinorNoParentalConsentRequired = "MinorNoParentalConsentRequired" | ||
| } | ||
|
|
||
| interface IFeedbackCallbackFunctions { | ||
| attachDiagnosticsLogs?: (diagnosticsUploadId: string, diagnosticsEndpoint: string) => void; | ||
| onDismiss?: (isFeedbackSent?: boolean) => void; | ||
| onSuccess?: (clientFeedbackId: string) => void; | ||
| onError?: (errorMessage?: string) => void; | ||
| supportCallback?: () => void; | ||
| initializationComplete?: (initializationCompleteResult: InitializationResult) => void; | ||
| setSubmitButtonState?: (isEnabled: boolean) => void; | ||
| } | ||
|
|
||
| const enum FeedbackAuthenticationType { | ||
| MSA = "MSA", | ||
| AAD = "AAD", | ||
| Unauthenticated = "Unauthenticated" | ||
| } | ||
|
|
||
| const enum FeedbackType { | ||
| Smile = "Smile", | ||
| Frown = "Frown", | ||
| Idea = "Idea", | ||
| Unclassified = "Unclassified", | ||
| Survey = "Survey" | ||
| } | ||
|
|
||
| const enum FeedbackPolicyValue { | ||
| Enabled = "Enabled", | ||
| Disabled = "Disabled", | ||
| NotConfigured = "Not Configured", | ||
| NotApplicable = "Not Applicable" | ||
| } | ||
|
|
||
| interface IThemeOptions { | ||
| isFluentV9?: boolean; | ||
| /** | ||
| * v9Theme must be Theme object from @fluentui/react-components@9.* | ||
| */ | ||
| v9Theme?: any; | ||
| /** | ||
| * brandVariants must be BrandVariants object from @fluentui/react-components@9.* | ||
| */ | ||
| brandVariants?: any; | ||
| baseTheme?: any; | ||
| colorScheme?: any; | ||
| } | ||
|
|
||
| interface IFeedbackInitOptions { | ||
| ageGroup?: FeedbackAgeGroup; | ||
| appId?: number; | ||
| authenticationType?: FeedbackAuthenticationType; | ||
| callbackFunctions?: IFeedbackCallbackFunctions; | ||
| clientName?: string; | ||
| feedbackConfig?: IFeedbackConfig; | ||
| isProduction?: boolean; | ||
| telemetry?: IFeedbackTelemetry; | ||
| themeOptions?: IThemeOptions; | ||
| } | ||
|
|
||
| const enum FeedbackUiType { | ||
| SidePane = "SidePane",// Default: Used for side pane/detail view | ||
| Modal = "Modal",// Used for modal view | ||
| CallOut = "CallOut",// Used for inscreen pop up dialogue | ||
| IFrameWithinSidePane = "IFrameWithinSidePane",// Same as side pane but used inside an iframe | ||
| IFrameWithinModal = "IFrameWithinModal",// Same as modal but used inside an iframe | ||
| IFrameWithinCallOut = "IFrameWithinCallOut",// Same as callout but used inside an iframe | ||
| NoSurface = "NoSurface",// Used when the surface is provided by the host app | ||
| NoSurfaceWithoutTitle = "NoSurfaceWithoutTitle" | ||
| } | ||
|
|
||
| const enum FeedbackHostPlatformType { | ||
| Windows = "Windows", | ||
| IOS = "iOS", | ||
| Android = "Android", | ||
| WacTaskPane = "WacTaskPane", | ||
| MacOS = "MacOS", | ||
| Web = "Web", | ||
| IFrame = "IFrame" | ||
| } | ||
|
|
||
| const enum FeedbackHostEventName { | ||
| SubmitClicked = "InAppFeedback_HostEvent_SubmitClicked", | ||
| BackClicked = "InAppFeedback_HostEvent_BackClicked" | ||
| } | ||
|
|
||
| const enum InitializationStatus { | ||
| Success = "Success", | ||
| Error = "Error", | ||
| Warning = "Warning" | ||
| } | ||
|
|
||
| const enum InAppFeedbackQuestionUiType { | ||
| DropDown = "DropDown", | ||
| MultiSelect = "MultiSelect", | ||
| Rating = "Rating", | ||
| SingleSelect = "SingleSelect", | ||
| SingleSelectHorizontal = "SingleSelectHorizontal" | ||
| } | ||
|
|
||
| const enum InAppFeedbackScenarioType { | ||
| FeatureArea = "FeatureArea", | ||
| ResponsibleAI = "ResponsibleAI", | ||
| Experience = "Experience", | ||
| ProductSatisfaction = "ProductSatisfaction", | ||
| CrashImpact = "CrashImpact",// CrashImpact is of type Survey | ||
| Custom = "Custom", | ||
| AIThumbsDown = "AIThumbsDown", | ||
| AIThumbsUp = "AIThumbsUp", | ||
| AIError = "AIError", | ||
| PromptSuggestion = "PromptSuggestion" | ||
| } | ||
|
|
||
| const enum InAppFeedbackQuestionUiBehaviour { | ||
| QuestionNotRequired = "QuestionNotRequired", | ||
| CommentNotRequired = "CommentNotRequired", | ||
| CommentRequiredWithLastOption = "CommentRequiredWithLastOption" | ||
| } | ||
|
|
||
| const enum FeedbackAttachmentOrigin { | ||
| Application = "Application", | ||
| User = "User" | ||
| } | ||
|
|
||
| const enum FeedbackEntryPoint { | ||
| Header = "Header", | ||
| Footer = "Footer", | ||
| Backstage = "Backstage", | ||
| HelpMenu = "Help Menu", | ||
| Canvas = "Canvas", | ||
| Chat = "Chat" | ||
| } | ||
|
|
||
| interface InitializationResult { | ||
| status: InitializationStatus; | ||
| /** | ||
| * in UTC timestamp milliseconds | ||
| */ | ||
| timestamp?: number; | ||
| /** | ||
| * Duration to load package and validations (centro performance) in milliseconds | ||
| */ | ||
| loadTime?: number; | ||
| errorMessages?: string[]; | ||
| warningMessages?: string[]; | ||
| } | ||
|
|
||
| interface IFeedbackConfig { | ||
| appData?: string; | ||
| canDisplayFeedbackCalled?: boolean; | ||
| feedbackUiType?: FeedbackUiType; | ||
| hideFooterActionButtons?: boolean; | ||
| initialFeedbackType?: FeedbackType; | ||
| hostPlatform?: FeedbackHostPlatformType; | ||
| /** | ||
| * Invokes onDismiss callback on Esc button press | ||
| * Useful for host apps like Win32 Pane or iFrames | ||
| */ | ||
| invokeOnDismissOnEsc?: boolean; | ||
| isDisplayed?: boolean; | ||
| isEmailCollectionEnabled?: boolean; | ||
| isFeedbackForumEnabled?: boolean; | ||
| isFileUploadEnabled?: boolean; | ||
| isMyFeedbackEnabled?: boolean; | ||
| isScreenRecordingEnabled?: boolean; | ||
| isScreenshotEnabled?: boolean; | ||
| isShareContextDataEnabled?: boolean; | ||
| isThankYouPageDisabled?: boolean; | ||
| isSupportEnabled?: boolean; | ||
| maxHeight?: number; | ||
| maxWidth?: number; | ||
| minHeight?: number; | ||
| minWidth?: number; | ||
| myFeedbackUrl?: string; | ||
| privacyUrl?: string; | ||
| retentionDurationDays?: number; | ||
| scenarioConfig?: InAppFeedbackScenarioConfig; | ||
| supportUrl?: string; | ||
| /** | ||
| * Enable submit offline feedback | ||
| * This will only work if submitOffline callback is provided | ||
| */ | ||
| isOfflineSubmitEnabled?: boolean; | ||
| /** | ||
| * For platforms that host other products or sites, this parameter is used to disambiguate the recipient of the data. | ||
| * Its effect is to alter the form title for internal users only, replacing 'Microsoft' with the string provided. | ||
| * The string length is capped at 30 characters. | ||
| * Please keep the name as short as possible to optimize the user experience, preferably including only the product name. | ||
| * */ | ||
| msInternalTitleTarget?: string; | ||
| } | ||
|
|
||
| type IFeedbackTelemetry = { | ||
| accountCountryCode?: string; | ||
| affectedProcessSessionId?: string; | ||
| appVersion?: string; | ||
| audience?: string; | ||
| audienceGroup?: string; | ||
| browser?: string; | ||
| browserVersion?: string; | ||
| channel?: string; | ||
| clientCountryCode?: string; | ||
| cpuModel?: string; | ||
| dataCenter?: string; | ||
| deviceId?: string; | ||
| deviceType?: string; | ||
| entryPoint?: FeedbackEntryPoint; | ||
| errorClassification?: string; | ||
| errorCode?: string; | ||
| errorName?: string; | ||
| featureArea?: string; | ||
| featureName?: string; | ||
| feedbackOrigin?: string; | ||
| flights?: string; | ||
| flightSource?: string; | ||
| fundamentalArea?: string; | ||
| installationType?: string; | ||
| isLogIncluded?: boolean; | ||
| isUserSubscriber?: boolean; | ||
| officeArchitecture?: string; | ||
| officeBuild?: string; | ||
| officeEditingLang?: number; | ||
| officeUILang?: number; | ||
| osBitness?: number; | ||
| osBuild?: string; | ||
| osUserLang?: number; | ||
| platform?: string; | ||
| processorArchitecture?: string; | ||
| processorPhysicalCores?: number; | ||
| processSessionId?: string; | ||
| ringId?: number; | ||
| sku?: string; | ||
| sourceContext?: string; | ||
| sqmMachineId?: string; | ||
| subFeatureName?: string; | ||
| sourcePageName?: string; | ||
| sourcePageURI?: string; | ||
| systemManufacturer?: string; | ||
| systemProductName?: string; | ||
| uiHost?: string; | ||
| }; | ||
|
|
||
| interface InAppFeedbackScenarioConfig { | ||
| isScenarioEnabled?: boolean; | ||
| scenarioType?: InAppFeedbackScenarioType; | ||
| questionDetails?: InAppFeedbackQuestion; | ||
| } | ||
|
|
||
| interface InAppFeedbackQuestion { | ||
| questionUiType?: InAppFeedbackQuestionUiType; | ||
| questionInstruction?: InAppFeedbackCompositeString; | ||
| questionOptions?: InAppFeedbackCompositeString[]; | ||
| questionUiBehaviour?: InAppFeedbackQuestionUiBehaviour[]; | ||
| } | ||
|
|
||
| interface InAppFeedbackCompositeString { | ||
| displayedString: string; | ||
| displayedStringInEnglish: string; | ||
| } | ||
| } | ||
|
|
||
|
|
||
|
|
||
|
|
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 |
|---|---|---|
|
|
@@ -805,6 +805,7 @@ declare namespace pxt.editor { | |
| extensionsVisible?: boolean; | ||
| isMultiplayerGame?: boolean; // Arcade: Does the current project contain multiplayer blocks? | ||
| onboarding?: pxt.tour.BubbleStep[]; | ||
| feedback?: boolean; | ||
|
||
| } | ||
|
|
||
| export interface EditorState { | ||
|
|
@@ -1047,6 +1048,7 @@ declare namespace pxt.editor { | |
| showLanguagePicker(): void; | ||
| showShareDialog(title?: string, kind?: "multiplayer" | "vscode" | "share"): void; | ||
| showAboutDialog(): void; | ||
| showFeedbackDialog(): void; | ||
| showTurnBackTimeDialogAsync(): Promise<void>; | ||
|
|
||
| showLoginDialog(continuationHash?: string): void; | ||
|
|
||
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.