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

File upload: use preview options #6611

Merged

Conversation

distantnative
Copy link
Member

@distantnative distantnative commented Aug 11, 2024

Description

Summary of changes

  • Upload item preview supports back and cover props
  • New $panel.upload.preview object that can hold defaults for the upload item preview component
  • Files field and files section pass their image options to $panel.upload.preview

Reasoning

  • Likely, the options that one uses to make the preview in the field/section better also make the preview in the upload dialog better, as they consider what kind of files are likely uploaded (e.g. black SVG might want to use a colored background)

Changelog

Enhancements:

Ready?

  • In-code documentation (wherever needed)
  • Unit tests for fixed bug/feature
  • Tests and CI checks all pass

For review team

  • Add lab and/or sandbox examples (wherever helpful)
  • Add changes & docs to release notes draft in Notion

@distantnative distantnative added the type: enhancement ✨ Suggests an enhancement; improves Kirby label Aug 11, 2024
@distantnative distantnative self-assigned this Aug 11, 2024
@distantnative distantnative force-pushed the enhancement/5729-file-upload-image-options branch from 2a9635c to 983825d Compare August 11, 2024 20:27
@distantnative distantnative marked this pull request as ready for review August 11, 2024 21:06
@distantnative distantnative requested a review from a team August 11, 2024 21:06
@distantnative distantnative added this to the 4.4.0 milestone Aug 11, 2024
Copy link
Member

@bastianallgeier bastianallgeier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After setting up the lab examples, it felt better to keep the upload item and upload items components independent from the upload.js module. @distantnative could you please have a second look if this is alright for you?

I've also added new blueprint setups for the fields to the sandbox repo.

@distantnative distantnative merged commit ab7a533 into develop-minor Aug 12, 2024
7 checks passed
@distantnative distantnative deleted the enhancement/5729-file-upload-image-options branch August 12, 2024 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement ✨ Suggests an enhancement; improves Kirby
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants