Skip to content

Commit

Permalink
Improve wording.
Browse files Browse the repository at this point in the history
  • Loading branch information
trungleduc committed Feb 17, 2022
1 parent 2c4d19f commit 5cd6fe2
Show file tree
Hide file tree
Showing 13 changed files with 41 additions and 47 deletions.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 9 additions & 9 deletions packages/completer-extension/schema/tracker.json
Expand Up @@ -5,8 +5,8 @@
"jupyter.lab.transform": true,
"properties": {
"availableProviders": {
"title": "Installed completion providers.",
"description": "Configuration for installed completion providers, the keys of this dictionary are the identifiers of providers, the corresponding value is the priority rank of the provider. Providers with higher rank will be shown before the ones with lower rank, providers with negative rank are disabled.",
"title": "Completion providers rank setting.",
"description": "Providers with higher rank will be shown before the ones with lower rank, providers with negative rank are disabled.",
"type": "object",
"patternProperties": {
"^.*$": {
Expand All @@ -25,15 +25,15 @@
"type": "number",
"default": 1000
},
"showDocumentPanel": {
"title": "Show the document panel.",
"description": "Show or hide the document panel of completer widget, this configuration is applied to all providers. If a provider does not provide the document content, the panel will be hidden for this provider.",
"showDocumentationPanel": {
"title": "Show the documentation panel.",
"description": "Documentation panel setting.",
"type": "boolean",
"default": true
"default": false
},
"continuousHinting": {
"title": "Enable continuous hinting.",
"description": "Continuous hinting setting.",
"autoCompletion": {
"title": "Enable autocompletion.",
"description": "Autocompletion setting.",
"type": "boolean",
"default": false
}
Expand Down
4 changes: 2 additions & 2 deletions packages/completer-extension/src/index.ts
Expand Up @@ -49,8 +49,8 @@ const manager: JupyterFrontEndPlugin<ICompletionProviderManager> = {
): ICompletionProviderManager => {
const AVAILABLE_PROVIDERS = 'availableProviders';
const PROVIDER_TIMEOUT = 'providerTimeout';
const SHOW_DOCUMENT_PANEL = 'showDocumentPanel';
const CONTINUOUS_HINTING = 'continuousHinting';
const SHOW_DOCUMENT_PANEL = 'showDocumentationPanel';
const CONTINUOUS_HINTING = 'autoCompletion';
const manager = new CompletionProviderManager();
const updateSetting = (
settingValues: ISettingRegistry.ISettings,
Expand Down
2 changes: 1 addition & 1 deletion packages/completer/src/connectorproxy.ts
Expand Up @@ -114,7 +114,7 @@ export class ConnectorProxy implements IConnectorProxy {
private _context: ICompletionContext;

/**
* Timeout for provider fetch request.
* Timeout for the fetch request.
*/
private _timeout: number;

Expand Down
12 changes: 6 additions & 6 deletions packages/completer/src/handler.ts
Expand Up @@ -97,12 +97,12 @@ export class CompletionHandler implements IDisposable {
/**
* Enable/disable continuous hinting mode.
*/
set continuousHinting(value: boolean) {
this._continuousHinting = value;
set autoCompletion(value: boolean) {
this._autoCompletion = value;
}

get continuousHinting(): boolean {
return this._continuousHinting;
get autoCompletion(): boolean {
return this._autoCompletion;
}

/**
Expand Down Expand Up @@ -298,7 +298,7 @@ export class CompletionHandler implements IDisposable {
return;
}
if (
this._continuousHinting &&
this._autoCompletion &&
this._connector.shouldShowContinuousHint(
this.completer.isVisible,
changed
Expand Down Expand Up @@ -409,7 +409,7 @@ export class CompletionHandler implements IDisposable {
private _editor: CodeEditor.IEditor | null | undefined = null;
private _enabled = false;
private _isDisposed = false;
private _continuousHinting = false;
private _autoCompletion = false;
}

/**
Expand Down
8 changes: 4 additions & 4 deletions packages/completer/src/manager.ts
Expand Up @@ -49,8 +49,8 @@ export class CompletionProviderManager implements ICompletionProviderManager {
* Enable/disable continuous hinting mode.
*/
setContinuousHinting(value: boolean): void {
this._panelHandlers.forEach(handler => (handler.continuousHinting = value));
this._continuousHinting = value;
this._panelHandlers.forEach(handler => (handler.autoCompletion = value));
this._autoCompletion = value;
}

/**
Expand Down Expand Up @@ -117,7 +117,7 @@ export class CompletionProviderManager implements ICompletionProviderManager {
} else {
// Update existing handler.
handler.completer.showDocsPanel = this._showDoc;
handler.continuousHinting = this._continuousHinting;
handler.autoCompletion = this._autoCompletion;
if (editor) {
handler.editor = editor;
handler.connector = await this.generateConnectorProxy(
Expand Down Expand Up @@ -240,5 +240,5 @@ export class CompletionProviderManager implements ICompletionProviderManager {
/**
* Flag to enable/disable continuous hinting.
*/
private _continuousHinting: boolean;
private _autoCompletion: boolean;
}
2 changes: 1 addition & 1 deletion packages/completer/src/tokens.ts
Expand Up @@ -81,7 +81,7 @@ export interface ICompletionProvider<
): Promise<T>;

/**
* If users enable `continuousHinting` in setting, this method is
* If users enable `autoCompletion` in setting, this method is
* called on text changed event of `CodeMirror` to check if the
* completion items should be shown.
*
Expand Down
1 change: 1 addition & 0 deletions packages/completer/style/base.css
Expand Up @@ -203,6 +203,7 @@
0% {
transform: translateX(0);
}

to {
transform: translateX(400%);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/console-extension/src/index.ts
Expand Up @@ -198,7 +198,7 @@ const lineColStatus: JupyterFrontEndPlugin<void> = {
};

const completerPlugin: JupyterFrontEndPlugin<void> = {
id: '@jupyterlab/console-extensions:completer',
id: '@jupyterlab/console-extension:completer',
requires: [IConsoleTracker],
optional: [ICompletionProviderManager],
activate: activateConsoleCompleterService,
Expand Down
2 changes: 1 addition & 1 deletion packages/fileeditor-extension/src/index.ts
Expand Up @@ -167,7 +167,7 @@ const lineColStatus: JupyterFrontEndPlugin<void> = {
};

const completerPlugin: JupyterFrontEndPlugin<void> = {
id: '@jupyterlab/fileeditor-extensions:completer',
id: '@jupyterlab/fileeditor-extension:completer',
requires: [IEditorTracker],
optional: [ICompletionProviderManager],
activate: activateFileEditorCompleterService,
Expand Down
2 changes: 1 addition & 1 deletion packages/notebook-extension/src/index.ts
Expand Up @@ -756,7 +756,7 @@ const lineColStatus: JupyterFrontEndPlugin<void> = {
};

const completerPlugin: JupyterFrontEndPlugin<void> = {
id: '@jupyterlab/notebook-extensions:completer',
id: '@jupyterlab/notebook-extension:completer',
requires: [INotebookTracker],
optional: [ICompletionProviderManager],
activate: activateNotebookCompleterService,
Expand Down
35 changes: 14 additions & 21 deletions yarn.lock
Expand Up @@ -2755,13 +2755,6 @@
resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.30.tgz#44cb52f32a809734ca562e685c6473b5754a7818"
integrity sha512-sqm9g7mHlPY/43fcSNrCYfOeX9zkTTK+euO5E6+CVijSMm5tTjkVdwdqRkY3ljjIAf8679vps5jKUoJBCLsMDA==

"@types/lodash.curry@^4.1.6":
version "4.1.6"
resolved "https://registry.yarnpkg.com/@types/lodash.curry/-/lodash.curry-4.1.6.tgz#f26c490c80c92d7cbaa2300d542e89781d44b1ff"
integrity sha512-x3ctCcmOYqRrihNNnQJW6fe/yZFCgnrIa6p80AiPQRO8Jis29bBdy1dEw1FwngoF/mCZa3Bx+33fUZvOEE635Q==
dependencies:
"@types/lodash" "*"

"@types/lodash.escape@^4.0.6":
version "4.0.6"
resolved "https://registry.yarnpkg.com/@types/lodash.escape/-/lodash.escape-4.0.6.tgz#71730c1a27bb5ac7f98f88d5e858fa4ad2df1106"
Expand Down Expand Up @@ -2822,7 +2815,7 @@
resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.1.6.tgz#f4b1efa784e8db479cdb8b14403e2144b1e9ff03"
integrity sha512-6gOkRe7OIioWAXfnO/2lFiv+SJichKVSys1mSsgyrYHSEjk8Ctv4tSR/Odvnu+HWlH2C8j53dahU03XmQdd5fA==

"@types/prop-types@*", "@types/prop-types@^15.7.3":
"@types/prop-types@*", "@types/prop-types@^15.7.4":
version "15.7.4"
resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.4.tgz#fcf7205c25dff795ee79af1e30da2c9790808f11"
integrity sha512-rZ5drC/jWjrArrS8BR6SIr4cWpW09RNTYt9AMZo3Jwwif+iacXAqgVjm0B0Bv/S1jhDXKHqRVNCbACkJ89RAnQ==
Expand Down Expand Up @@ -4354,7 +4347,7 @@ collection-visit@^1.0.0:
map-visit "^1.0.0"
object-visit "^1.0.0"

color-convert@^1.9.0, color-convert@^1.9.1:
color-convert@^1.9.0, color-convert@^1.9.3:
version "1.9.3"
resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8"
integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==
Expand All @@ -4378,10 +4371,10 @@ color-name@^1.0.0, color-name@~1.1.4:
resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2"
integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==

color-string@^1.5.4:
version "1.5.5"
resolved "https://registry.yarnpkg.com/color-string/-/color-string-1.5.5.tgz#65474a8f0e7439625f3d27a6a19d89fc45223014"
integrity sha512-jgIoum0OfQfq9Whcfc2z/VhCNcmQjWbey6qBX0vqt7YICflUmBCh9E9CiQD5GSJ+Uehixm3NUwHVhqUAWRivZg==
color-string@^1.6.0:
version "1.9.0"
resolved "https://registry.yarnpkg.com/color-string/-/color-string-1.9.0.tgz#63b6ebd1bec11999d1df3a79a7569451ac2be8aa"
integrity sha512-9Mrz2AQLefkH1UvASKj6v6hj/7eWgjnT/cVsR8CumieLoT+g900exWeNogqtweI8dxloXN9BDQTYro1oWu/5CQ==
dependencies:
color-name "^1.0.0"
simple-swizzle "^0.2.2"
Expand All @@ -4391,8 +4384,8 @@ color@^3.2.1:
resolved "https://registry.yarnpkg.com/color/-/color-3.2.1.tgz#3544dc198caf4490c3ecc9a790b54fe9ff45e164"
integrity sha512-aBl7dZI9ENN6fUGC7mWpMTPNHmWUSNan9tuWN6ahh5ZLNk9baLJOnSMlrQkHcrfFgz2/RigjUVAjdx36VcemKA==
dependencies:
color-convert "^1.9.1"
color-string "^1.5.4"
color-convert "^1.9.3"
color-string "^1.6.0"

colord@^2.9.2:
version "2.9.2"
Expand Down Expand Up @@ -10885,10 +10878,10 @@ react-base16-styling@^0.9.1:
dependencies:
"@babel/runtime" "^7.16.7"
"@types/base16" "^1.0.2"
"@types/lodash.curry" "^4.1.6"
"@types/lodash" "^4.14.178"
base16 "^1.0.0"
color "^3.1.2"
csstype "^3.0.2"
color "^3.2.1"
csstype "^3.0.10"
lodash.curry "^4.1.1"

react-dom@^17.0.1:
Expand Down Expand Up @@ -11692,9 +11685,9 @@ simple-concat@^1.0.0:
integrity sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==

simple-get@^3.0.3:
version "3.1.0"
resolved "https://registry.yarnpkg.com/simple-get/-/simple-get-3.1.0.tgz#b45be062435e50d159540b576202ceec40b9c6b3"
integrity sha512-bCR6cP+aTdScaQCnQKbPKtJOKDp/hj9EDLJo3Nw4y1QksqaovlW/bnptB6/c1e+qmNIDHRK+oXFDdEqBT8WzUA==
version "3.1.1"
resolved "https://registry.yarnpkg.com/simple-get/-/simple-get-3.1.1.tgz#cc7ba77cfbe761036fbfce3d021af25fc5584d55"
integrity sha512-CQ5LTKGfCpvE1K0n2us+kuMPbk/q0EKl82s4aheV9oXjFEz6W/Y7oQFVJuU6QG77hRT4Ghb5RURteF5vnWjupA==
dependencies:
decompress-response "^4.2.0"
once "^1.3.1"
Expand Down

0 comments on commit 5cd6fe2

Please sign in to comment.