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

MAINT: upgrade latest build software versions #326

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Conversation

mmcky
Copy link
Contributor

@mmcky mmcky commented Oct 18, 2024

This upgrades the software to the latest versions of jupyter-book including updates to quantecon-book-theme and sphinx-exercise for compatibility.

  • release quantecon-book-theme once bugs fixed
  • release sphinx-exercise once bugs fixed

Copy link

@github-actions github-actions bot temporarily deployed to pull request October 25, 2024 06:55 Inactive
@mmcky
Copy link
Contributor Author

mmcky commented Oct 25, 2024

Current issues with theme

Title Page

  • missing theme formatting line under Title
  • missing the quantecon logo
  • missing Authors information

Current Preview

Screenshot 2024-10-25 at 6 00 59 pm

Current Live Site

Screenshot 2024-10-25 at 6 01 09 pm

@mmcky
Copy link
Contributor Author

mmcky commented Oct 28, 2024

@DrDrij it looks like the variable names may have changed as we upgraded to jupyter-book<1.0 -- as the theme_authors variable in our quantecon_book_theme layout.html file is no longer filling in this section https://github.com/QuantEcon/quantecon-book-theme/blob/90fba30c2c4d7743333c9567bb8ac82b29871c36/src/quantecon_book_theme/theme/quantecon_book_theme/layout.html#L152

any ideas?

@DrDrij
Copy link
Member

DrDrij commented Oct 28, 2024

That's no good. Perhaps we hard code them temporarily?
I will examine further tomorrow afternoon @mmcky

@mmcky
Copy link
Contributor Author

mmcky commented Oct 29, 2024

thanks @DrDrij just not sure how the templates actually get rendered.

@mmcky
Copy link
Contributor Author

mmcky commented Oct 29, 2024

@DrDrij the interesting part is that the html is still there

                        <p class="qe-page__header-authors" font-size="18">
                            
                                
                                    <a href="http://www.tomsargent.com/" target="_blank"><span>Thomas J. Sargent</span></a>
                                
                            
                                
                                    and <a href="https://johnstachurski.net/" target="_blank"><span>John Stachurski</span></a>
                                
                            
                        </p>

but it just isn't showing up on the rendered page

@mmcky
Copy link
Contributor Author

mmcky commented Oct 29, 2024

however in the case of the logo the html is missing

The live site has

                            <p class="logo">
                                
                                    
                                    <a href=https://quantecon.org><img src="_static/qe-logo.png" class="logo logo-img" alt="logo"></a>
                                    
                                    <a href=https://quantecon.org><img src="_static/quantecon-logo-transparent.png" class="dark-logo-img" alt="logo"></a>
                                    
                                    
                                
                            </p>

                            <p class="powered">Powered by <a href="https://jupyterbook.org/">Jupyter Book</a></p>

while this preview build has

                            
                            <p class="logo">
                                
                            </p>

                            <p class="powered">Powered by <a href="https://jupyterbook.org/">Jupyter Book</a></p>

@DrDrij
Copy link
Member

DrDrij commented Oct 30, 2024

Looks like authors is printed out in 2 places, the first instance shows on all other pages except 'main-index':
(https://github.com/QuantEcon/quantecon-book-theme/blob/90fba30c2c4d7743333c9567bb8ac82b29871c36/src/quantecon_book_theme/theme/quantecon_book_theme/layout.html#L152)

image

And the second is appearing in the content area, after the Heading 1 element, so in the content block: (https://github.com/QuantEcon/quantecon-book-theme/blob/90fba30c2c4d7743333c9567bb8ac82b29871c36/src/quantecon_book_theme/theme/quantecon_book_theme/layout.html#L175C30-L175C39)

image

So it means we've lost the author header printing out in the {% block body %} {% endblock %} include.

On further inspection, I see that the theme uses Javascript to move the authors on the homepage to sit in the right place under the Heading 1 (https://github.com/QuantEcon/quantecon-book-theme/blob/90fba30c2c4d7743333c9567bb8ac82b29871c36/src/quantecon_book_theme/assets/scripts/index.js#L380).

How many years ago did I write this? 🙈

So JS is broken somewhere — try to open the left menu or use any of the theme toolbar buttons around the page.

The console gives a little details which indicates we have lost jQuery.

image

It appears that https://671b40f5a93d541ba1e37280--epic-agnesi-957267.netlify.app/_static/scripts/sphinx-book-theme.js isn't loading (404). Has that changed with the new version @mmcky ?

Hope this gives some clue. I can investigate further, interested in your thoughts?

@agoose77
Copy link

@DrDrij @mmcky I'm having conversations in two places! I'll move the chat here.

@DrDrij yes, Sphinx 6 dropped JQuery. The easiest fix is to bundle it with webpack by adding it to your dependencies, importing it in your JS file, and setting noconflict mode.

As for the SBT -- I wonder whether you really should only inherit from pydata-sphinx-theme, as that is where most/all of the accessibility etc features are.

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.

3 participants