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

Feature: Media Picker drag and drop upload directly on property editor #13393

Merged
merged 72 commits into from Nov 17, 2022

Conversation

madsrasmussen
Copy link
Contributor

@madsrasmussen madsrasmussen commented Nov 14, 2022

This PR adds the ability to drag and drop files directly to the Media Picker selected items list.

When adding a file to the list, the file is uploaded to a temp folder. When the node is saved the temp files will be created as media items in the media library.

Demo:
https://user-images.githubusercontent.com/6078361/201654290-e4b4ec2c-054f-416e-a3c1-a55d5f2fd4c0.mp4

What to test:

  • upload different files types
  • upload a file type that is not allowed in app-settings.
  • upload a file type that is not allowed by the Media Picker configuration
  • upload a file that exceed max file size from app settings
  • Create multiple media types that accept the same file extension. Upload a file with this type and test that you can select the preferred media type.
  • Test that you can’t upload files on a language you don't have access to.
  • Test that you can set crops on uploaded images before you save the node.
  • Test that media items gets created with the correct type in the media library when the node is saved.

madsrasmussen and others added 30 commits November 2, 2022 12:26
Add media picker three to BackOfficeServerVariables
Copy link
Contributor

@iOvergaard iOvergaard left a comment

Choose a reason for hiding this comment

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

Tested everything again. Generally it looks very good, but did have troubles with the autopicker, which I think should just mimick the media library.

On a related note, the media-type-picker-dialog does not work in the media library. It's not related to this feature, but could you maybe take a look at it? It's probably a one-liner somewhere 😃


// when we get all media types, the "File" media type will always show up because it accepts all file extensions.
// If we don't remove it from the list we will always show the picker.
const matchedMediaTypesNoFile = matchedMediaTypes.filter(mediaType => mediaType.alias !== "File");
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm having a bit of trouble with this. I have two media types in my solution (File and Article), which coincidentally both accept PDF files. When I'm dragging a PDF over the editor, I'm never asked what it is. I presume it "autopicks" the File type, but in reality it could be the other type. I assume it has something to do with this line where Files are being filtered away.

Conversely, when I drag a PDF into the media library itself, it gives me options to choose between Autopick, File and Article.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

A couple of questions:

  • Have you specifically set PDF as allowed extension on File?
  • Can you double-check that it didn't autopick the Article type?
  • I don't fully understand the purpose of the Auto pick option. When I get a list of available options and I select Auto Pick. Which one will it be?

This is how I wanted it to work for the media picker:
The File Media Type should be the fallback type if nothing else fits because it supports everything out of the box. If we find more specific media types that all allows the uploaded file extension, we present the user with a list of those. If we only find one, that is not "File", then that will be the best fit, and we auto select that one.

Copy link
Contributor

Choose a reason for hiding this comment

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

  1. Yes
  2. It picked the "File" type
  3. No I don't know if we should use it here, just wondered why it's in the media library and not here

The dialog simply didn't appear even though I have "PDF" listed on both types. In fact they use the same FileUpload datatype underneath.

@iOvergaard iOvergaard merged commit 57ef091 into v10/dev Nov 17, 2022
@iOvergaard iOvergaard deleted the v10/feature/media-picker-3-direct-upload branch November 17, 2022 10:16
@iOvergaard iOvergaard added type/feature release/11.0.0 release/10.4.0 javascript Pull requests that update Javascript code labels Nov 17, 2022
nikolajlauridsen pushed a commit that referenced this pull request Nov 18, 2022
#13393)

* prototype drag and drop upload

* Add upload image endpoint

* Add MediaPickerThreeController.cs

* Revert "Add upload image endpoint"

This reverts commit 4bb5865.

* Update IIOHelper dependency

* show preview when uploading a new media item

* open uploaded media in media entry editor

* map data from uploaded media entry to support cropper

* add crop data to uploaded media item

* remove media library buttons for media entries not created in the media library

* Implement temp images save & add to media picker 3

* Implement ITemporaryImageService

* Remove save logic from MediaPicker3PropertyEditor

* Dont use a TempImageDto

* Add GetByAlias endpoint

* Add additonal xml doc

* Refactor to take array of aliases

* Add FromQuery attribute

* Formatting

* add resource to get media types by alias

* validate file size and file type based on server variables

* Update OpenApi.json
Add media picker three to BackOfficeServerVariables

* rename endpoint to upload media

* Use baseurl Method

* Dont upload in rte folder

* pass params correctly to end point

* queue files before uploading

* handle invalid files

* progress bar design adjustments

* only create data url for images

* disable edit and name buttons when uploading

* fix missing error messages for invalid files

* add temp location to media entry

* Add startNode to TemporaryImageService.cs

* Refactor get by alias

* Rename to GetAllFiltered

* use getAllFiltered method

* remove autoselect option

* fix missing alias when selecting media type

* fix file filter

* don't overwrite invalid entries from dropping new files

* add disallowed files to filter

* remove console.log

* move media uploader logic to reusable function

* fix missing tmp location

* attach media type alias to the mediaEntry

* support readonly mode

* show discard changes when files has been dropped

* add disabled prop to button group

* emit events when upload queue starts and ends

* pass node to media picker property editor

* add service to keep track of all uploads in progress

* add upload in progress to uploadTracker when the queue starts and ends

* disabled buttons when any upload is in progress

* return a subscription to align with eventsService

* Fix up cases where StartNodeId was null

* scope css

* Show filename in dialog for selecting media type

* reuse translation from media library dropzone

* Don't check for only images

* Remove composer

* Add mediaTypeAlias to TemporaryImageService

* Rename ITemporaryImageService to ITemporaryMediaService

* prefix client side only props with $ so we don't send unnecessary data to the server

* use prefixed dataURL in media entry editor

* render icon for non images

* fix auto select media type

Co-authored-by: Zeegaan <nge@umbraco.dk>
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
Zeegaan added a commit that referenced this pull request Dec 7, 2022
* Bump version

