Skip to content

feat: add djangocms_tacc_image_gallery#654

Merged
wesleyboar merged 11 commits intomainfrom
poc/TUP-318-plugin-image-gallery
Jun 20, 2023
Merged

feat: add djangocms_tacc_image_gallery#654
wesleyboar merged 11 commits intomainfrom
poc/TUP-318-plugin-image-gallery

Conversation

@wesleyboar
Copy link
Copy Markdown
Member

@wesleyboar wesleyboar commented Jun 9, 2023

Overview

Add djangocms_tacc_image_gallery via https://github.com/wesleyboar/Core-CMS-Plugin-Image-Gallery.

Related

Changes

  • added plugin to requirements
  • added plugin to settings

Testing

How to Create Gallery
  1. on a page, add the plugin "Image Gallery"
  2. within the plugin, verify only "Image" and Picture / Image" plugins can be added
  3. within the plugin, add two or more plugin "Image" or Picture / Image"
  4. verify images are automatically wrapped in an anchor tag
  5. verify <script> to load initialize.js is in markup only once
  6. verify <link> to load gallery.css is in markup only once
How to Use Gallery
  1. click on an image in the gallery
  2. use the LightGallery arrows to navigate through images
  3. either click outside the image or press esc to leave LightGallery
How to Review Gallery
  1. verify image gallery works (see "How to Use Gallery")
  2. verify image grid has gaps between images and is responsive
  3. verify images are automatically wrapped in an anchor tag
  4. verify <script> to load initialize.js is in markup only once
  5. verify <link> to load gallery.css is in markup only once

on https://github.com/TACC/tup-ui

via Django CMS QuickStart

  1. Follow "Testing Steps" of TUP-318: Image Gallery wesleyboar/django-cms-quickstart#5.

via https://github.com/TACC/Core-CMS

UI

name image
plugin added plugin added
child plugin choices child plugins limited
child plugins added child plugins added
gallery markup div + a + img
gallery assets link + script
gallery interaction gallery active

Notes

  1. The plugin does not have database migrations.

  2. An alternative solution (with drawbacks) is built at https://dev.tup.tacc.utexas.edu/test/image-gallery/.

    The drawbacks are disparate pieces and extra manual steps for each gallery.

    Note
    The extra steps per gallery are noted with a ➕.

    • create a Style plugin
      • ➕ add classes s-image-grid, lightboxgallery
    • create Image or Picture / Image plugins
    • ➕ wrap images in anchor markup either via JavaScript or Link plugins
    • load LightGallery assets; do so only once regardless how many galleries are on a page
    • load styles for image grid and maybe for LightGallery custom UI

    Note
    I think a plugin's cohesiveness is better than a list of manual or isolated or implicit actions.

@wesleyboar wesleyboar requested review from jarosenb and rstijerina June 9, 2023 16:31
@wesleyboar wesleyboar changed the title feat: add djangocms_tacc_image_gallery feat: add djangocms_tacc_image_gallery (un-styled) Jun 9, 2023
@wesleyboar
Copy link
Copy Markdown
Member Author

This will be installed into https://github.com/TACC/tup-ui instead, and only into each CMS as needed, because it is as simple as a plugin install.

@wesleyboar wesleyboar closed this Jun 15, 2023
@wesleyboar
Copy link
Copy Markdown
Member Author

Crap. I don't know how to install only in one CMS. The other CMS's do not have their own pyproject.toml.

@wesleyboar wesleyboar reopened this Jun 15, 2023
@wesleyboar
Copy link
Copy Markdown
Member Author

Okay, as of b435eb3, the install is from TACC not wesleyboar.

@wesleyboar wesleyboar changed the title feat: add djangocms_tacc_image_gallery (un-styled) feat: add djangocms_tacc_image_gallery Jun 16, 2023
- supports link plugins and image link attributes
- fixes link title (from image alt)
@wesleyboar
Copy link
Copy Markdown
Member Author

I merge based on approval and merge (and upcoming deploy) of use in initial client, tup-ui, in TACC/tup-ui#232.

@wesleyboar wesleyboar merged commit c608f63 into main Jun 20, 2023
@wesleyboar wesleyboar deleted the poc/TUP-318-plugin-image-gallery branch June 20, 2023 21:19
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.

1 participant