popcodeorg / popcode

An HTML/CSS/JavaScript editor for use in the classroom
MIT License
189 stars 140 forks source link

Page title bar overflows and has odd sizing behavior on small and/or zoomed screens #2515

Open arrowtype opened 3 years ago

arrowtype commented 3 years ago

Describe the bug

Take a look at a classroom assignment that has a longish title, on a small or zoomed-in view. The title bar stays a small size (height: 2.4vh;), while the text gets relatively larger, overflowing the header boundaries, and overlapping page content. This is especially a problem if I am zoomed in, as I usually do when presenting code to students over Zoom, because they tend to have smaller screens (often just smartphones).

image

This acts a little differently between Chrome and Safari. On Chrome, the vh-based sizing keeps these elements small, even when the page is zoomed-in. In Safari, these elements increase in size as the page is zoomed. But, even when a non-Safari browser is used at a normal-ish size (say, 1000px wide), problems can easily arise from medium-length titles. Here’s Firefox at 1000px wide:

image

To Reproduce

Enter in a medium-long page title while using popcode in a medium-small viewport – especially while using Safari.

Expected behavior

This title bar would probably make more sense if it acted more like a "tab" in a browser UI.

Here are tabs in Chrome and Safari browsers, to illustrate what I mean:

image

Environment

werner33 commented 1 year ago

I've opened a PR to resolve this issue #2525

Thanks!