Open cayb0rg opened 5 months ago
Overall, awesome start on this feature :+1: Some initial thoughts:
My one concern is exporting qsets that contain media assets, since those assets aren't included and assume the qset will be installed in the same system (?)
That's a good point. "Export Qset" simply exports the qset with no assets attached while "Export All" will. I think this could be explained in the intermediate modal. Even so, uploading assets to a new system would likely change the IDs, rendering the qset image ids useless. I would like to enable instance+media transfer between systems, so I'll look into this.
We don't really expose "instances" and "qsets" as terminology anywhere else, so there may be confusion with just having those options available without any kind of explanation. What about replacing the 3-button menu (which looks great, btw) with a generic "Export" icon, which provides an intermediate modal explaining the two options and their purpose?
I was worried about the wording here as well. I like that idea and think it will clarify things for the user.
The Import Instance option is kinda hidden down there at the bottom of the instance list, but I think that's okay - it's not likely to be a widely-used feature, so I'm okay making it a little obfuscated.
If you think I should make it a different color (like the orange) to make it stand out more, I can do that. My intention here was to make it slightly more hidden since it's not widely-used as you said, and I see it as more of an advanced option.
The creator Save History dialog is missing the close/cancel option, and it might benefit from being renamed to something like "Manage Saves" if it's going to be extended to handle import/export as well.
👍🏻
The toasts are awesome, I love them! However I did notice that they need a bigger z-index value as they tend to hide between certain other UI elements. Maybe they're just shy.
Haha, good catch!
Also, sorry for taking so long to respond.
This PR adds an instance importer/exporter to a few components:
Second Iteration
Save History:
User Managed Instances/Admin Instance Search:
Toast:
First Iteration (Meatball Menu)
My Widgets Page:
Details
Media exporting works for new and updated widgets only and will not appear for widgets with missing entries in the
map_asset_to_object
table. This table was not being properly updated inWidget_Question::db_store
(NEEDS CHECK ON PROD).Details:
apiGetQuestionSet
andapiGetWidgetInstance
to use object syntax for parametersWhile I don't see a use case for importing media in Materia itself (since we're just pointing at already existing assets), this is something that would most likely need to be added in the Materia Community Library.
To do:
Fix import instance button styling?Reduce/reword export option menu items?Certain widgets store media assets in other locations such as Labeling. Add these assets to themap_asset_to_object
table as well through a recursive search