Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save danbahrami/34e6d8472826ae075c10779d0dae58c7 to your computer and use it in GitHub Desktop.
Save danbahrami/34e6d8472826ae075c10779d0dae58c7 to your computer and use it in GitHub Desktop.
Liggi's GA account/property/view treeselect work breakdown

Liggi's GA account/property/view treeselect work breakdown

GROUP ONE

  • Start with a simpler implementation, like FacebookAds
  • Add service_account_prerequisites into metadata, to define the fields that are required in hierarchical order
  • Add a build_prerequisite_options into metadata, to take some data and turn it into a hierarchy of options
  • Add "prerequisites" into UI Query state
  • In bootstrapGraph method in universal-bootstrap-actions, load the data needed, and use it to build the prerequisite options, then set this into UI state

NOTES: Might need to disable a try/catch in the saFilterValues function that ignores empty data to stop it from swallowing useful errors.

At this point, we can verify that the prerequisites are being loaded correctly. We could also create the build_prerequisite_options for Google Analytics at this point too, to ensure it works in a circumstance with an actual hierarchy.

GROUP TWO

  • For existing widgets, be able to load the existing values into a non-functional tree-select
  • In bootstrapGraph, pull the relevant "prerequisite" values out of the existing query for a widget, and rehydrate the UI query state using that

GROUP THREE

  • For new widgets, be able to select the first value for each prerequisite automatically as the default value
  • In bootstrapGraph, if no actual value has been set for the prerequisite, set the defaults

At this point, we can verify if the tree-select is populating in both the existing and new widget cases. Once that's verified, we can move onto the final group:

GROUP FOUR

  • Modify the switch-account-selector to apply the selected values to the UI query prerequisites state
  • Verify the entire process end-to-end

GROUP FIVE

  • Implement the build_prerequisite_options function for each current integration
  • Replace the current selection with the tree-select
  • Fix up anything that needs to be fixed up, like acceptance and safeguard specs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment