Skip to content

Enable nb_scroll_outputs from latest myst-nb#116

Merged
bsipocz merged 1 commit intoCaltech-IPAC:mainfrom
jaladh-singhal:test-nb_scroll_outputs
Jul 15, 2025
Merged

Enable nb_scroll_outputs from latest myst-nb#116
bsipocz merged 1 commit intoCaltech-IPAC:mainfrom
jaladh-singhal:test-nb_scroll_outputs

Conversation

@jaladh-singhal
Copy link
Copy Markdown
Member

@jaladh-singhal jaladh-singhal commented Jul 3, 2025

This PR is just a test for scroll_outputs functionality upcoming from upstream in executablebooks/MyST-NB#683

Fixes #69

Test if the generated webpages have long outputs scrollable (bonus: also test dark mode style fixes that will come soon).

@jaladh-singhal jaladh-singhal requested a review from bsipocz July 3, 2025 13:03
@jaladh-singhal jaladh-singhal self-assigned this Jul 3, 2025
@jaladh-singhal jaladh-singhal added the infrastructure Infrastructure related issues/PRs. label Jul 3, 2025
@bsipocz
Copy link
Copy Markdown
Member

bsipocz commented Jul 3, 2025

Wow, great, I like seeing the repurposed usage of the repo 😄

@bsipocz
Copy link
Copy Markdown
Member

bsipocz commented Jul 3, 2025

Oh, wow, neither astropy table nor mpl support dark mode. You may want to report those or at last astropy as those tables are just not legible at all.

Screen Shot 2025-07-03 at 09 23 35

As for scrolling, it looks great. For some outputs it feels to be an overkill to have the scroller, but one can easily get used to it I think as the overall result is better than it was before.

@jaladh-singhal
Copy link
Copy Markdown
Member Author

Oh, wow, neither astropy table nor mpl support dark mode. You may want to report those or at last astropy as those tables are just not legible at all.

Interesting! It looks different and legible in my browser. Are you using something other than chrome? Or some browser extension interferring?

image

@jaladh-singhal
Copy link
Copy Markdown
Member Author

jaladh-singhal commented Jul 3, 2025

For some outputs it feels to be an overkill to have the scroller, but one can easily get used to it I think as the overall result is better than it was before.

Yes I anticipated this, that's why I wanted irsa-tutorials to build as we have variety of notebook outputs to test. We can technically increase the max-height it gives to output cells, either upstream or by overriding mystnb.css with custom css here in our repo.

Related to this, I also see image/chart outputs are scrollable now - I don't think we want that, images should take full vertical length (right?).
image

I'll refine the logic in my PR. I also see several other issues now that irsa-tutorials have been built. But hey this is exactly the testing I need for this mystnb work - thanks for this awesome CI/CD!

@jaladh-singhal
Copy link
Copy Markdown
Member Author

@bsipocz since I will be making changes there and want to test it in our build here:

  1. Can I trigger the circleci build manually on this PR?
  2. Can I make it only run a handful of notebooks (let's say first 3 in accessing euclid section) because I don't want to wait for ~50 min it takes to run and build all notebooks? Oh or even better, just ask it to not execute notebooks but use cached outputs?

@bsipocz
Copy link
Copy Markdown
Member

bsipocz commented Jul 3, 2025

  • you should be able to retrigger in circleCI, but you need to log in there and do it in circleCI. Your current access level should be enough to be able to do this, but DM me if there are troubles.

  • Unfortunately something is not working correctly with the caching, it works for me locally but it does not seem to work on circleCI which is more than unfortunate. I should have at least an issue floating around about it, maybe more. So the current workaround you could do:

    • try and use a quicker repo, like navo-workshop. But a bunch of those are known to be failing with some heasarc problems, so your CI will never be fully green there.
    • add in a temporarily commit that adds a bunch of notebooks to the nb_execution_excludepatterns in conf.py. Given this PR is mostly a temporarily one that should work well.
    • if you have ideas how to improve CI that would be welcome, currently the HTML build is knowingly not great, and I don't yet see how to improve it besides fixing the caching (we are already rather modular for the actual testing, but the build cannot really be chopped up to pieces)

@bsipocz
Copy link
Copy Markdown
Member

bsipocz commented Jul 3, 2025

ahh, yes, and I use firefox, and normally don't use dark mode and otherwise trying to remember to stay away from webdev as it's such a bottomless rabbit hole :)

[edit: red herring, I was looking at it from my old laptop, it looks OK with newer versions. Even more reasons to stay away from browser work, and also to remember not to do work from that one]

@bsipocz
Copy link
Copy Markdown
Member

bsipocz commented Jul 3, 2025

Related to this, I also see image/chart outputs are scrollable now - I don't think we want that, images should take full vertical length (right?).

Yes, those were the weird ones. However, I can imagine of plotting a humungously big image, and for that we may still want a scroller? I don't know, I suppose one can get used to either approach.

Or, bold idea and way beyond the scope of your current PR, could have something on the left to collaps/expand in/out from the scroller, like we have inside jupyter? I really have no idea how involved it is to add such a UI element.

@jaladh-singhal
Copy link
Copy Markdown
Member Author

Yes, those were the weird ones. However, I can imagine of plotting a humungously big image, and for that we may still want a scroller? I don't know, I suppose one can get used to either approach.

Hmm I think I can hack some CSS for this that allows images to take full height but not beyond viewport height.

Or, bold idea and way beyond the scope of your current PR, could have something on the left to collaps/expand in/out from the scroller, like we have inside jupyter? I really have no idea how involved it is to add such a UI element.

Yes, I so wanted to make this all along, but it's more work because CSS alone can't do it. I'll need to write some JS component that can handle this. I'm saving this for later (as you rightly said "webdev is a bottomless rabbit hole") if our users complaint much about scroll behavior.

@bsipocz
Copy link
Copy Markdown
Member

bsipocz commented Jul 3, 2025

Yes, I so wanted to make this all along, but it's more work because CSS alone can't do it. I'll need to write some JS component that can handle this. I'm saving this for later (as you rightly said "webdev is a bottomless rabbit hole") if our users complaint much about scroll behavior.

I wonder if that could be pulled out from jupyter itself? Not sure which repo that code lives in, but that is a totally relevant question for the mystmd team which has a convenient overlap with jupyter, too as hopefully they will also have some similar scroller config option.

@jaladh-singhal jaladh-singhal force-pushed the test-nb_scroll_outputs branch from 46b81a4 to 8c10376 Compare July 14, 2025 23:31
@jaladh-singhal jaladh-singhal changed the title Test nb_scroll_outputs from myst-nb branch Enable nb_scroll_outputs from latest myst-nb Jul 14, 2025
@jaladh-singhal jaladh-singhal marked this pull request as ready for review July 14, 2025 23:33
Copy link
Copy Markdown
Member

@bsipocz bsipocz left a comment

Choose a reason for hiding this comment

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

Thanks!

@bsipocz bsipocz merged commit eb82efa into Caltech-IPAC:main Jul 15, 2025
6 of 8 checks passed
@jaladh-singhal jaladh-singhal deleted the test-nb_scroll_outputs branch July 15, 2025 00:13
github-actions bot pushed a commit that referenced this pull request Jul 15, 2025
Enable nb_scroll_outputs from latest myst-nb eb82efa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

infrastructure Infrastructure related issues/PRs.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ENH: adding in scrollers for long outputs

2 participants