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

[ExportAsJson] Multiple aliases of the same object in an export bug and conditionally styled display items bug #6601

Closed
3 of 7 tasks
jvigliotta opened this issue Apr 18, 2023 · 2 comments · Fixed by #6602
Closed
3 of 7 tasks

Comments

@jvigliotta
Copy link
Contributor

jvigliotta commented Apr 18, 2023

Summary

When a display layout contains an aliased object more than once (ex. aliased plot, embedded display layout with the same aliased plot) trouble follows. The reason is when replacing aliased objects in the export, we create a new identifier for each one, when we should only create ONE new identifier and use that with a different location for subsequent same aliases.

Expected vs Current Behavior

When you export a display with multiple aliases of the same object, it should export/import without issues. Currently, the duplicate aliases will either not show at all or will lose any configuration information related to the display (display, size, etc).

Steps to Reproduce

For Multiple Aliases Bug

  1. Create a display layout and any other object in a folder
  2. Drag the other object into the display layout (creating an alias in the display layout) somewhere in the middle
  3. Create another display layout inside of the first display layout, move it away toward the middle as well and save it
  4. Drag the other original object into the new embedded display layout (it should also be an alias)
  5. Now export the display layout
  6. Now import the display layout
  7. One of the aliases will either disappear or lose it's positioning and end up in the top left corner of the display

For Conditionally Styled Items bug

  1. Repeat above steps to Step 4.
  2. Create a Condition Set styled by some telemetry endpoint (both outside of the display layout to be exported)
  3. Use the condition set to conditionally style the items in the display layout
  4. Export the display layout
  5. Import the display layout
  6. Make sure that the conditionally styled items are still conditionally styled
  7. Make sure the object used to conditionally style the items is shown in the styles tab in the inspector

Impact Check List

  • Data loss or misrepresented data?
  • Regression? Did this used to work or has it always been broken?
  • Is there a workaround available? If you duplicate the item first (removing any aliases) then you can export it without issue
  • Does this impact a critical component?
  • Is this just a visual bug with no functional impact?
  • Does this block the execution of e2e tests?
  • Does this have an impact on Performance?

Additional Information

Structure

Screen Shot 2023-04-18 at 3 57 45 PM

Before Export

Screen Shot 2023-04-18 at 3 52 38 PM

After Import

Screen Shot 2023-04-18 at 3 54 17 PM

@jvigliotta jvigliotta self-assigned this Apr 18, 2023
@jvigliotta
Copy link
Contributor Author

Testing

  • Follow the reproduction steps

@unlikelyzero unlikelyzero added this to the Target:2.2.3 milestone Apr 19, 2023
@jvigliotta jvigliotta changed the title [ExportAsJson] Multiple aliases of the same object in an export will break display layouts [ExportAsJson] Multiple aliases of the same object in an export bug and conditionally styled display items bug Apr 20, 2023
@charlesh88
Copy link
Contributor

Verified fixed Testathon 2023-05-11. Nice work!

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

Successfully merging a pull request may close this issue.

4 participants