-
-
Notifications
You must be signed in to change notification settings - Fork 24
Update quantecon-book-theme and Python version for collapse styling fix with scroll positioning improvement #247
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
Conversation
|
@mmcky 👋 This repository doesn't have Copilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs. I can generate a .github/copilot-instructions.md file for you automatically. Click here to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review. |
✅ Deploy Preview for lustrous-melomakarona-3ee73e ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Co-authored-by: mmcky <8263752+mmcky@users.noreply.github.com>
|
@copilot can you update |
The |
|
@copilot sorry can you please update to |
Co-authored-by: mmcky <8263752+mmcky@users.noreply.github.com>
|
|
@copilot when I test the Can you please review and see if we can align with the bottom of the code block after hitting |
Co-authored-by: mmcky <8263752+mmcky@users.noreply.github.com>
I've implemented a fix for the collapse scroll positioning issue. The problem was that the current scroll behavior positioned the collapsed code block too high in the viewport, interrupting reading flow. The fix adds a local JavaScript override that positions the bottom of collapsed code blocks about 30% from the top of the viewport, leaving 70% of the screen showing content below for smooth reading continuation. This should align the collapsed blocks properly for continuous reading as requested. The fix is implemented in commit f9851bf and will be tested in the next CI build. The improved behavior should now scroll to an optimal position that allows readers to continue seamlessly after collapsing code blocks. |
|
@jstac this change fixes and improves our implementation of Here is a demo of its use in It will look like
I am keen to hear your thoughts on:
Note: this also incorporates the new 80 character width for the code-blocks -- so no side scrolling. |
|
This is great @mmcky :-) Perhaps "Expand" needs to be bold? |


This PR updates the development environment to test a fix for collapse styling issues in the quantecon-book-theme and adds a local fix for collapse scroll positioning behavior.
Changes Made:
environment.ymlto install quantecon-book-theme from thecopilot/fix-299branch instead of the fixed PyPI version 0.7.6ci.ymlandenvironment.ymlfor compatibility with the latest themelectures/_static/collapse-fix.js) to improve collapse scroll positioning for better reading continuitylectures/_config.ymlto include the JavaScript fix in the HTML buildBackground:
The quantecon-book-theme had an issue where
collapse-##styling was showing as a scroll bar instead of the expected expand/collapse behavior. A fix has been implemented in QuantEcon/quantecon-book-theme#300 and is available in thecopilot/fix-299branch.Additionally, user feedback revealed that the collapse button was positioning users above the code block instead of aligning with the bottom for continuous reading flow.
Purpose:
This change allows the CI workflow to build a preview using the fixed theme version with Python 3.13, enabling testing of the collapse styling improvements across the lecture content that uses tags like
collapse-20andcollapse-30.The local JavaScript fix addresses the scroll positioning issue by positioning the bottom of collapsed code blocks about 30% from the top of the viewport, leaving 70% of the screen showing content below for smooth reading continuation.
The CI workflow will now install the theme directly from the git repository branch rather than the fixed PyPI version, allowing validation that both the styling fix and scroll positioning improvements work correctly with the existing lecture content.
Fixes #246.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.