Skip to content

Commit 08067fc

Browse files
committed
Fix context-menu and documents
1 parent e5b003d commit 08067fc

File tree

26 files changed

+52
-57
lines changed

26 files changed

+52
-57
lines changed

command-palette/ui-tests/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jlpm run build:prod
1919
2. Execute the docker stack in the example folder:
2020

2121
```
22-
docker-compose -f ../end-to-end-tests/docker-compose.yml --env-file ./ui-tests/.env build
22+
docker-compose -f ../end-to-end-tests/docker-compose.yml --env-file ./ui-tests/.env build --no-cache
2323
docker-compose -f ../end-to-end-tests/docker-compose.yml --env-file ./ui-tests/.env run --rm e2e
2424
docker-compose -f ../end-to-end-tests/docker-compose.yml --env-file ./ui-tests/.env down
2525
```
@@ -107,7 +107,7 @@ docker-compose -f ../end-to-end-tests/docker-compose.yml --env-file ./ui-tests/.
107107
jupyter lab --ServerApp.token= --ServerApp.password=
108108
```
109109

110-
3. Launch the code generator tool:
110+
3. Launch the debug tool:
111111

112112
```
113113
cd ui-tests

commands/ui-tests/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jlpm run build:prod
1919
2. Execute the docker stack in the example folder:
2020

2121
```
22-
docker-compose -f ../end-to-end-tests/docker-compose.yml --env-file ./ui-tests/.env build
22+
docker-compose -f ../end-to-end-tests/docker-compose.yml --env-file ./ui-tests/.env build --no-cache
2323
docker-compose -f ../end-to-end-tests/docker-compose.yml --env-file ./ui-tests/.env run --rm e2e
2424
docker-compose -f ../end-to-end-tests/docker-compose.yml --env-file ./ui-tests/.env down
2525
```
@@ -107,7 +107,7 @@ docker-compose -f ../end-to-end-tests/docker-compose.yml --env-file ./ui-tests/.
107107
jupyter lab --ServerApp.token= --ServerApp.password=
108108
```
109109

110-
3. Launch the code generator tool:
110+
3. Launch the debug tool:
111111

112112
```
113113
cd ui-tests

completer/ui-tests/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jlpm run build:prod
1919
2. Execute the docker stack in the example folder:
2020

2121
```
22-
docker-compose -f ../end-to-end-tests/docker-compose.yml --env-file ./ui-tests/.env build
22+
docker-compose -f ../end-to-end-tests/docker-compose.yml --env-file ./ui-tests/.env build --no-cache
2323
docker-compose -f ../end-to-end-tests/docker-compose.yml --env-file ./ui-tests/.env run --rm e2e
2424
docker-compose -f ../end-to-end-tests/docker-compose.yml --env-file ./ui-tests/.env down
2525
```
@@ -107,7 +107,7 @@ docker-compose -f ../end-to-end-tests/docker-compose.yml --env-file ./ui-tests/.
107107
jupyter lab --ServerApp.token= --ServerApp.password=
108108
```
109109

110-
3. Launch the code generator tool:
110+
3. Launch the debug tool:
111111

112112
```
113113
cd ui-tests

context-menu/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,15 +69,15 @@ You will need to define a context menu item under the property `context` of the
6969
"context": [
7070
{
7171
"command": "jlab-examples/context-menu:open",
72-
"selector": ".jp-DirListing-item[data-file-type=\"example\"]",
72+
"selector": ".jp-DirListing-item[data-file-type=\"text\"]",
7373
"rank": 0
7474
}
7575
]
7676
},
7777
```
7878
<!-- prettier-ignore-end -->
7979
80-
The `selector` can be any valid [CSS selector](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors). In this case, the first part is the CSS class that identifies the file browser items `.jp-DirListing-item` and the second part `[data-file-type="example"]` is a attribute value to be found on the item; the `data-file-type` attribute is set with the file extension. You can omit the second part to add the command to every file type.
80+
The `selector` can be any valid [CSS selector](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors). In this case, the first part is the CSS class that identifies the file browser items `.jp-DirListing-item` and the second part `[data-file-type="text"]` is a attribute value to be found on the item; the `data-file-type` attribute is set with the file type name or `text` for generic files. You can omit the second part to add the command to every file type.
8181
8282
You can find some of the CSS classes that identify different widgets in JupyterLab in the [developer documentation](https://jupyterlab.readthedocs.io/en/stable/developer/css.html#commonly-used-css-selectors).
8383

context-menu/schema/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"context": [
66
{
77
"command": "jlab-examples/context-menu:open",
8-
"selector": ".jp-DirListing-item[data-file-type=\"example\"]",
8+
"selector": ".jp-DirListing-item[data-file-type=\"text\"]",
99
"rank": 0
1010
}
1111
]

context-menu/ui-tests/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jlpm run build:prod
1919
2. Execute the docker stack in the example folder:
2020

2121
```
22-
docker-compose -f ../end-to-end-tests/docker-compose.yml --env-file ./ui-tests/.env build
22+
docker-compose -f ../end-to-end-tests/docker-compose.yml --env-file ./ui-tests/.env build --no-cache
2323
docker-compose -f ../end-to-end-tests/docker-compose.yml --env-file ./ui-tests/.env run --rm e2e
2424
docker-compose -f ../end-to-end-tests/docker-compose.yml --env-file ./ui-tests/.env down
2525
```
@@ -107,7 +107,7 @@ docker-compose -f ../end-to-end-tests/docker-compose.yml --env-file ./ui-tests/.
107107
jupyter lab --ServerApp.token= --ServerApp.password=
108108
```
109109

