Skip to content

Restrict sphinx_gallery < 0.11#1654

Merged
rocco8773 merged 3 commits intoPlasmaPy:mainfrom
rocco8773:restrict_sphinx_gallery
Jul 30, 2022
Merged

Restrict sphinx_gallery < 0.11#1654
rocco8773 merged 3 commits intoPlasmaPy:mainfrom
rocco8773:restrict_sphinx_gallery

Conversation

@rocco8773
Copy link
Copy Markdown
Member

@rocco8773 rocco8773 commented Jul 30, 2022

Today (2022-07-29) sphinx_gallery released version 0.11.0. The changes introduced in this version are negatively affecting the display of thumbnail galleries generated by nbsphinx, as such I'm restricting sphinx_gallery to < 0.11.0.

There are likely multiple changes that are sources to this issue, all of which are probably related to sphinx-gallery/sphinx-gallery#905. I do think the issue can be traced back to the change of the .spx-glr-thubcontainer style to a flex container. Instead of spending days trying to fix this my(our)selves. I'm just restricting the sphinx_gallery version and hoping nbsphinx comes up with their own solution that we can adopt later. :)

on the change to flex containersThe root cause of the display issues comes from changes made to the .spx-glr-thubcontainer style...

OLD

.sphx-glr-thumbcontainer {
  background: #fff;
  border: solid #fff 1px;
  -moz-border-radius: 5px;
  -webkit-border-radius: 5px;
  border-radius: 5px;
  box-shadow: none;
  float: left;
  margin: 5px;
  min-height: 230px;
  padding-top: 5px;
  position: relative;
}

image

NEW

.sphx-glr-thumbcontainer {
  background: transparent;
  -moz-border-radius: 5px;
  -webkit-border-radius: 5px;
  border-radius: 5px;
  box-shadow: 0 0 10px var(--sg-thumb-box-shadow-color);

  /* useful to absolutely position link in div */
  position: relative;

  /* thumbnail width should include padding and borders
  and take all available space */
  box-sizing: border-box;
  width: 100%;
  padding: 10px;
  border: 1px solid transparent;

  /* align content in thumbnail */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}

image


nbsphinx has already taken not of this... spatialaudio/nbsphinx#655

@codecov
Copy link
Copy Markdown

codecov bot commented Jul 30, 2022

Codecov Report

Merging #1654 (c246fda) into main (28daa44) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #1654   +/-   ##
=======================================
  Coverage   97.21%   97.21%           
=======================================
  Files          83       83           
  Lines        7962     7962           
=======================================
  Hits         7740     7740           
  Misses        222      222           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 28daa44...c246fda. Read the comment docs.

namurphy
namurphy previously approved these changes Jul 30, 2022
Copy link
Copy Markdown
Member

@namurphy namurphy left a comment

Choose a reason for hiding this comment

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

Thanks! I noticed this happening for another repo so it's helpful to know the cause of this. Do you think it'd be worth pushing these changes to stable and v0.8.x too?

@rocco8773 rocco8773 self-assigned this Jul 30, 2022
@rocco8773 rocco8773 added the docs PlasmaPy Docs at http://docs.plasmapy.org label Jul 30, 2022
@rocco8773
Copy link
Copy Markdown
Member Author

Thanks! I noticed this happening for another repo so it's helpful to know the cause of this. Do you think it'd be worth pushing these changes to stable and v0.8.x too?

No, it's not currently affecting either of those branches, and won't until we cause a rebuild. And, a rebuild will probably only happen when we merge main into them. But, if you feel it's necessary, then go right ahead!

@github-actions github-actions bot removed the docs PlasmaPy Docs at http://docs.plasmapy.org label Jul 30, 2022
@rocco8773 rocco8773 added docs PlasmaPy Docs at http://docs.plasmapy.org CI Related to continuous integration and removed CI Related to continuous integration labels Jul 30, 2022
@github-actions github-actions bot removed the docs PlasmaPy Docs at http://docs.plasmapy.org label Jul 30, 2022
@rocco8773 rocco8773 marked this pull request as ready for review July 30, 2022 01:52
@rocco8773 rocco8773 requested a review from namurphy July 30, 2022 01:52
@rocco8773 rocco8773 enabled auto-merge (squash) July 30, 2022 01:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

requirements Related to updating requirements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants