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

render width seems too low on wide monitor #42

Open
ceedubs opened this issue Sep 16, 2022 · 4 comments
Open

render width seems too low on wide monitor #42

ceedubs opened this issue Sep 16, 2022 · 4 comments
Assignees

Comments

@ceedubs
Copy link

ceedubs commented Sep 16, 2022

I'm using a 24 inch display, and the render width of code/docs on share seems a lot smaller than I would expect. For example, see how the type signature is cut off even though I have close to half of my screen still available on the right.

I believe that unisonweb/unison#3407 is the reason that the signature gets cut off, but I don't think that it explains why the UI is trying to give me such a small renderWidth.

Screen Shot 2022-09-16 at 2 56 37 PM

@hojberg
Copy link
Member

hojberg commented Sep 16, 2022

There's a couple of reasons for this, both UX wise and technical, and a good solution isn't completely obvious.

  1. There's a lot of screen sizes Share can be viewed at. Some people like a split view on a small laptop, some folks read on their phones via a link from twitter etc, and some view things in full on a laptop and some in full on a very wide monitor. Currently we slot into 4 different screen width categories (based on other design systems like GitHub Primer and Tailwind CSS). Check out the size details in viewport.css

  2. There are other plans for the space on the right that adds a limiting factor, like split views, or a right hand side pane for dependencies or authors of the currently selected definition.

  3. Reading documentation on a wide screen that goes edge to edge makes for a terrible reading experience. Having code go wide, but the docs below render at different width is going to look quite odd.

  4. Code is rendered on the server. We can ask for it to be rendered in a certain width, but given the many sizes we encounter and the fact that folks can resize their browser at any time, re-rendering by going to the server when the window is resized is going to be pretty involved to get right. We could decide a render width based on initial window size and have people refresh to force a new width, but currently that would mean that all by the currently selected definition is lost.

Anyway thats a bit of a longwinded way of saying that we definitely want to see improvements in this area, but there are a lot of considerations in play, making this a less than straight forward effort.

@ceedubs
Copy link
Author

ceedubs commented Sep 19, 2022

@hojberg thank you for the detailed response. It is indeed trickier than I realized. Hopefully when unisonweb/unison#3407 is merged it will look considerably better.

I'm really excited for a split view!

@hojberg hojberg added needs-ui-design snooze-2 Issue is likely to be worked on, might become "on-deck" in the next month or so labels Oct 18, 2022
@dolio dolio removed the snooze-2 Issue is likely to be worked on, might become "on-deck" in the next month or so label Jan 12, 2023
@andreystepanov
Copy link
Contributor

Seems like this no longer an issue, so it can be closed.

https://share.unison-lang.org/@unison/base/code/releases/2.12.0/latest/terms/data/Stream/%2B%2B

shot-2024-01-25-at-21-06-20--area

@hojberg hojberg closed this as completed Apr 4, 2024
@ceedubs
Copy link
Author

ceedubs commented Apr 5, 2024

Hmm is this browser dependent? For me (on Firefox) it behaves nicely until it pops open the navigation pane on the left and then it stops expanding the code render width.

Screencast.from.2024-04-05.10-04-19.webm

@ceedubs ceedubs reopened this Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants