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 editor scrolling on Code Bridge #58738

Merged
merged 5 commits into from
May 21, 2024
Merged

Conversation

molly-moen
Copy link
Contributor

This PR makes it so the Code Bridge editor scrolls horizontally and vertically. Currently on Python Lab you can see both scroll bars (if the content is bigger than the bounding box), and in Web Lab 2 you can see both if you are in "vertical layout". If you are in horizontal layout on Web Lab 2 you can see the vertical scrollbar, and the editor scrolls horizontally, but the scrollbar seems to be off the bottom of the screen. I tried to fix this for a bit but couldn't figure it out. Since Web lab 2 isn't the priority right now and it has some extra stuff we need to eventually get rid of (the layout buttons at the top), I left it in that state for now.

As part of this I also added a 1px gap between the columns/rows in the grid layout. I was trying to fix the scroll bar issue on web lab 2, but this is something we will want to get closer to the figma so I left it in.

This PR also has the side benefit of a little Java Lab fix. Java Lab scrolled horizontally and vertically, but you could only see the horizontal scroll bar if you were scrolled to the bottom of the file. Now you can always see it.

Screen shots

Python Lab

Screenshot 2024-05-17 at 3 36 14 PM The scroll bar is there, but it's hidden by the teacher panel. Another thing to think about with the teacher panel.

Web Lab 2, vertical layout

Screenshot 2024-05-17 at 3 36 25 PM

Web Lab 2, horizontal layout

Screenshot 2024-05-17 at 3 36 32 PM

Links

Testing story

Tested locally

PR Checklist:

  • Tests provide adequate coverage
  • Privacy and Security impacts have been assessed
  • Code is well-commented
  • New features are translatable or updates will not break translations
  • Relevant documentation has been added or updated
  • User impact is well-understood and desirable
  • Pull Request is labeled appropriately
  • Follow-up work items (including potential tech debt) are tracked and linked

@molly-moen molly-moen requested review from thomasoniii and a team May 17, 2024 22:38
@@ -15,18 +15,6 @@
min-height: 390px;
}

.cm-gutters {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I moved these to application.scss so they could be reused for Code Bridge. These are codemirror-specific selectors.

Copy link
Contributor

@thomasoniii thomasoniii left a comment

Choose a reason for hiding this comment

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

lgtm 🚀

Copy link
Contributor

@mikeharv mikeharv left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@molly-moen molly-moen merged commit 756201b into staging May 21, 2024
2 checks passed
@molly-moen molly-moen deleted the molly/codebridge-editor-scroll branch May 21, 2024 20:00
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.

None yet

3 participants