-
Notifications
You must be signed in to change notification settings - Fork 16
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
Implement variant editor #34
Comments
The current implementation (if Some more notes (unrelated to the UI)According to https://neos-media.readthedocs.io/en/stable/VariantPresets.html
But that's not true, since the
But apparently no further work has been invested in that area. If the variant configuration is changed / amended, image variants can be created "after the fact" via:
|
The adjusted GraphQL API could look something like this: Index: Packages/Application/Flowpack.Media.Ui/Resources/Private/GraphQL/schema.root.graphql
<+>UTF-8
===================================================================
diff --git a/Packages/Application/Flowpack.Media.Ui/Resources/Private/GraphQL/schema.root.graphql b/Packages/Application/Flowpack.Media.Ui/Resources/Private/GraphQL/schema.root.graphql
--- a/Packages/Application/Flowpack.Media.Ui/Resources/Private/GraphQL/schema.root.graphql
+++ b/Packages/Application/Flowpack.Media.Ui/Resources/Private/GraphQL/schema.root.graphql (date 1645187908718)
@@ -130,6 +130,8 @@
updateAssetCollection(id: AssetCollectionId!, title: String, tagIds: [TagId]): AssetCollection!
updateTag(id: TagId!, label: String): Tag!
+
+ updateImageVariantCropping(presetId: AssetVariantPresetId!, variantName: AssetVariantName!, x: Int!, y: Int!, width: Int!, height: Int!): AssetVariant
}
"""
@@ -168,6 +170,8 @@
# height in pixels (only for Images and Videos)
height: Int
+ variants: [AssetVariant!]!
+
file: File!
thumbnailUrl: Url
previewUrl: Url
@@ -260,6 +264,17 @@
alt: String
}
+"""
+The variant of an asset (see https://neos-media.readthedocs.io/en/stable/VariantPresets.html)
+"""
+type AssetVariant {
+ presetId: AssetVariantPresetId!
+ name: AssetVariantName!
+ label: String!
+ description: String!
+ asset: Asset!
+}
+
"""
The result of a single file upload
"""
@@ -414,6 +429,16 @@
"""
scalar Upload
+"""
+Unique identifier of an Asset Variant Preset (e.g. "Some.Package:ImageRatios")
+"""
+scalar AssetVariantPresetId
+
+"""
+Name of a specific Asset Variant (e.g. "Some.Package:Square")
+"""
+scalar AssetVariantName
+
schema {
query: Query
mutation: Mutation |
Add support for Asset Variants as described in the Media Docs:
Neos.Media.features.variantsTab
configuration be evaluated?)(text added by @bwaidelich)
The text was updated successfully, but these errors were encountered: