Skip to content
This repository has been archived by the owner on Aug 19, 2023. It is now read-only.

Missing default thumbnail for tutorials after nbsphinx 0.9 release #1707

Closed
HuangJunye opened this issue Mar 24, 2023 · 7 comments · Fixed by #1708
Closed

Missing default thumbnail for tutorials after nbsphinx 0.9 release #1707

HuangJunye opened this issue Mar 24, 2023 · 7 comments · Fixed by #1708
Labels
bug Something isn't working

Comments

@HuangJunye
Copy link
Contributor

Informations

  • Qiskit version:
  • Python version:
  • Operating system:

What is the current behavior?

image

Steps to reproduce the problem

Go to https://qiskit.org/documentation/tutorials.html

What is the expected behavior?

The thumbnail default to qiskit logo when it's not set https://qiskit.org/documentation/stable/0.42/tutorials.html

image

Suggested solutions

@HuangJunye HuangJunye added the bug Something isn't working label Mar 24, 2023
@HuangJunye HuangJunye transferred this issue from Qiskit/qiskit-tutorials Mar 24, 2023
@HuangJunye HuangJunye changed the title Missing default thumbnail for tutorials after sphinx-gallery 0.12 release Missing default thumbnail for tutorials after sphinx-gallery 0.12 / nbsphinx 0.9 release Mar 24, 2023
@HuangJunye HuangJunye changed the title Missing default thumbnail for tutorials after sphinx-gallery 0.12 / nbsphinx 0.9 release Missing default thumbnail for tutorials after nbsphinx 0.9 release Mar 24, 2023
@woodsp-ibm
Copy link
Member

See also Qiskit/qiskit_sphinx_theme#221 where I noted this along with the change to the tile sizes/spacing.

@HuangJunye
Copy link
Contributor Author

See also Qiskit/qiskit_sphinx_theme#221 where I noted this along with the change to the tile sizes/spacing.

Sorry I missed the issue you filed in the theme repo. Thanks for adding the additional details. I wonder whether we should just pin nbsphinx to <0.9. The 0.9 release doesn't add much new features that we will need.

@woodsp-ibm
Copy link
Member

We would have to pin in quite a few repos now, I imagine, if that's the choice.

I see here https://github.com/spatialaudio/nbsphinx/releases/tag/0.9.0 it says

Use the last image in a notebook as the default thumbnail

Another way, given the above, might be to add the sphere image as part of the copyright widget that we add at the end of the notebooks. That widget is in Terra though and since the docs are built/published off stable that seems not so much a short term workaround/fix.

I imagine either would cater to the thumbnail. I did not investigate the style change (size, spacing, colors - is now the standard link colors - purple in this case).

@woodsp-ibm
Copy link
Member

spatialaudio/nbsphinx#723 (comment)

The nbsphinx issue for default image was commented on - indeed it was changed, but seems there is a way.

@Eric-Arellano Eric-Arellano transferred this issue from Qiskit/qiskit-metapackage Mar 27, 2023
@HuangJunye
Copy link
Contributor Author

@Eric-Arellano FYI, this is not a theme issue. The fix should be in the conf.py of each sphinx project. So I am going to transfer the issue back to qiskit/qiskit repo

@HuangJunye HuangJunye transferred this issue from Qiskit/qiskit_sphinx_theme Mar 28, 2023
@woodsp-ibm
Copy link
Member

The fix should be in the conf.py of each sphinx project

It seemed we could also drop an .svg image in static, of the right name, which would be picked up on. If that was done I would think the static folder of the deployed docs could be updated on the server so that a fix could be done without republishing, as well of course as adding it to each project. If we kept the former .png file too then things would be more independent of the nbsphinx version.

@HuangJunye
Copy link
Contributor Author

The fix should be in the conf.py of each sphinx project

It seemed we could also drop an .svg image in static, of the right name, which would be picked up on. If that was done I would think the static folder of the deployed docs could be updated on the server so that a fix could be done without republishing, as well of course as adding it to each project. If we kept the former .png file too then things would be more independent of the nbsphinx version.

I don't know how to convert png to svg. I can possibly get an original svg from design team, but I go with the .png file approach because it's faster. You can see here: Qiskit/qiskit#1708. It's a simple fix.

nbsphinx_thumbnails = {
    '**': '_static/no_image.png'
}

@mergify mergify bot closed this as completed in #1708 Apr 2, 2023
coruscating added a commit to qiskit-community/qiskit-experiments that referenced this issue Apr 10, 2023
### Summary

This PR follows Qiskit/qiskit#9705 to
remove the dependency on `sphinx-autodoc-typehints` and
Qiskit/qiskit-metapackage#1707 to use the
default Qiskit icon when the experiment manual isn't explicitly
provided.

### Details and comments

In addition, some experiment classes that didn't link to their manuals
have been updated with the link. Manual line breaks added after numbered
lists have been removed now that
Qiskit/qiskit_sphinx_theme#218 has been merged.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants