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

Conversation

unlock21
Copy link

@unlock21 unlock21 commented Oct 4, 2023

#21145

Ignore Code Cells being applied with Markdown Cell specific behavior around the horizontal scrollbar.

The scrollbar is already there, just opacity was set to 0.

Before:
image

After:
image

@Charles-Gagnon Charles-Gagnon requested review from corivera, chlafreniere and a team and removed request for corivera and chlafreniere October 4, 2023 15:31
@@ -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!

@Charles-Gagnon Charles-Gagnon requested review from VasuBhog and a team October 4, 2023 15:42
@chlafreniere
Copy link
Contributor

@corivera would you mind taking a look at this branch and validating that changes here look good?

@corivera
Copy link
Member

corivera commented Oct 5, 2023

Sure

@kburtram
Copy link
Member

kburtram commented Jul 9, 2024

@corivera have you had a chance to look at this PR? Do you think this is something we should merge?

@corivera
Copy link
Member

@kburtram The PR is a year old, so someone would have to investigate whether the changes still work as intended.

@kburtram
Copy link
Member

I'm going to close this as abandoned since I don't have anyone available to verify this won't regress other notebooks scenarios, and the notebook dev team hasn't been able to verify & merge in the past year.

@kburtram kburtram closed this Jul 11, 2024
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.

6 participants