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

Update Golden Layout #369

Open
alancleary opened this issue Sep 17, 2021 · 0 comments
Open

Update Golden Layout #369

alancleary opened this issue Sep 17, 2021 · 0 comments

Comments

@alancleary
Copy link
Contributor

alancleary commented Sep 17, 2021

A new major release of Golden Layout is available. Unfortunately, this has many changes that break GCV. The breaking changes I am currently aware of are:

  • The new version is implemented in TypeScript so Golden Layout should now be imported with import { GoldenLayout } from 'golden-layout' rather than as a script in the angular.json file.
  • Items no longer have a getItemsById method, which GCV heavily uses. This can be resolved by iterating an item's contentItems array and filtering those items by id and (regardless of id) recursively searching their contentItems, although it may be requesting that this feature be added back.
  • Nested stacks are no longer supported; only items of type component can be a direct descendant of a stack. So GCV either needs to drop its nested stacks (e.g. dot plots) or we need to request that this functionality be added back.
  • Golden Layout now copies item configurations when creating an item from a configuration. A deep copy is used but the properties copied are limited to an object's own properties, meaning GCV's prototype chains are not preserved by this copy (e.g. dot plots can't be retrieved because this requires attributes up the prototype chain). This could be resolved by making our own copies first that flatten the prototype chain, but having support for the prototype chain copy build into Golden Layout would be ideal.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant