pydata / pydata-sphinx-theme

A clean, three-column Sphinx theme with Bootstrap for the PyData community
https://pydata-sphinx-theme.readthedocs.io
BSD 3-Clause "New" or "Revised" License
557 stars 300 forks source link

Animate remotely loaded banners together #1808

Closed gabalafou closed 1 month ago

gabalafou commented 1 month ago

The banner animation felt a little funky to me, even after the improvements made in https://github.com/pydata/pydata-sphinx-theme/pull/1693.

My hunch is that because the two banners are stacked on top of each other and the height of one affects the layout/position of the other, trying to animate the height of both of them at the same time causes the browser to stutter. Or maybe it was just because they could each load at different but often only slightly offset times. Whatever the case, I decided to do a little code clean up and change it so that they both come in together.

In the process of working on this PR it also made sense to address a TODO, and add "Version warning" to the list of translatable strings.

gabalafou commented 1 month ago

While working on this, I couldn't help but wonder if we should give some of this version loading machinery rethink. Could we get the versions at build time?

drammock commented 1 month ago

xref to #1822 which is touching the same code right now, FYI

github-actions[bot] commented 1 month ago

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  src/pydata_sphinx_theme
  translator.py
Project Total  

This report was generated by python-coverage-comment-action

Carreau commented 1 month ago

Ok, let's try this.