Skip to content

Replace Lightbox2 #16

Open
Open

Description

@samcarecho

Lightbox2 is not only another 3rd party dependency which makes the project fatter, heavier and adds to the maintenance chore as well as it depends on another big and unnecessary 3rd party dependency, JQuery.

I do suggest replacing it for a pure Open Web Platform / Polymer solution.
Let's search for a suitable replacement. If we can't find one, I can recreate the Lightbox needed functionalities using the paper-dialog element. :)

Activity

  1. added this to the Polymer2 milestone on Apr 8, 2018
  2. samcarecho commented on Apr 8, 2018

    @samcarecho
    CollaboratorAuthor

    Skeleton-carousel inside a paper-dialog seems promising as a proper replacement for Lightbox2.
    https://github.com/FabricElements/skeleton-carousel.

    We could also, if needed, modify skeleton-carousel to behave like lightbox2.

  3. jtebert commented on Apr 12, 2018

    @jtebert
    Owner

    Definitely agree with getting rid of jQuery; lightbox was just a quick-to-plug-in solution. At this point, it's only used for expanding inline images, which the full skeleton-carousel isn't necessary for.

    However, adding carousel capabilities with skeleton-carousel could be a plus. That said, if a carousel is something meant for a user to put into a Markdown-written post, I don't think there's a simple way to do that without them having to embed all the necessary HTML into the markdown file. The reasoning behind the current setup is that there is no additional syntax necessary for the user to add to their post formatting for the images to be expandable.

  4. samcarecho commented on Apr 16, 2018

    @samcarecho
    CollaboratorAuthor

    If we stick to Jekyll, we can use collections, data files or the front matter, to set the images that would compose the carousel.

    Probably, using a front matter custom variable like the example that follows, would be the best solution. We could then, just add the carousel custom tag to an include file that would be included if the variable is not empty.

    Sample front matter variable:

    carousel:
      - image1.png
      - image2.png
      - image3.png
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions