-
Notifications
You must be signed in to change notification settings - Fork 409
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
#9248 - Import/export an application context #9270
#9248 - Import/export an application context #9270
Conversation
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 tried to export a new context and it has a strange format. is there a reason for this?
- It inclues a
resource
-->data
tree containing the effective data to exportallTemplates
should not be exportedpluginsConfig
should not be exported too
Please save only the content of resource --> data content in the root, consistent with the data saved on the server.
Trying to import the context doesn't replace:
- It inclues a
-
When importing a context on an existing one (navigating to the map and back before to import) the map is not updated
screencast-drive.google.com-2023.07.05-16_09_44.webm -
The import export buttons are available only on the first screen. I suggest to show them in all the windows (export is correct to be always available, import should be disabled on steps > 1. I suggest to disable it and show a tooltip saying "to import a context, go to step 1).
Other points:
- the context name is not replaced. Anyway after disussion we agreed that not replacing it is the best solution
@offtherailz
The reason for not replacing name is because, the name is unique, replacing it with imported value will cause a duplication which will force the user to modify it anyway. Importing on an existing context (saved context), the name is retained from the exisiting context so it works just like updating the context which will replace everything else except the name and id |
After discussion I updated the point you mention with the result of our discussion, avoiding to replace the name at all |
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.
- JSON still contains a "data" root. it have to be identical to the context JSON coming from the server. so something like
{ "windowTitle": "Save test", "mapConfig": {...}
- As wel as I export and import map and windowTitle seems not to be imported correctly
screencast-github.com-2023.07.07-17_52_43.webm
Stopping here with the review. Please make sure that everything works fine before re-requesting the review.
@offtherailz Ready for review now. Thanks! |
I supposed it was something like this, It was too much strange 😄 |
@ElenaGallo |
Hi @dsuren1, import_export_context.mov |
@ElenaGallo We can but it behaves just like every other export tool making it consistent. ex: Dashboard where you can export a new dashboard without adding any widget. (Maybe we can enable it always too 🤔) @offtherailz @tdipisa Kindly let me know your thoughts |
Yes, as per my discussion with @dsuren1 today.
we ca ignore this for the moment. The current behavior is in line with export of other resources. The export is taking the current state of a context and special cases, like the resource name check, seems already properly considered. |
Description
This PR adds feature in context creator wizard to import/export the selected context.
The plugins are enabled by default under
context-creator
.Please check if the PR fulfills these requirements
What kind of change does this PR introduce? (check one with "x", remove the others)
Issue
What is the current behavior?
What is the new behavior?
User can export and import the context into context creator. Existing context will be replaced if any during import.
The name of the context is view is upon context import to avoid duplication
Breaking change
Does this PR introduce a breaking change? (check one with "x", remove the other)
Other useful information