-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Skip move logic if the parent is staying the same #12937
Merged
mikecp
merged 6 commits into
umbraco:v10/contrib
from
CyberReiter:v10/feature/skip-move-logic
Sep 9, 2022
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
31eaa7d
v10/feature/skip-move-logic: add logic to skip move logic when parent…
CyberReiter 3552ac9
v10/feature/skip-move-logic: remove unnecessary checks
CyberReiter 6c3fea3
remove check for mediaservice as there is already one in place
CyberReiter 4b7c20a
remove unnecessary using
CyberReiter 4289c81
added parent checks for dictionary items
CyberReiter 5465464
changing behaviour for contenttypes, datatypes and mediatypes to show…
CyberReiter File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I saw your comment about the promise not being returned on time, but what about keeping the promise and having something like
promise ?? 'Failed to move content type'
This way, if the promise ever gets returned on time, we get the foreseen label and otherwise we have a fallback.
What do you think? (same question in mediatype.resource of course😁 )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
problem is that the promise is not null but an Promise object so this won't work 🤔
There also does not seem to be an easy way of waiting for the promise to finish as there is no way to check for the state of it.
Only possibility that comes to my mind would be to have a bool which would be set to true if the promise finished in time and then set the message based on in it like so
isFinished ? promise : 'Failed to move content type'
However by doing this we would introduce a 3rd way of handling this message as we already have the way it is done on the data types (static message) and another way for media (static message + taking some of the translation from the api response)
Umbraco-CMS/src/Umbraco.Web.UI.Client/src/common/resources/media.resource.js
Line 130 in a0d6732
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your comments @CyberReiter !
In that case, I would suggest to keep things as they are. It's already a great improvement, so it should not hold us from merging all this 😁
Thanks again for this update 👍
Cheers!