Skip to content
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

Add survey and banner #7

Merged
merged 10 commits into from
Nov 6, 2017
Merged

Add survey and banner #7

merged 10 commits into from
Nov 6, 2017

Conversation

DonJayamanne
Copy link

No description provided.

openCommand = '/usr/bin/xdg-open';
}
if (!openCommand) {
console.error(`Unable to determine platform to capture user feedback in Python extension ${os.platform()}`);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this for feedback or a generic banner system? And should the error message include the URL in case people want to manually navigate to it?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the generic banner.
Agreed, will include URL

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, then maybe we should change it from "Unable to determine platform to capture user feedback in Python extension" to "Unable to determine platform in order to open ${BANNER_URL}" or something.

}
}

export interface IPersistentStateFactor {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IPersistentStateFactory

super();
this.createCounters();
}
public updateEditCounter(): void {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

incrementEditCounter since update suggests you can do more than just an increment. (same with the other update methods.)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed


this.checkThreshold();
}
private checkThreshold() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this take counterName so that just the single value is checked? Do you expect the counters to be updated outside of this instance to lead to needing to check all counters?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aarg, carry on from old code where I was persisting counters between sessions and this check was run only every minute or so.

if (telemetryEventName === FEEDBACK) {
return;
}
if (!this.showFeedbackPrompt.value || this.userResponded.value || !this.counters) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This if is used twice. Worth factoring out into a method?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

private displaySurvey() {
this.userResponded.value = true;

let openCommand: string | undefined;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this code common between here and the banner? Should it be factored out?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but the banner would go out (removed), hence didn't want to share any code.


'use strict';

export * from './feedbackService';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's this file for? Simplifying the namespace?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes,

@@ -7,7 +7,7 @@ import { Commands, PythonLanguage } from '../common/constants';
import { JupyterCodeLensProvider } from './editorIntegration/codeLensProvider';
import { JupyterSymbolProvider } from './editorIntegration/symbolProvider';
import { formatErrorForLogging } from '../common/utils';
// import * as telemetryHelper from '../common/telemetry';
// import * as telemetryHelper from '../telemetry';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason to keep around the commented-out imports?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol,

@DonJayamanne
Copy link
Author

@brettcannon , fixed all, please re-review while tests run.

@DonJayamanne DonJayamanne merged commit 8c038f9 into master Nov 6, 2017
@DonJayamanne DonJayamanne deleted the SurveyAndBanner branch November 6, 2017 23:28
rchiodo added a commit that referenced this pull request Oct 26, 2018
Implement basic webview support. This should allow us to iterate on the datascience controls using react.
This commit creates a history pane that just looks like the default "react" page but works inside of a webview panel.
Additionally it still makes it possible to load the index.html into a browser for debugging the react code standalone.
rchiodo added a commit that referenced this pull request Oct 26, 2018
Implement basic webview support. This should allow us to iterate on the datascience controls using react.
This commit creates a history pane that just looks like the default "react" page but works inside of a webview panel.
Additionally it still makes it possible to load the index.html into a browser for debugging the react code standalone.
pypros added a commit to pypros/vscode-python that referenced this pull request Feb 21, 2019
karrtikr pushed a commit that referenced this pull request Mar 5, 2019
* more corrections

* Merge conflicts

* corrections

* Delete jupyterServerManager.unit.test.ts

* corrections

* CI

* more corrections

* corrections

* corrections

* correct
@lock lock bot locked as resolved and limited conversation to collaborators Jul 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants