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

Autolegend #376

Closed
wants to merge 2 commits into from
Closed

Autolegend #376

wants to merge 2 commits into from

Conversation

mohsin-r
Copy link
Member

@mohsin-r mohsin-r commented Aug 20, 2024

Related Item(s)

config-editor#34
config-editor#35

Changes

  • [FEATURE] In the layers section of the config editor, there is now a button called "autopopulate legend". When you click this, a layer item will be created in the legend for each layer that does not already have one. Additionally, every layer item in the legend config that does not have a corresponding layer in the layers config will be removed. This acts as a temporary autolegend until one exists in RAMP.
  • [FEATURE] Editing the layer's ID in the layers config automatically updates the layerId field for the layer item in the legend config, if it exists.

Notes

  • This PR also refactors a significant portion of the config editor code. Would be good to do a quick sanity check of previous functionality.

Testing

Steps:

  1. Open the config editor.
  2. Add a number of layers.
  3. Click autopopulate.
  4. Ensure the legend config updates.
  5. Remove a number of layers.
  6. Click autopopulate again.
  7. Ensure the legend config updates.

This change is Reviewable

Copy link

Your demo site is ready! 🚀 Visit it here: https://ramp4-pcar4.github.io/storylines-editor/autolegend

Copy link
Member

@szczz szczz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works well, but we probably want to grouse at the user if they try to autopopulate without entering layer IDs

Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @mohsin-r)

@mohsin-r
Copy link
Member Author

Donethanks. Also updated config editor to use RAMP npm 4.8

Copy link
Member

@yileifeng yileifeng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 3 of 3 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @mohsin-r)

@mohsin-r
Copy link
Member Author

Have added a commit that externalizes RAMP in the config editor. Config editor build file is now 900KB.

Copy link
Member

@RyanCoulsonCA RyanCoulsonCA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 3 files at r2, 3 of 3 files at r3, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @mohsin-r)

@mohsin-r
Copy link
Member Author

mohsin-r commented Sep 4, 2024

Would be better to review this stuff in #382 as that is the most updated. Closing this PR!

@mohsin-r mohsin-r closed this Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants