GDQuest / learn-gdscript

Learn Godot's GDScript programming language from zero, right in your browser, for free.
https://gdquest.github.io/learn-gdscript/
Other
2.07k stars 153 forks source link

Lesson 14, unnecessary scroll bar #239

Closed duianto closed 2 years ago

duianto commented 2 years ago

Describe the bug

In lesson 14: https://gdquest.github.io/learn-gdscript/staging/#course/lesson-14-multiplying/lesson.tres

A code snippet container has a scroll bar:

func level_up():
    level += 1
    max_health += 5

Scrolling the mouse wheel on the container, scrolls both the container and the page.

The container's scroll bar seems to be unnecessary, because all three lines are visible without scrolling.

Scrolling down just shows an empty area with a height of about two lines.

To Reproduce Steps to reproduce the bug:

  1. Open the page: https://gdquest.github.io/learn-gdscript/staging/#course/lesson-14-multiplying/lesson.tres
  2. Scroll down to about the middle of the page
  3. See the code snippet:
    func level_up():
    level += 1
    max_health += 5
  4. Move the mouse pointer over the code snippet, and turn the mouse wheel

Expected behavior

Only the inner scroll bar should scroll when the mouse pointer is over an inner container. The page should only scroll when the mouse pointer is outside an inner container with a scroll bar.

In this case, the inner scroll bar seems to be unnecessary. Because the code snippets, three lines are visible without scrolling.

Observed behavior

Both the inner scroll bar and the page scrolls.

Screenshots

https://user-images.githubusercontent.com/13420573/152043638-0f2c58cf-f395-4e53-b8b5-316dce3832f2.mp4

Information about your device (please complete the following information):

duianto commented 2 years ago

The same thing is observed in lesson 15.

The code snippet container:

7.5 % 3 # Error
7 % 3.5 # Error
7 % 0 # Error

has a scroll bar.

Turning the mouse wheel on the container scrolls both the container and the page.

And scrolling down in the container, doesn't reveal any new lines, only empty space.

johnnygossdev commented 2 years ago

I've increased the minimum size for these visuals. They appear correctly in the editor, so it's hard to judge if we should increase their minimum size when creating them.