* Add PrivateAssets="all" to mangement api project reference (#13249)

* Bump version

* Use the actual save function for saving the copy (#13066)

* Use the actual save function for saving the copy

* PR feedback

(cherry picked from commit 3802097)

* Unbreak breaking change in #13066 (#13288)

(cherry picked from commit e4741b0)

* Bump version to 10.3.2

* Parse lockId as invariant (#13284)

Co-authored-by: Zeegaan <nge@umbraco.dk>
(cherry picked from commit 272e922)

* Allow for configuration of additional languages to install and ensure one is set as default. (#13290)

* Allow for configuration of additional languages to install and ensure one is set as default.

* Amended install default language method to handle invalid ISO codes and ensure the first specified language is always made the default.

* Removed unnecessary using.

* Apply suggestions from code review

Co-authored-by: Ronald Barendse <ronald@barend.se>

* Clean up.

* Update src/Umbraco.Infrastructure/Migrations/Install/DatabaseDataCreator.cs

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>

Co-authored-by: Ronald Barendse <ronald@barend.se>
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>

* Updated Smidge (#13331)

* Fix casing in fileSystemBasePath (#13306)

* Add guard statement (#13340)

* Move block grid single area rendering to its own dedicated view (#13359)

* Block Grid Editor Improvements (#13282)

* remove console log

* Updated references for Forms and Deploy in JSON schema project. (#13411)

* Enable single block mode (#13216)

* Enable single block mode

* Fixes tests, and adds test for single block mode output type

* Update src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/BlockListPropertyValueConverter.cs

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>

* Update src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/BlockListPropertyValueConverter.cs

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>

* Fix breaking change

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>

* Block Grid Editor: Removal of the forced placement feature (#13400)

* removal of the forceLeft/forceRight code

* removal of forced placement in css

* bring back removed code

* V10: AllowedUploadFiles appsetting not working (#13408)

* Add new Settings

* Use new settings instead of old ones

* Implement AllowedUploadedFiles value to be copied to AllowedUplayedFileExtensions

* Obsolete old settings

* Rename DisallowedUploadFileExtensions

* Implement same fix for DisallowedUploadFiles

* Use new settings for backoffice server variables

* Update the correct setting

Co-authored-by: Zeegaan <nge@umbraco.dk>

* Feature: Media Picker drag and drop upload directly on property editor (#13393)

* prototype drag and drop upload

* Add upload image endpoint

* Add MediaPickerThreeController.cs

* Revert "Add upload image endpoint"

This reverts commit 4bb5865.

* Update IIOHelper dependency

* show preview when uploading a new media item

* open uploaded media in media entry editor

* map data from uploaded media entry to support cropper

* add crop data to uploaded media item

* remove media library buttons for media entries not created in the media library

* Implement temp images save & add to media picker 3

* Implement ITemporaryImageService

* Remove save logic from MediaPicker3PropertyEditor

* Dont use a TempImageDto

* Add GetByAlias endpoint

* Add additonal xml doc

* Refactor to take array of aliases

* Add FromQuery attribute

* Formatting

* add resource to get media types by alias

* validate file size and file type based on server variables

* Update OpenApi.json
Add media picker three to BackOfficeServerVariables

* rename endpoint to upload media

* Use baseurl Method

* Dont upload in rte folder

* pass params correctly to end point

* queue files before uploading

* handle invalid files

* progress bar design adjustments

* only create data url for images

* disable edit and name buttons when uploading

* fix missing error messages for invalid files

* add temp location to media entry

* Add startNode to TemporaryImageService.cs

* Refactor get by alias

* Rename to GetAllFiltered

* use getAllFiltered method

* remove autoselect option

* fix missing alias when selecting media type

* fix file filter

* don't overwrite invalid entries from dropping new files

* add disallowed files to filter

* remove console.log

* move media uploader logic to reusable function

* fix missing tmp location

* attach media type alias to the mediaEntry

* support readonly mode

* show discard changes when files has been dropped

* add disabled prop to button group

* emit events when upload queue starts and ends

* pass node to media picker property editor

* add service to keep track of all uploads in progress

* add upload in progress to uploadTracker when the queue starts and ends

* disabled buttons when any upload is in progress

* return a subscription to align with eventsService

* Fix up cases where StartNodeId was null

* scope css

* Show filename in dialog for selecting media type

* reuse translation from media library dropzone

* Don't check for only images

* Remove composer

* Add mediaTypeAlias to TemporaryImageService

* Rename ITemporaryImageService to ITemporaryMediaService

* prefix client side only props with $ so we don't send unnecessary data to the server

* use prefixed dataURL in media entry editor

* render icon for non images

* fix auto select media type

Co-authored-by: Zeegaan <nge@umbraco.dk>
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>

* V10: merge v8 blobstorage file deletion fix (#13415)

* Implement fix from v8 #11998

* Clean-up

Co-authored-by: Elitsa Marinovska <elm@umbraco.dk>

* Bump socket.io-parser from 4.0.4 to 4.0.5 in /src/Umbraco.Web.UI.Client

Bumps [socket.io-parser](https://github.com/socketio/socket.io-parser) from 4.0.4 to 4.0.5.
- [Release notes](https://github.com/socketio/socket.io-parser/releases)
- [Changelog](https://github.com/socketio/socket.io-parser/blob/main/CHANGELOG.md)
- [Commits](socketio/socket.io-parser@4.0.4...4.0.5)

---
updated-dependencies:
- dependency-name: socket.io-parser
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* update block grid panel name (#13325)

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>

* Bump async from 2.6.3 to 2.6.4 in /src/Umbraco.Web.UI.Client

Bumps [async](https://github.com/caolan/async) from 2.6.3 to 2.6.4.
- [Release notes](https://github.com/caolan/async/releases)
- [Changelog](https://github.com/caolan/async/blob/v2.6.4/CHANGELOG.md)
- [Commits](caolan/async@v2.6.3...v2.6.4)

---
updated-dependencies:
- dependency-name: async
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump minimist from 1.2.5 to 1.2.7 in /src/Umbraco.Web.UI.Client

Bumps [minimist](https://github.com/minimistjs/minimist) from 1.2.5 to 1.2.7.
- [Release notes](https://github.com/minimistjs/minimist/releases)
- [Changelog](https://github.com/minimistjs/minimist/blob/main/CHANGELOG.md)
- [Commits](minimistjs/minimist@v1.2.5...v1.2.7)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump eventsource from 1.1.0 to 1.1.2 in /src/Umbraco.Web.UI.Client

Bumps [eventsource](https://github.com/EventSource/eventsource) from 1.1.0 to 1.1.2.
- [Release notes](https://github.com/EventSource/eventsource/releases)
- [Changelog](https://github.com/EventSource/eventsource/blob/master/HISTORY.md)
- [Commits](EventSource/eventsource@v1.1.0...v1.1.2)

---
updated-dependencies:
- dependency-name: eventsource
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* updated package-lock

* Bump minimatch from 3.0.4 to 3.1.2 in /src/Umbraco.Web.UI.Client

Bumps [minimatch](https://github.com/isaacs/minimatch) from 3.0.4 to 3.1.2.
- [Release notes](https://github.com/isaacs/minimatch/releases)
- [Commits](isaacs/minimatch@v3.0.4...v3.1.2)

---
updated-dependencies:
- dependency-name: minimatch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Block Grid Editor sorting directive (#13391)

* make sure area border is on top of block views.

* rename class to avoid confusion

* change witch UI goes on top on hover

* Description informing all blocks are allowed when none is configured.

* add 'When empty'

* Sort mode

* ability to switch out property actions

* enter and exit sortmode from property actions

* gridsortblock

* rename block class to use sortblock

* Sort mode styling

* remove unused css selector

* fixing style for inline-creat button to appear above and not when hovering contextbar

* work on block grid inline editor

* use uui-button + enable installing demo blocks when its not the first dataType of this kind.

* improvements to inline editing POC

* update title of area config overlay editor

* reset columnSpan if no column span options is defined.

* Inline editing

* remove html comment

* remove code for transfer of stylesheets

* ability to hide label from directive

* inline editing using slots to render the umb-property in light dom

* remove property editor proxies when moving a block to a new area/block/context

* minor adjustments to custom views

* use individual slots for each area.

* Inline editing

* a little smaller rte min-height

* fire Custom focus/blur event for Block Grid Editor to catch for focus imitation

* disable inline editing prevalue field when custom view is set

* Fix scroll parent block into view

* initial work on sorter directive

* remove mediaBlock controller

* initial notes and structure

* further concept work

* remove consol log

* CSS for getting bigger areas

* removal of the forceLeft/forceRight code

* proven concept

* fix grid space detection. vertical/horizontal

* clean up and notes

* move into inner containers as well

* use last available index pr default

* boundary selector, for improved choise of dropping into an area

* hide last inline create button when dragging around

* remove console.log

* removal of forced placement in css

* default config and clean up

* notes

* bring back removed code

* show area ui when in dragging mode

* more specific selector

* drop allowance + clean up

* notes and clean up

* auto scroll

* turn --umb-block-grid--dragging-mode into conditional CSS Custom Property

* auto scroll

* refactoring

* fix condition mistake

* scope.config.resolveVerticalDirection

* wrap up simple setDragImage solution

* bring back vm.notifyVisualUpdate and clean up

* make draggableSelector optional, fallback to element

* implement umb-block-grid-sorter for Area PreValue editor

* remove sortableJS dependency

* remove sortableJs from dependencies

* wups, bring back the comma

* removed sortablejs from package-lock

* finished implementation of sorter for PreValue Block Areas

* fix for FireFox shadowDom issue, contains temprorary code.

* stop auto scroll

* make full thing dragable

* fix firefox issue (applying translateZ)

* comment

* make block fit in context columns

* revert element to where it came from if sync could not succeed + clean up

* ensure block does not push the amount of columns, this occourse when dragging item around.

* take horizontalPlaceAfter into account

* implement horizontalPlaceAfter in Areas Prevalue editor

* clean up dependencies

* Shift related el to first in row or last in row when there is no horizontal room

* clean up and correct calculation

* remove unused attribute

* revert to using el.getBoundingClientRect(), as the config.draggableSelector is not available for the placeholder item.

* bind model via dedicated binding to ensure it stay connected with the source model

* Update src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/prevalue/umb-block-grid-area-editor.html

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>

* fix eslint issues

* ensure missingColumnWidth is above 0

* Do not allow dragging something thats not found in the model.

* remove as this is not an error.

* update to Flexbox solution

* as the complex model does not change we can use single way binding

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>

* Block Grid Editor adjust while sorting (#13442)

* make sure area border is on top of block views.

* rename class to avoid confusion

* change witch UI goes on top on hover

* Description informing all blocks are allowed when none is configured.

* add 'When empty'

* Sort mode

* ability to switch out property actions

* enter and exit sortmode from property actions

* gridsortblock

* rename block class to use sortblock

* Sort mode styling

* remove unused css selector

* fixing style for inline-creat button to appear above and not when hovering contextbar

* work on block grid inline editor

* use uui-button + enable installing demo blocks when its not the first dataType of this kind.

* improvements to inline editing POC

* update title of area config overlay editor

* reset columnSpan if no column span options is defined.

* Inline editing

* remove html comment

* remove code for transfer of stylesheets

* ability to hide label from directive

* inline editing using slots to render the umb-property in light dom

* remove property editor proxies when moving a block to a new area/block/context

* minor adjustments to custom views

* use individual slots for each area.

* Inline editing

* a little smaller rte min-height

* fire Custom focus/blur event for Block Grid Editor to catch for focus imitation

* disable inline editing prevalue field when custom view is set

* Fix scroll parent block into view

* initial work on sorter directive

* remove mediaBlock controller

* initial notes and structure

* further concept work

* remove consol log

* CSS for getting bigger areas

* removal of the forceLeft/forceRight code

* proven concept

* fix grid space detection. vertical/horizontal

* clean up and notes

* move into inner containers as well

* use last available index pr default

* boundary selector, for improved choise of dropping into an area

* hide last inline create button when dragging around

* remove console.log

* removal of forced placement in css

* default config and clean up

* notes

* bring back removed code

* show area ui when in dragging mode

* more specific selector

* drop allowance + clean up

* notes and clean up

* auto scroll

* turn --umb-block-grid--dragging-mode into conditional CSS Custom Property

* auto scroll

* refactoring

* fix condition mistake

* scope.config.resolveVerticalDirection

* wrap up simple setDragImage solution

* bring back vm.notifyVisualUpdate and clean up

* make draggableSelector optional, fallback to element

* implement umb-block-grid-sorter for Area PreValue editor

* remove sortableJS dependency

* remove sortableJs from dependencies

* wups, bring back the comma

* removed sortablejs from package-lock

* finished implementation of sorter for PreValue Block Areas

* fix for FireFox shadowDom issue, contains temprorary code.

* stop auto scroll

* make full thing dragable

* fix firefox issue (applying translateZ)

* comment

* make block fit in context columns

* revert element to where it came from if sync could not succeed + clean up

* ensure block does not push the amount of columns, this occourse when dragging item around.

* take horizontalPlaceAfter into account

* implement horizontalPlaceAfter in Areas Prevalue editor

* clean up dependencies

* Shift related el to first in row or last in row when there is no horizontal room

* clean up and correct calculation

* remove unused attribute

* revert to using el.getBoundingClientRect(), as the config.draggableSelector is not available for the placeholder item.

* bind model via dedicated binding to ensure it stay connected with the source model

* Update src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/prevalue/umb-block-grid-area-editor.html

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>

* fix eslint issues

* ensure missingColumnWidth is above 0

* Do not allow dragging something thats not found in the model.

* remove as this is not an error.

* update to Flexbox solution

* as the complex model does not change we can use single way binding

* Adjust columnSpan to context container, keep start columnSpan as the target for the calculation.

* change let to const

* Revert "change let to const"

This reverts commit fe19f8c.

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>

* Block Grid Editor - make prevalue overlay medium sized (#13443)

* make sure area border is on top of block views.

* rename class to avoid confusion

* change witch UI goes on top on hover

* Description informing all blocks are allowed when none is configured.

* add 'When empty'

* Sort mode

* ability to switch out property actions

* enter and exit sortmode from property actions

* gridsortblock

* rename block class to use sortblock

* Sort mode styling

* remove unused css selector

* fixing style for inline-creat button to appear above and not when hovering contextbar

* work on block grid inline editor

* use uui-button + enable installing demo blocks when its not the first dataType of this kind.

* improvements to inline editing POC

* update title of area config overlay editor

* reset columnSpan if no column span options is defined.

* Inline editing

* remove html comment

* remove code for transfer of stylesheets

* ability to hide label from directive

* inline editing using slots to render the umb-property in light dom

* remove property editor proxies when moving a block to a new area/block/context

* minor adjustments to custom views

* use individual slots for each area.

* Inline editing

* a little smaller rte min-height

* fire Custom focus/blur event for Block Grid Editor to catch for focus imitation

* disable inline editing prevalue field when custom view is set

* Fix scroll parent block into view

* initial work on sorter directive

* remove mediaBlock controller

* initial notes and structure

* further concept work

* remove consol log

* CSS for getting bigger areas

* removal of the forceLeft/forceRight code

* proven concept

* fix grid space detection. vertical/horizontal

* clean up and notes

* move into inner containers as well

* use last available index pr default

* boundary selector, for improved choise of dropping into an area

* hide last inline create button when dragging around

* remove console.log

* removal of forced placement in css

* default config and clean up

* notes

* bring back removed code

* show area ui when in dragging mode

* more specific selector

* drop allowance + clean up

* notes and clean up

* auto scroll

* turn --umb-block-grid--dragging-mode into conditional CSS Custom Property

* auto scroll

* refactoring

* fix condition mistake

* scope.config.resolveVerticalDirection

* wrap up simple setDragImage solution

* bring back vm.notifyVisualUpdate and clean up

* make draggableSelector optional, fallback to element

* implement umb-block-grid-sorter for Area PreValue editor

* remove sortableJS dependency

* remove sortableJs from dependencies

* wups, bring back the comma

* removed sortablejs from package-lock

* finished implementation of sorter for PreValue Block Areas

* fix for FireFox shadowDom issue, contains temprorary code.

* stop auto scroll

* make full thing dragable

* fix firefox issue (applying translateZ)

* comment

* make block fit in context columns

* revert element to where it came from if sync could not succeed + clean up

* ensure block does not push the amount of columns, this occourse when dragging item around.

* take horizontalPlaceAfter into account

* implement horizontalPlaceAfter in Areas Prevalue editor

* clean up dependencies

* Shift related el to first in row or last in row when there is no horizontal room

* clean up and correct calculation

* remove unused attribute

* revert to using el.getBoundingClientRect(), as the config.draggableSelector is not available for the placeholder item.

* bind model via dedicated binding to ensure it stay connected with the source model

* Update src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/prevalue/umb-block-grid-area-editor.html

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>

* fix eslint issues

* ensure missingColumnWidth is above 0

* Do not allow dragging something thats not found in the model.

* remove as this is not an error.

* update to Flexbox solution

* as the complex model does not change we can use single way binding

* Adjust columnSpan to context container, keep start columnSpan as the target for the calculation.

* make prevalue editor overlay medium size

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>

* block grid editor visual adjustments (#13446)

* make sure area border is on top of block views.

* rename class to avoid confusion

* change witch UI goes on top on hover

* Description informing all blocks are allowed when none is configured.

* add 'When empty'

* Sort mode

* ability to switch out property actions

* enter and exit sortmode from property actions

* gridsortblock

* rename block class to use sortblock

* Sort mode styling

* remove unused css selector

* fixing style for inline-creat button to appear above and not when hovering contextbar

* work on block grid inline editor

* use uui-button + enable installing demo blocks when its not the first dataType of this kind.

* improvements to inline editing POC

* update title of area config overlay editor

* reset columnSpan if no column span options is defined.

* Inline editing

* remove html comment

* remove code for transfer of stylesheets

* ability to hide label from directive

* inline editing using slots to render the umb-property in light dom

* remove property editor proxies when moving a block to a new area/block/context

* minor adjustments to custom views

* use individual slots for each area.

* Inline editing

* a little smaller rte min-height

* fire Custom focus/blur event for Block Grid Editor to catch for focus imitation

* disable inline editing prevalue field when custom view is set

* Fix scroll parent block into view

* initial work on sorter directive

* remove mediaBlock controller

* initial notes and structure

* further concept work

* remove consol log

* CSS for getting bigger areas

* removal of the forceLeft/forceRight code

* proven concept

* fix grid space detection. vertical/horizontal

* clean up and notes

* move into inner containers as well

* use last available index pr default

* boundary selector, for improved choise of dropping into an area

* hide last inline create button when dragging around

* remove console.log

* removal of forced placement in css

* default config and clean up

* notes

* bring back removed code

* show area ui when in dragging mode

* more specific selector

* drop allowance + clean up

* notes and clean up

* auto scroll

* turn --umb-block-grid--dragging-mode into conditional CSS Custom Property

* auto scroll

* refactoring

* fix condition mistake

* scope.config.resolveVerticalDirection

* wrap up simple setDragImage solution

* bring back vm.notifyVisualUpdate and clean up

* make draggableSelector optional, fallback to element

* implement umb-block-grid-sorter for Area PreValue editor

* remove sortableJS dependency

* remove sortableJs from dependencies

* wups, bring back the comma

* removed sortablejs from package-lock

* finished implementation of sorter for PreValue Block Areas

* fix for FireFox shadowDom issue, contains temprorary code.

* stop auto scroll

* make full thing dragable

* fix firefox issue (applying translateZ)

* comment

* make block fit in context columns

* revert element to where it came from if sync could not succeed + clean up

* ensure block does not push the amount of columns, this occourse when dragging item around.

* take horizontalPlaceAfter into account

* implement horizontalPlaceAfter in Areas Prevalue editor

* clean up dependencies

* Shift related el to first in row or last in row when there is no horizontal room

* clean up and correct calculation

* remove unused attribute

* revert to using el.getBoundingClientRect(), as the config.draggableSelector is not available for the placeholder item.

* bind model via dedicated binding to ensure it stay connected with the source model

* Update src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/prevalue/umb-block-grid-area-editor.html

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>

* fix eslint issues

* ensure missingColumnWidth is above 0

* Do not allow dragging something thats not found in the model.

* remove as this is not an error.

* update to Flexbox solution

* as the complex model does not change we can use single way binding

* Adjust columnSpan to context container, keep start columnSpan as the target for the calculation.

* make prevalue editor overlay medium size

* more white borders on UI

* move Catalogue appearance to Advanced

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>

* Display media trashed state on custom view for image demo block (#13448)

* Block Grid Editor translations and Area size keyboard navigation (#13450)

* use custom prop for calculated width (#13451)

* Bump engine.io and socket.io in /src/Umbraco.Web.UI.Client

Bumps [engine.io](https://github.com/socketio/engine.io) and [socket.io](https://github.com/socketio/socket.io). These dependencies needed to be updated together.

Updates `engine.io` from 6.1.3 to 6.2.1
- [Release notes](https://github.com/socketio/engine.io/releases)
- [Changelog](https://github.com/socketio/engine.io/blob/main/CHANGELOG.md)
- [Commits](socketio/engine.io@6.1.3...6.2.1)

Updates `socket.io` from 4.4.1 to 4.5.3
- [Release notes](https://github.com/socketio/socket.io/releases)
- [Changelog](https://github.com/socketio/socket.io/blob/main/CHANGELOG.md)
- [Commits](socketio/socket.io@4.4.1...4.5.3)

---
updated-dependencies:
- dependency-name: engine.io
  dependency-type: indirect
- dependency-name: socket.io
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Cherry pick #13373 to v10/dev

* remove the hidding of catelouge appearance as its not located under advance (#13456)

* Fix preview issue for new (empty) variants (#13455)

* Fix save and preview for new (unsaved) variants

* Rework & simplify

* Rollback improvements (#13452)

* Rollback improvements - hide draft version, allow rolling back to last published version

* UX improvements to rollback, revert some overly complex logic in favor of better UX

* Ensure title update when changing rollback version

* Clean up

* Fix rollback playwright text

* Cherry pick #13404 to v10

* Delete references using custom relation types (#13389)

undefined

* V11: Fix ordering by published in list of content (#13474)

* Update sort statement to use published field for invariant content

* Order by published if invariant

* Add support for tags in block editors and nested content (#13412)

* feat: add tags extension points and remove hardcoded tags handling

* feat: allow tags editor in nested content and block editors

* Update src/Umbraco.Infrastructure/PropertyEditors/TagsPropertyEditor.cs

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>

* Update src/Umbraco.Web.BackOffice/Controllers/ContentControllerBase.cs

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>

* Ensure that all automatic relation types are updated (#13470)

* Make sure contexbar fits within the available space (#13467)

* Make sure contexbar fits within the available space

* Ensuring context bar moves above, no matter size of it.

* Fixing apperance of connection-fixers

* do not set layout gaps (#13496)

* V10/feature/fixing flaky acceptance test (#13473)

* Updated Forms dependency for JSON schema to the latest version. (#13505)

* Accessibility - Fix Packages - Modal - Empty buttons (#13114)

* Changing the way we create the temp file for SQLite file (#13439)

* Fix concurrency issue in UmbracoMapper (#13524)

* Add logging to UmbracoMapper

* Add NullLogger to tests

Co-authored-by: Zeegaan <nge@umbraco.dk>

* Allow indexing variant nodes when not all variants are published - fixes issues 11383. (#12669)

* This fixes issues 11383.
The introduction of the new Examine library caused an unintended consequence that it stopped indexing of nodes with language variants on them when one of the variants was unpublished.

These changes align ValueSetValidationStatus.Filtered to indicate that a node is intended as filtered out of a search, not that parts of its contents had been excluded from the result.

This brings it inline with how it is used in Umbraco.Examine.Lucene/UmbracoContentIndex

Unit tests changed to indicate the intent of ValueSetValidationStatus.Filtered

Change to UmbracoViewPage to make model variable nullable (because the solution wouldn't build otherwise on 2022)

* revert to use explicit type instead of var

Co-authored-by: Nathan Woulfe <nathan@nathanw.com.au>
Co-authored-by: Bjarke Berg <mail@bergmania.dk>

* V11/feature/flaky test work (#13513) (#13527)

* Removed all the DeleteAllContent since I delete the doctypes in the before and after each functions which also deletes the content.

* fixed the test so it selects the specific button!

* I was dumb and forgot to remove the out commented code

* Added additional timeout so the pipeline has more time

* Removed language in settings because it was a duplicate of languages / languages

* Fixed the tests so they now check if each individual language that was created actually exists instead of checking for how many languages there are which could be flaky if another test touching the languages failed

* Bumped version

* Added a better locator for the buttons and increased timeouts

Signed-off-by: Zeegaan <nge@umbraco.dk>

Signed-off-by: Zeegaan <nge@umbraco.dk>
Co-authored-by: Andreas Zerbst <73799582+andr317c@users.noreply.github.com>

* Fix for issue 13017 - BeginUmbracoForm doesn't work with custom umbraco routes (#13103)

* Fix issue with custom Umbraco routes not working after submitting to a Surface controller

* Added comments

* Fixed breaking changes

* Fixed test by using correct new ctor

* Fixed initializtion of UmbracoRouteValueTransformer due to ambiguous ctor

Co-authored-by: Bjarke Berg <mail@bergmania.dk>

* Rollback project imports

* Remove duplicated lines in translations

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Zeegaan <nge@umbraco.dk>
Co-authored-by: Nikolaj <nikolajlauridsen@protonmail.ch>
Co-authored-by: patrickdemooij9 <patrickdemooij98@hotmail.com>
Co-authored-by: Sebastiaan Janssen <sebastiaan@umbraco.com>
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Ronald Barendse <ronald@barend.se>
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
Co-authored-by: Søren Kottal <sk@ecreo.dk>
Co-authored-by: Zeegaan <nge@umbraco.dk>
Co-authored-by: Mads Rasmussen <madsr@hey.com>
Co-authored-by: Elitsa Marinovska <elm@umbraco.dk>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Blake Watt <bkclerke@users.noreply.github.com>
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
Co-authored-by: niekvanderreest <niekvanderreest@hotmail.com>
Co-authored-by: Bjarne Fyrstenborg <bjarne_fyrstenborg@hotmail.com>
Co-authored-by: Rasmus John Pedersen <mail@rjp.dk>
Co-authored-by: Andreas Zerbst <73799582+andr317c@users.noreply.github.com>
Co-authored-by: Jan Skovgaard <1932158+BatJan@users.noreply.github.com>
Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>
Co-authored-by: Jonny Muir <jonnymoo@hotmail.com>
Co-authored-by: Nathan Woulfe <nathan@nathanw.com.au>
Co-authored-by: Justin Neville <67802060+justin-nevitech@users.noreply.github.com>
@jgettrup-ng
Copy link

We're looking forward to seeing this new drag and drop upload function in the v10 media library, as we'd also like to see a fix for #13210 ("Select media type" dialog being ignored), which we're experiencing in v10.3.2.
As part of this work, could I also ask that you look again at another issue with the current v10 drag and drop media upload that I raised, but I don't feel was fully addressed.
My original comment is here: #11858 (comment) and this issue is still a problem in v10.3.2. It would be great if this could be fixed by the new drag and drop. Thank you.

@Zeegaan
Copy link
Member

Zeegaan commented Dec 12, 2022

Hey @jgettrup-ng We have #13210 as part of our backlog 👍
As for the other issue in your comment, could I get you to create an issue for it? This way we can make sure it's publicly visible and can be tracked 🙏

@jgettrup-ng
Copy link

jgettrup-ng commented Dec 19, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants