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

Custom dropzone implementation #4193

Merged
merged 11 commits into from
Apr 27, 2023
Merged

Custom dropzone implementation #4193

merged 11 commits into from
Apr 27, 2023

Conversation

ssddanbrown
Copy link
Member

@ssddanbrown ssddanbrown commented Apr 24, 2023

To reduce code bundle size, dependencies and to provide a little extra control in how we present uploads, and how we can re-use this logic.

Features

  • Revamped drag and drop item upload handling for image manager and attachment management, to provide a more modern integrated user experience.
  • Removed library to reduce JS bundle size.
  • Neatened up image manager styles.
  • Updated attachment manager interface to be simpler (Removed tabs).

Todo

  • Check image manager in different configs (drawing, lack of permission upload etc...)
  • Check and remove pending todos in code.
  • Ensure added text is extracted to lang files.
  • Test across browsers
    • Tested across Firefox/Chrome (Fedora 38), Safari on MacOS. Those fine.
    • Had issue with dropping files on Gnome web (Fedora 38) due to upload file items not being accessible, and having 0 size, but assumed to be a browser bug as I can see no reasoning, and Safari works fine.
  • Test dark mode.
  • Remove dropzone lib (package.json, readme attribution).

Docs updates

  • Use of window.uploadTimeout has been removed.
    • Remove this from upload docs.
    • Note in update/breaking-change notes.
      • This was only really used by dropzone file uploads. Timeouts can (and probably should) still be enforced server-side.

- Added new wider target handling.
- Updated upload item dom with design and seperate "landing" zone.
- Added new helper for simple dom element creation.
- Added image manager button for uploads.
- Added image manager placeholder sidebar text for guidance.
- Improved dropzone layer styling.
- Removed old dropzone styles.
- Got success events and auto-hide working.
- Updated upload items to animate out.
- Added file placeholder for non-image uploads.
- Added use of upload limits.
- Removed upload timeout variable.
- Added pass-through and usage of filetypes.
- Extracted some view text to language files and made use of existing
  text.
- Tightened image manager styles to address things that looked akward.
- Prevented visiblity/use of upload controls for drawings.
- Updated dropzone to use error handling from validation messages.
- Fixes existing broken attachment edit tabs.
- Redesigns area to move away from old tabbed interface.
- Integrates new dropzone system, for both addition and edit.
Updated dom layout of attahcments to prevent nested dropzones (No issue
but potential to be one) and updated edit form dropzone handling so the
dropzone item card was not as distracting.
@ssddanbrown ssddanbrown merged commit 607da73 into development Apr 27, 2023
@ssddanbrown ssddanbrown deleted the custom_dropzone branch April 27, 2023 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

1 participant