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

Raise exception for response codes outside range 200-299 #1755

Merged
merged 3 commits into from
May 21, 2024

Conversation

Czaki
Copy link
Contributor

@Czaki Czaki commented Apr 5, 2024

GitHub pages return valid HTML page when an element was removed.

image

This PR add check for return code to not inject returned HTML if the return code is outside range 200-299.

@trallard trallard requested a review from gabalafou April 5, 2024 17:25
@trallard trallard added the kind: enhancement New feature or request label Apr 8, 2024
Copy link
Collaborator

@drammock drammock left a comment

Choose a reason for hiding this comment

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

thanks for this! Just one tiny suggestion for improving the error message

…ouncement.html

Co-authored-by: Daniel McCloy <dan@mccloy.info>
@Carreau
Copy link
Collaborator

Carreau commented May 21, 2024

I'm joining the conversation late, but this was approved and seem reasonable, i'm going to take some risks and merge.

@Carreau Carreau merged commit e0c5ec3 into pydata:main May 21, 2024
2 checks passed
@Czaki Czaki deleted the fix_annoucement branch May 21, 2024 09:10
gabalafou added a commit to gabalafou/pydata-sphinx-theme that referenced this pull request May 21, 2024
Carreau added a commit that referenced this pull request May 23, 2024
The banner animation felt a little funky to me, even after the improvements made in #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.

* pybabel extract . -F babel.cfg -o src/pydata_sphinx_theme/locale/sphinx.pot -k '_ __ l_ lazy_gettext'

* pybabel update -i src/pydata_sphinx_theme/locale/sphinx.pot -d src/pydata_sphinx_theme/locale -D sphinx

* Update src/pydata_sphinx_theme/theme/pydata_sphinx_theme/sections/announcement.html


* incorporate #1755

---------

Co-authored-by: M Bussonnier <bussonniermatthias@gmail.com>
ivanov pushed a commit to ivanov/pydata-sphinx-theme that referenced this pull request Jun 5, 2024
GitHub pages return valid HTML page when an element was removed.

This adds a check for return code to not inject returned HTML if the return code is outside range 200-299.

Co-authored-by: Daniel McCloy <dan@mccloy.info>
ivanov pushed a commit to ivanov/pydata-sphinx-theme that referenced this pull request Jun 5, 2024
The banner animation felt a little funky to me, even after the improvements made in pydata#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.

* pybabel extract . -F babel.cfg -o src/pydata_sphinx_theme/locale/sphinx.pot -k '_ __ l_ lazy_gettext'

* pybabel update -i src/pydata_sphinx_theme/locale/sphinx.pot -d src/pydata_sphinx_theme/locale -D sphinx

* Update src/pydata_sphinx_theme/theme/pydata_sphinx_theme/sections/announcement.html


* incorporate pydata#1755

---------

Co-authored-by: M Bussonnier <bussonniermatthias@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants