Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix top bar visibility not picking up settings overrides (#6833)#6836

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
jtpio merged 1 commit intojupyter:mainfromyumyumqing:top-setting-overrides
May 3, 2023

Conversation

@yumyumqing
Copy link
Contributor

@yumyumqingyumyumqing commentedApr 6, 2023
edited
Loading

  • The header part reflects both user preference and default settings overrides.
  • Toggle 'Show Header' turns off the automatic adjustment.
  • Before this commit behavior:
    • Automatically adjust header visibility to screen size at first
    • If manually check/uncheck thevisible box in the settings editor,not automatically adjust header visibility.
    • If manually toggleShow Header in menu->view,not automatically adjust header visibility.
    • If overrides default settings at runtime, it doesn't reflect on the UI.
  • After this commit behavior:
    • Automatically adjust header visibility to screen size at first
    • If manuallyuncheck theadjustToScreen box in the settings editor,not automatically adjust header visibility.
    • If manually toggleShow Header in menu->view,not automatically adjust header visibility.
    • If overrides default settings at runtime, it does reflect on the UI.
  • Related issue:Header part not reflecting Jupyter Notebook Top Area default setting #6833

@github-actions
Copy link
Contributor

Binder 👈 Launch a Binder on branchyumyumqing/notebook/top-setting-overrides

@yumyumqing
Copy link
ContributorAuthor

Here are some expected behaviors in different cases:

No default settings override + no user preference override:

  • This is the same as the earlier default behavior.

  • Some key variables output:

    [TOP]: visible/composite => true
    [TOP]: visible/user => undefined
    [TOP]: setHidden => false
    [TOP]: adjustToScreen/composite => true
    [TOP]: adjustToScreen/user => undefined
    [TOP]: noAdjust => false

  • Behavior:

    • 2 boxes both checked with noRestore to Defaults link.
      Screenshot 2023-04-06 at 10 06 38 PM

    • adjustToScreen setting overrides thevisible setting, with the headershowing on large screen andnot showing on small screen.
      Screenshot 2023-04-06 at 10 07 09 PM
      Screenshot 2023-04-06 at 10 07 26 PM

Default settings override: visible -> false, adjustToScreen -> false + no user preference override:

  • Some key variables output:

    [TOP]: visible/composite => false
    [TOP]: visible/user => undefined
    [TOP]: setHidden => true
    [TOP]: adjustToScreen/composite => false
    [TOP]: adjustToScreen/user => undefined
    [TOP]: noAdjust => true

  • Behavior:

    • 2 boxes both not checked with noRestore to Defaults link.
      Screenshot 2023-04-06 at 10 12 31 PM

    • Not automatically adjusting the header visibility, the header isnot showing on large or small screen.
      Screenshot 2023-04-06 at 10 12 49 PM
      Screenshot 2023-04-06 at 10 13 02 PM

(Some other cases, eliminating the outputs and screenshots for easier read.)

  1. Default settings override:adjustToScreen -> false + no user preference override
    • 1 box checked and 1 not checked with noRestore to Defaults link.
    • Not automatically adjusting the header visibility, the header isshowing on large and small screen.
  2. No default settings override + user preference override:visible -> false,adjustToScreen -> false
    • Both boxesnot checked with aRestore to Defaults link.
    • Not automatically adjusting the header visibility, the header isnot showing on large or small screen.
  3. No default settings override + user preference override:adjustToScreen -> false
    • 1 boxchecked and 1 boxnot checked with aRestore to Defaults link.
    • Not automatically adjusting the header visibility, the header isshowing on large and small screen.
  4. More other cases not listed here.

@jtpiojtpio added the bug labelApr 7, 2023
@jtpiojtpio added this to the7.0 milestoneApr 7, 2023
@yumyumqingyumyumqing marked this pull request as ready for reviewApril 11, 2023 07:55
@jtpiojtpio self-requested a reviewApril 12, 2023 08:27
@yumyumqing
Copy link
ContributorAuthor

Hi@jtpio just a friendly reminder on this PR :) Have you looked at it and/or is there anything I need to add? Thanks!

@jtpio
Copy link
Member

@yumyumqing sorry for the late reply!

It looks good on Binder and should indeed fix the main usability issue reported in#6833.

Looking at the code and the new setting I was wondering if there was a way to combine the two options into a single one. But maybe it's simpler and more explicit to keep the two options separated.

@yumyumqing
Copy link
ContributorAuthor

Hi@jtpio thanks for your response!

If we would like to keep the exact same old variables as before to keep users' current overriding files work, I couldn't think of a better way to merge it in 1 variable.
But if we are willing to break some of the current behavior, I think we can turnTopBarVisibility into a string variable, and then user can inputyes for always showing,no for always not showing,automatic for adjusting to size. And we can default toautomatic to match the current default behavior.

Do you have any advice on that? Thanks!

@jtpio
Copy link
Member

I think we can turnTopBarVisibility into a string variable, and then user can inputyes for always showing,no for always not showing,automatic for adjusting to size. And we can default toautomatic to match the current default behavior.

That sounds like a good idea. JupyterLab usesenums like the one proposed here for some settings. It's probably fine to "break" the current behavior now since it's a beta, and details like this one are still subject to changes. We can also add an more visible comment in the changelog afterwards to highlight this if needed.

yumyumqing reacted with thumbs up emoji

@yumyumqingyumyumqingforce-pushed thetop-setting-overrides branch from40e7deb to6604839CompareMay 2, 2023 08:49
    * Make 'visible' enum type and pick up both default and user      settings.
@yumyumqingyumyumqingforce-pushed thetop-setting-overrides branch from6604839 to8cdcd9bCompareMay 2, 2023 15:25
@yumyumqing
Copy link
ContributorAuthor

Hi@jtpio I have updated the PR according to our discussion. Could you please help take a look? Thanks a lot!

Copy link
Member

@jtpiojtpio left a comment

Choose a reason for hiding this comment

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

Thanks!

@jtpiojtpio merged commit22b5f14 intojupyter:mainMay 3, 2023
@github-actionsgithub-actionsbot locked asresolvedand limited conversation to collaboratorsMay 3, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

@jtpiojtpiojtpio approved these changes

Assignees

@yumyumqingyumyumqing

Labels

Projects

None yet

Milestone

7.0

Development

Successfully merging this pull request may close these issues.

2 participants

@yumyumqing@jtpio

[8]ページ先頭

©2009-2025 Movatter.jp