Skip to content

Conversation

@echarles
Copy link
Member

References

Fixes #12283

Code changes

Add a setting useJsonEditor in the settingeditor-extension package. If that setting is `true, the advanced json editor is use to edit the settings.

User-facing changes

Untitled4

Backwards-incompatible changes

None.

@jupyterlab-probot
Copy link

Thanks for making a pull request to jupyterlab!
To try out this branch on binder, follow this link: Binder

@echarles echarles changed the title Feat/settings editor last mode Setting to use the advanced setting editor for the settings Apr 25, 2022
@echarles echarles added this to the 4.0 milestone Apr 25, 2022
Copy link
Member

@fcollonval fcollonval left a comment

Choose a reason for hiding this comment

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

I would use an enumeration instead of a boolean as setting; something like

Default settings editor: ['UI', 'json']

@jtpio
Copy link
Member

jtpio commented Apr 26, 2022

Also, is this new option needed? Or could the menu customization via the settings be used to replace the menu entry by "command": "settingeditor:open-json"?

@echarles
Copy link
Member Author

I would use an enumeration instead of a boolean as setting; something like Default settings editor: ['UI', 'json']

Thx @fcollonval. Yes, we can do that.

Also, is this new option needed? Or could the menu customization via the settings be used to replace the menu entry by "command": "settingeditor:open-json"?

Thx @jtpio. With option, are you meaning the new setting, or the new command? I guess you mean the latter. I have thought replacing the menu entry (which is the visual menu show here below) based on the user setting ediotr (ui or json), but I wonder if it is possible to achieve the replace without the full browser refresh. Once the menu is built, is it mutable?

Screenshot 2022-04-26 at 10 23 48

@fcollonval
Copy link
Member

I like a lot the idea of @jtpio - but I think it is nice to still combine it with a boolean settings as menu customization is not easy for the end users.

So to layout the changes needed, you would not add a new command, but extend the open one to receive arguments.

If the argument defines the type of settings editor, use the argument otherwise fallback to the settings value. And I think that for 4.0 it will make sense to drop the command 'settingeditor:open-json'. But when backporting this enhancement we should keep it around.

@echarles
Copy link
Member Author

So to layout the changes needed, you would not add a new command, but extend the open one to receive arguments. If the argument defines the type of settings editor, use the argument otherwise fallback to the settings value. And I think that for 4.0 it will make sense to drop the command 'settingeditor:open-json'. But when backporting this enhancement we should keep it around.

@fcollonval I have implemented your suggestion in my latest commit. Maybe you could have a look and confirm this was the intent. If confirmed, I will then implement your suggestion I would use an enumeration instead of a boolean as setting; something like Default settings editor: ['UI', 'json'].

@echarles
Copy link
Member Author

and I think that for 4.0 it will make sense to drop the command 'settingeditor:open-json'

I have not been able to achieve that as the execution of the open and open-json commands are defined in separated plugins.

Copy link
Member

@fcollonval fcollonval left a comment

Choose a reason for hiding this comment

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

Thanks @echarles yes this is the idea.

@echarles
Copy link
Member Author

check-release fails with subprocess.CalledProcessError: Command 'jupyter-releaser check-links --force' returned non-zero exit status 1. This is not related to this PR

@fcollonval this is ready to be merged.

@echarles
Copy link
Member Author

@fcollonval I have merged with latest master and resolved the conflicts.

@echarles
Copy link
Member Author

Galata is failing on Open the settings editor with a specific search query

I am not familiar with the recent setting search query. I run openUi({ query: '' }); What should I do?

@echarles
Copy link
Member Author

echarles commented May 3, 2022

Did a rebase on latest master and UI test is now green. A few other flows are failing mostly on splice feature but should not berelated to this PR.

@echarles echarles force-pushed the feat/settings-editor-last-mode branch from 63278a0 to 6659cb6 Compare May 3, 2022 07:21
@echarles
Copy link
Member Author

echarles commented May 3, 2022

The UI regression test fails on Extension Manager › Search which is not related to this PR.

@fcollonval I think this is ready to be merged.

@jtpio
Copy link
Member

jtpio commented May 3, 2022

The UI regression test fails on Extension Manager › Search which is not related to this PR.

Yes also noticed in other places: #12340 (comment)

@echarles
Copy link
Member Author

echarles commented May 3, 2022

Just solved recent conflicts with master and CI is still green (exception of the not-revelant Extension Manager › Search).

@echarles
Copy link
Member Author

echarles commented May 4, 2022

@fcollonval @jtpio I have rebased and solved the conflicts. Happy to get your reviews so we can merge and backport.

Copy link
Member

@fcollonval fcollonval left a comment

Choose a reason for hiding this comment

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

Thanks @echarles LGTM

CI failure is not related

@echarles echarles merged commit dc6aceb into jupyterlab:master May 4, 2022
@echarles
Copy link
Member Author

echarles commented May 4, 2022

@meeseeksdev please backport to 3.4.x

@echarles
Copy link
Member Author

echarles commented May 4, 2022

Thx @fcollonval

The backport PR is #12529

@github-actions
Copy link
Contributor

github-actions bot commented May 4, 2022

Benchmark report

The execution time (in milliseconds) are grouped by test file, test type and browser.
For each case, the following values are computed: min <- [1st quartile - median - 3rd quartile] -> max.

The mean relative comparison is computed with 95% confidence.

Results table
Test file large_code_notebook large_md_notebook
open
chromium
actual 14125 <- [14422 - 14607 - 14913] -> 15941 2648 <- [2717 - 2754 - 2785] -> 2976
expected 13693 <- [14157 - 14370 - 14597] -> 15846 2480 <- [2681 - 2711 - 2742] -> 2983
Mean relative change 1.9% ± 0.8% 1.5% ± 0.6%
switch-from
chromium
actual 564 <- [612 - 651 - 731] -> 865 425 <- [449 - 460 - 470] -> 555
expected 568 <- [616 - 634 - 685] -> 862 427 <- [446 - 459 - 469] -> 596
Mean relative change 1.8% ± 3.0% 0.2% ± 1.2%
switch-to
chromium
actual 347 <- [420 - 454 - 468] -> 525 272 <- [294 - 302 - 308] -> 367
expected 383 <- [409 - 450 - 470] -> 515 273 <- [293 - 301 - 309] -> 341
Mean relative change 0.6% ± 2.1% 0.1% ± 1.2%
close
chromium
actual 1030 <- [1085 - 1102 - 1135] -> 1245 469 <- [488 - 501 - 515] -> 578
expected 1047 <- [1082 - 1098 - 1119] -> 1159 466 <- [486 - 496 - 506] -> 573
Mean relative change 1.2% ± 0.9% 1.5% ± 1.2%

Changes are computed with expected as reference.

echarles added a commit that referenced this pull request May 5, 2022
…466-on-3.4.x

Backport PR #12466 on branch 3.4.x (Setting to use the advanced setting editor for the settings)
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Settings editor should remember last mode

3 participants