110-
3. Launch the code generator tool:
110+
3. Launch the debug tool:
111111

112112
```
113113
cd ui-tests

context-menu/ui-tests/tests/context-menu.spec.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,7 @@ test('should have new context menu for example files', async ({ page }) => {
3535
await page.press('input.jp-DirListing-editor', 'Enter');
3636

3737
// Wait for the data attribute to be set
38-
let resolveImmediate;
39-
const waitForImmediate = new Promise((resolve) => {
40-
resolveImmediate = resolve;
41-
});
42-
setImmediate(() => {
43-
resolveImmediate();
44-
});
45-
await waitForImmediate;
38+
await page.waitForTimeout(200);
4639

4740
// Click [aria-label="File Browser Section"] >> text=test.example
4841
await page.click('[aria-label="File Browser Section"] >> text=test.example', {

custom-log-console/ui-tests/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jlpm run build:prod
1919
2. Execute the docker stack in the example folder:
2020

2121
```
22-
docker-compose -f ../end-to-end-tests/docker-compose.yml --env-file ./ui-tests/.env build
22+
docker-compose -f ../end-to-end-tests/docker-compose.yml --env-file ./ui-tests/.env build --no-cache
2323
docker-compose -f ../end-to-end-tests/docker-compose.yml --env-file ./ui-tests/.env run --rm e2e
2424
docker-compose -f ../end-to-end-tests/docker-compose.yml --env-file ./ui-tests/.env down
2525
```
@@ -107,7 +107,7 @@ docker-compose -f ../end-to-end-tests/docker-compose.yml --env-file ./ui-tests/.
107107
jupyter lab --ServerApp.token= --ServerApp.password=
108108
```
109109

110-
3. Launch the code generator tool:
110+
3. Launch the debug tool:
111111

112112
```
113113
cd ui-tests

datagrid/ui-tests/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jlpm run build:prod
1919
2. Execute the docker stack in the example folder:
2020

2121
```
22-
docker-compose -f ../end-to-end-tests/docker-compose.yml --env-file ./ui-tests/.env build
22+
docker-compose -f ../end-to-end-tests/docker-compose.yml --env-file ./ui-tests/.env build --no-cache
2323
docker-compose -f ../end-to-end-tests/docker-compose.yml --env-file ./ui-tests/.env run --rm e2e
2424
docker-compose -f ../end-to-end-tests/docker-compose.yml --env-file ./ui-tests/.env down
2525
```
@@ -107,7 +107,7 @@ docker-compose -f ../end-to-end-tests/docker-compose.yml --env-file ./ui-tests/.
107107
jupyter lab --ServerApp.token= --ServerApp.password=
108108
```
109109

110-
3. Launch the code generator tool:
110+
3. Launch the debug tool:
111111

112112
```
113113
cd ui-tests

documents/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ At the same time, you need to implement the method `createNew`. The `DocumentMan
5656
5757
<!-- prettier-ignore-start -->
5858
```ts
59-
// src/factory.ts#L100-L102
59+
// src/factory.ts#L109-L111
6060

6161
createNew(languagePreference?: string, modelDB?: IModelDB): ExampleDocModel {
6262
return new ExampleDocModel(languagePreference, modelDB);
@@ -157,7 +157,7 @@ To create a new shared object, you have to use the `ydoc`. The new attribute wil
157157

158158
<!-- prettier-ignore-start -->
159159
```ts
160-
// src/model.ts#L327-L328
160+
// src/model.ts#L340-L341
161161

162162
this._content = this.ydoc.getMap('content');
163163
this._content.observe(this._contentObserver);
@@ -168,15 +168,15 @@ To access the information about the different users connected, you can use the `
168168

169169
<!-- prettier-ignore-start -->
170170
```ts
171-
// src/model.ts#L261-L261
171+
// src/model.ts#L279-L279
172172

173173
this.sharedModel.awareness.setLocalStateField('mouse', pos);
174174
```
175175
<!-- prettier-ignore-end -->
176176

177177
<!-- prettier-ignore-start -->
178178
```ts
179-
// src/model.ts#L289-L289
179+
// src/model.ts#L302-L302
180180

181181
const clients = this.sharedModel.awareness.getStates();
182182
```
@@ -194,7 +194,7 @@ Every time you modify a shared property, this property triggers an event in all
194194

195195
<!-- prettier-ignore-start -->
196196
```ts
197-
// src/model.ts#L167-L170
197+
// src/model.ts#L183-L186
198198

199199
this.sharedModel.transact(() => {
200200
this.sharedModel.setContent('position', { x: obj.x, y: obj.y });

0 commit comments

Comments
 (0)