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

400% Zoom screen usability enhancements - Updated #14766

Closed

Conversation

j264415
Copy link
Contributor

@j264415 j264415 commented Jun 28, 2023

Opened new PR to fix merge conflict that was causing #14626 test to fail but PR ended up being closed when syncing branch.
This new PR has all the changes of #14626 plus the changes asked for by @krassowski.

References

#14626 400% Zoom screen usability enhancements
#10004 Full low Vision Support (400% Zoom) (Mobile/Tablet-Responsive Support)

Code changes

Changed padding and spacing to use min CSS function alongside vh (viewport-height) and vw(viewport-width) to reduce proportional spacing at high zoom and increase useful screen real estate usage.

User-facing changes

Currently with the 400% zoom at 1280px the help main menu bar does not appear and within the file-browser tab bar only half of one 'dir-listing' shows up.
The changes I have made now allows for the help dropdown to be shown in the main menu. I found that when trying to check the changes the sidebar 'Extension Manger' disappears from view, so this was also changes so that users that needs this implemented would be able to have access to it without zooming back out. Furthermore, within the file-browser tab, users would now be able to see least 2 notebook directory listed below than before.

Updated changes with this new PR:
The before changes meant the the UI was cutting off the menu on 100% zoom.
These are the changes made from the feedback changes the UI but at the point where it matters. These means that when returned to a 100% zoom menu back will not be cut off anymore and sidebar spacing will be fixed.

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

@j264415
Copy link
Contributor Author

j264415 commented Jun 29, 2023

please update galata snapshots

@j264415
Copy link
Contributor Author

j264415 commented Jun 29, 2023

please update documentation snapshots

@github-actions
Copy link
Contributor

Documentation snapshots updated.

@github-actions
Copy link
Contributor

Galata snapshots updated.

@j264415
Copy link
Contributor Author

j264415 commented Jun 30, 2023

@krassowski Please review and comment.

@j264415
Copy link
Contributor Author

j264415 commented Aug 2, 2023

Please could this PR be reviewed
@krassowski

Copy link
Contributor

@gabalafou gabalafou left a comment

Choose a reason for hiding this comment

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

This seems like a brilliant solution to making the UI denser at high zoom. Thank you! and apologies for taking so long to getting around to reviewing.

I reviewed all of the places where the CSS was changed and checked how the corresponding UI behaved. It looks good to me.

The only negative I could find is that this PR probably introduces some small alignment bugs at narrow width, narrow height and high zoom. (I found one having to do with filebrowser checkboxes, for example.) But I feel like these small alignment bugs can be fixed in subsequent PRs and shouldn't hold back this PR, since in my opinion it improves the usability of the UI at high zoom without seemingly degrading anything at typical zoom and viewport dimensions.

I left a couple of inline code comments.

I feel unqualified to review the following changes in this PR:

  • stylelint disable directives
  • snapshots

I did not carefully test this across browsers and systems. I tested carefully with Chrome on my Mac, and I looked at the changes briefly in Firefox and Safari.

@@ -31,7 +31,8 @@
}

.lm-MenuBar-item {
padding: 0 8px;
/* stylelint-disable-next-line csstree/validator */
padding: 0 min(calc(1.17vw - 2px), 8px);
Copy link
Contributor

Choose a reason for hiding this comment

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

Just out of curiosity, why is this calc needed here? It's the only line that uses calc and I'm not exactly sure why. If I change it to min(1.17vw, 8px), it seems to work just fine.

Copy link
Contributor Author

@j264415 j264415 Aug 21, 2023

Choose a reason for hiding this comment

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

Hi @gabalafou the calc was added to this part of code because from the previous PR (#14626) @krassowski commented that the before changes meant the the UI was cutting off the menu on 100% zoom. So calc was added to fix this issue.

Copy link
Contributor

Choose a reason for hiding this comment

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

If what this line does, specifically the - 2px part, cannot be explained, then I think it should be simplified. Or there should be some comment that explains what process was used to come up with these values.

At the moment, I really can't understand why the calc expression is needed. If you do min(1.2vw, 8px), then the screen width has to drop to 666px before anything changes—because 0.012 * 666 < 8.

Here is a screenshot showing that there's nothing wrong with the menu bar when I load this PR via GitPod and use Chrome Dev Tools to change the padding value to 0 min(1.2vw, 8px):

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @gabalafou I have made the changes yo have recommend about taking out the calc from the padding. Please have a look, at the recent commit for the changes.

packages/application/style/sidepanel.css Outdated Show resolved Hide resolved
@j264415 j264415 requested a review from gabalafou August 24, 2023 09:04
Copy link
Contributor

@gabalafou gabalafou left a comment

Choose a reason for hiding this comment

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

Hi, I left a follow-up comment about the calc() expression. I don't think it's needed.

As I mentioned previously, it's outside of my knowledge of the repo to be able to review the snapshops or stylelint lines. We'll need to get somebody else to finish reviewing this PR.

@@ -31,7 +31,8 @@
}

.lm-MenuBar-item {
padding: 0 8px;
/* stylelint-disable-next-line csstree/validator */
padding: 0 min(calc(1.17vw - 2px), 8px);
Copy link
Contributor

Choose a reason for hiding this comment

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

If what this line does, specifically the - 2px part, cannot be explained, then I think it should be simplified. Or there should be some comment that explains what process was used to come up with these values.

At the moment, I really can't understand why the calc expression is needed. If you do min(1.2vw, 8px), then the screen width has to drop to 666px before anything changes—because 0.012 * 666 < 8.

Here is a screenshot showing that there's nothing wrong with the menu bar when I load this PR via GitPod and use Chrome Dev Tools to change the padding value to 0 min(1.2vw, 8px):

@j264415
Copy link
Contributor Author

j264415 commented Sep 4, 2023

please update galata snapshot

@j264415
Copy link
Contributor Author

j264415 commented Sep 4, 2023

please update documentation snapshots

@github-actions
Copy link
Contributor

github-actions bot commented Sep 4, 2023

Documentation snapshots updated.

@j264415
Copy link
Contributor Author

j264415 commented Sep 13, 2023

@krassowski Please could you review this PR

@j264415
Copy link
Contributor Author

j264415 commented Sep 13, 2023

please update galata snapshot

@j264415
Copy link
Contributor Author

j264415 commented Sep 13, 2023

please update documentation snapshots

@github-actions
Copy link
Contributor

Documentation snapshots updated.

@j264415
Copy link
Contributor Author

j264415 commented Sep 15, 2023

please update galata snapshots

@j264415
Copy link
Contributor Author

j264415 commented Feb 28, 2024

please update galata snapshots

Copy link
Contributor

Galata snapshots updated.

@j264415
Copy link
Contributor Author

j264415 commented Mar 4, 2024

please update galata snapshots

Copy link
Contributor

github-actions bot commented Mar 4, 2024

Galata snapshots updated.

@j264415
Copy link
Contributor Author

j264415 commented Mar 13, 2024

please update galata snapshots

Copy link
Contributor

Galata snapshots updated.

@j264415
Copy link
Contributor Author

j264415 commented Mar 13, 2024

please update galata snapshots

Copy link
Contributor

Galata snapshots updated.

@krassowski krassowski modified the milestones: 4.2.0, 4.3.0 May 7, 2024
@JasonWeill
Copy link
Contributor

As discussed at the frontends meeting, we're not ready to merge this change in, due to its unintended side effects on UI layout and its conflicts with intermediate changes. Closing this PR; we will consider other PRs affecting #10004, particularly if they are small in scope and with little noticeable side effects.

@JasonWeill JasonWeill closed this Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants