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

Fix overflowing instructions and horizontal scrolling #10238

Merged
merged 3 commits into from
Oct 21, 2024

Conversation

thsparks
Copy link
Contributor

@thsparks thsparks commented Oct 18, 2024

Fixes https://github.com/microsoft/pxt-minecraft/issues/2601
Fixes https://github.com/microsoft/pxt-minecraft/issues/2603

In commit a7e5cde, I changed the height of the tutorial card to "auto" instead of a fixed value, and that meant the child (with height 100%) started overflowing when it exceeded the size of the parent. To fix this, I just set a max height on the child that's tied to the max height of the parent - basically the same setup we have for when the instructions are minimized, just at a bigger size.

I also made it so code snippets can wrap on spaces. There are some long-ish lines of code (or code-like) snippets in the Minecraft HOC tutorial, and they can cause horizontal scrolling on small widths, since code snippets are currently set to not wrap (for example, ||hoc:HeadWear, MidWear, and LowerWear|| in costume_python_activity3.md). I think it's okay to break these on spaces, at the very least.

Lastly, I moved the "Show More"/"Less..." toggle down just a smidge since it was overlapping the text.

image
image

… that does not wrap, which causes it to overflow. For this, I think it's okay to break on spaces (though still not mid-word).
@thsparks thsparks requested a review from a team October 18, 2024 22:37
Copy link
Contributor

@srietkerk srietkerk left a comment

Choose a reason for hiding this comment

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

Nice!

@thsparks thsparks merged commit c87cb26 into master Oct 21, 2024
7 checks passed
@thsparks thsparks deleted the thsparks/mc/fix_overflowing_instructions branch October 21, 2024 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants