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

Ignore Code type cells in horizontalScrollbar #24576

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ export class CodeComponent extends CellView implements OnInit, OnChanges {
horizontalScrollbar.style.top = horizontalTop + 'px';
horizontalScrollbar.style.bottom = '';
}
} else {
} else if (this.cellModel.cellType !== CellTypes.Code) {
// If horizontal scrollbar is not needed then set do not show it
horizontalScrollbar.style.opacity = '0';
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are we even using opacity to hide the scrollbar? I would think display: none would be the better option

@VasuBhog

Copy link
Contributor

Choose a reason for hiding this comment

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

Let's make sure we aren't regressing the scenarios this was originally added for too : #17083

Copy link
Contributor

Choose a reason for hiding this comment

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

One thing to keep in mind is the word wrap setting in all of these code paths

Copy link
Contributor

Choose a reason for hiding this comment

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

I believe that display:none could be used here so that the dom layout would will not need to compute the layout for the horizontal scrollbar. I believe when I was testing all the paths it was much easier to have this change so that I was able to still see the scrollbar in the DOM in order to change it if necessary.

@unlock21 please change to using display instead :)

Copy link
Author

Choose a reason for hiding this comment

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

@VasuBhog changed it to use display.

You all got to this way faster than I'd expected, thank you!

}
Expand Down