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

Added a javascript slideshow of images in skimage.data #993

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

Conversation

vighneshbirodkar
Copy link
Contributor

To address #989

I am not used to HTML/javascript, so any HTML/javascript/CSS advice will be appreciated.
If everyone agrees with the approach, I will go ahead and document parts of my code.

The javascript slideshow Galleria was chosen because it was simple to use and allowed lazy loading of images.

I have put things as I see fit, but I won't be surprised if this seems totally crazy to others and is rejected.

@sharky93

@vighneshbirodkar
Copy link
Contributor Author

The error seems to be unrelated.

@stefanv
Copy link
Member

stefanv commented May 6, 2014

Hi @vighneshbirodkar, thanks a bunch for working on this! It looks great.

Some comments:

  • The wrong image files are loaded, e.g. cameraman is missing, and some images from examples that should not be included are shown (on my system at least).
  • It would be nice if the caption and description could appear below the image (I saw you can do that when visiting the galleria website).
  • The example images should probably be linked into the gallery page, as well as the API reference for skimage.data.
  • Jinja introduces another build dependency. Would it be possible to use Tempita instead?

Thanks again!

@vighneshbirodkar
Copy link
Contributor Author

Hello @stefanv

  • Could you please attach a screen shot of wrong image files being loaded ? That problem does not occur on my system
  • Can you clarify what images you are referring to when you say example images ?
  • Sphinx says that Jinja is its default templating engine, so I thought it would be installed as a dependency of sphinx (http://sphinx-doc.org/templating.html)

@vighneshbirodkar
Copy link
Contributor Author

@stefanv
The other themes are not free.
http://galleria.io/themes/

@ahojnnes
Copy link
Member

ahojnnes commented May 7, 2014

This looks very nice. Two further suggestions:

  • Add a link to the gallery in the skimage.data API reference
  • Add images also to each item in the skimage.data API reference (at the bottom, this should be possible with a plot command in an example section)

@vighneshbirodkar
Copy link
Contributor Author

@ahojnnes
Should I automate the adding of images in skimage.data , or do it by hand ?

@ahojnnes
Copy link
Member

ahojnnes commented May 7, 2014

@vighneshbirodkar
Copy link
Contributor Author

You want the plot directive to be inserted automatically at the end of every docstring ?
I would prefer to do it with the image directive instead http://docutils.sourceforge.net/docs/ref/rst/directives.html#image

@ahojnnes
Copy link
Member

ahojnnes commented May 7, 2014

Yes, you are right. the image directive is better!

@vighneshbirodkar
Copy link
Contributor Author

So I will add some code to doc/conf.py to append at the end of every
docstring .
On May 7, 2014 9:00 PM, "Johannes L. Schönberger" notifications@github.com
wrote:

Yes, you are right. the image directive is better!


Reply to this email directly or view it on GitHubhttps://github.com//pull/993#issuecomment-42442063
.

@stefanv
Copy link
Member

stefanv commented May 8, 2014

If Sphinx uses Jinja anyway, then we're fine. With "example images" I meant images used in the gallery, instead of images from skimage.data. The theme should be pretty easy to tweak by hand--I can help with that if you're not familiar with CSS.

@vighneshbirodkar
Copy link
Contributor Author

Hello @stefanv
I am addressing the other suggestions right now, the camera image not showing up was due to a mistake in the code. But I never understood why images used in the gallery ( auto_examples , I presume ) could land up in the slideshow. Could you do a make clean and see if the problem persists ?

@vighneshbirodkar
Copy link
Contributor Author

@stefanv Can you tell me what changes I need to make to get captions at the bottom ? Or would you prefer merging this and making the changes on your own ?

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling d84861d on vighneshbirodkar:data_gallery into 040a3bf on scikit-image:master.

@cdeil
Copy link
Contributor

cdeil commented May 28, 2014

Thanks @vighneshbirodkar!

I've put the data gallery in this PR here to make it easy for everyone to have a quick look.

I'm not a huge fan of the current Javascript slideshow used ... it feels a bit clunky.
I would even prefer a non-Javascript tile layout as in the scikit-image example gallery
But obviously this is a matter of taste, and the way it's done now works and having this data gallery at all is a big improvement.

The other thing that was mentioned in #989 was that it would be nice to be able to see the shape and dtype for each image from the API docs and if possible also in the data gallery.

@stefanv
Copy link
Member

stefanv commented May 28, 2014

The shape and dtype can easily be extracted on doc build and included.​

We can look at something lightweight like:
http://www.digitalia.be/software/slimbox2

I don't really mind galleria, but the theme used on the front page is much
more attractive: http://galleria.io/

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.

None yet

5 participants