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

feat(plugin-image-gallery): Image Grid (PE-53, PE-54) #4040

Merged
merged 36 commits into from
Aug 28, 2024

Conversation

shn-srl
Copy link
Contributor

@shn-srl shn-srl commented Aug 21, 2024

Linear Issues:

Demo Links:

To do:

  • Bug: Uploading more than two images makes the plugin break
  • Loading state for image upload
  • Single image upload

@shn-srl shn-srl self-assigned this Aug 21, 2024
Copy link

vercel bot commented Aug 21, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
frontend ✅ Ready (Inspect) Visit Preview Aug 28, 2024 0:55am

@shn-srl shn-srl changed the base branch from staging to pe-52-image-gallery-image-popup August 21, 2024 20:12
@shn-srl shn-srl changed the title WIP: Plugin image gallery: Image Grid WIP: feat(plugin-image-gallery): Image Grid Aug 21, 2024
@shn-srl shn-srl changed the title WIP: feat(plugin-image-gallery): Image Grid feat(plugin-image-gallery): Image Grid (pe-53, pe-54) Aug 23, 2024
@shn-srl shn-srl marked this pull request as ready for review August 23, 2024 09:06
@shn-srl shn-srl requested a review from elbotho August 23, 2024 10:23
…eModal, based on whether an image was uploaded or set
@elbotho
Copy link
Member

elbotho commented Aug 23, 2024

Thanks for the demo Links, really helpful here. Some initial feedback:

Lightbox

  • tall images are clipping for me
  • when opening an image it's not selected and no toolbar is visible (only after click)
  • will there be a lightbox for the static view at some point?
image image

Bundle size

The bundle size increase comes from the gallery plugin I guess? I think especially for the static view this is a lot of js just for the layout. I'm aware that there will be sorting later and that can be tricky to implement.

image

Personally I'd love a simple css based solution for the grid and then using some library or code based on react-dnd only inside the editing view for sorting. (e.g. like react-easy-sort might be worth a look). But I can also not say with confidence how much work this way would actually be.

At least we should load the component dynamically.

@shn-srl
Copy link
Contributor Author

shn-srl commented Aug 23, 2024

Personally I'd love a simple css based solution for the grid and then using some library or code based on react-dnd only inside the editing view for sorting. (e.g. like react-easy-sort might be worth a look). But I can also not say with confidence how much work this way would actually be.

At least we should load the component dynamically.

I have a branch with the sorting functionality done with react-dnd. Can look at a css only solution for the grid

Lightbox

* will there be a lightbox for the static view at some point?

This is in another issue: https://linear.app/serlo/issue/PE-57/lightbox-desktop

@elbotho elbotho merged commit b1ab035 into staging Aug 28, 2024
7 checks passed
@elbotho elbotho deleted the pe-54-plugin-image-gallery branch August 28, 2024 12:56
@github-actions github-actions bot mentioned this pull request Aug 28, 2024
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.

4 participants