Skip to content

Instantly share code, notes, and snippets.

@AleksueiR
Last active February 15, 2018 13:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AleksueiR/ce9fbaf284276b9ba3ed7b7c53a26635 to your computer and use it in GitHub Desktop.
Save AleksueiR/ce9fbaf284276b9ba3ed7b7c53a26635 to your computer and use it in GitHub Desktop.
CIP - maintenance issues

Routes and bookmark and app store

  • need to select a set of parameters that go into the bookmark [store/app.ts]
    • right now we use: timePeriodId, variableId, datasetId, stationId, centerPoint, zoomLevel
    • change stationId to featureId since not all the data is in points
    • add interestPoint parameter storing the location of the station/user-click on the polygon (this will be used to center to top-map in the chart-view)
    • is there anything else we need to plan for with future datasets?
    • are we concerned about url length?
  • add the current view is also stored on the bookmark (map/chart) to the app store [store/app.ts]
  • need to fix query parsing logic (loading from a bookmark) [app.vue, components/map-instance.vue]
    • right now the map will not zoom/pan to the center point on the bookmark
  • need to consolidate logic responsible for updating the current route (bookmark url) on user action (map pan, variable selection, etc.)
    • right now the code updating routes is all over the place, and there is a bit of duplication (chart-view.vue for example)
  • need to handle the null-state loading (no bookmark, no store values) [app.vue]
    • right now the view, variable, station are being hardcoded on the first load
  • store the map instance in the app store for other components' access [store/app.ts]

APIs

  • need to solve chart data being pulled multiple times by the mini-chart and the main chart [components/chart-view.vue, components/map-instance.vue]

    • abstract data retrieval logic
    • cache previous results (maybe just a couple or the last one; they could be cached in the app store)
  • it seems RAMP PR with API layer manipulation support has been merged

    • switch from destroy/create map solution to add/remove layers [components/map-instance.vue]
      • this will require a bit of clean up - if we don't ever reload the whole map, we don't need to worry about loose listeners being left alone (that logic can be scrapped then)

Multiple Define and jQuery Datatables

  • check if force-loading datatables before RAMP solves the multiple-define problem for good
    • check if WET tries to load another set of datatable files
  • [?] remove jQuery Datatables from RAMP build (as part of RAMP optimization ?

Variable, Dataset, and other selector configs

  • consolidate configurations for various selectors - right now they are hardcoded into the components themselves [components/variable|dataset|time-period-selector.vue]
    • decide how and where these configs should be stored
  • decide on the final configuration of the variable selector [components/variable-selector.vue]
    • each variable flavour (future, historic) needs a list of possible datasets

Geosearch / Map

  • [components/map-instance.vue]
  • decide on feature highlighting strategy (native RAMP methods exposed through the API or custom build based on the existing hacky solution)
    • existing hacky solution needs a fix for IE11 - cannot offset the point correctly
  • move scroll guard into its own component
  • move mini-chart into its own component
  • decide where tooltip configs are stored and how they are accessed
  • implement proper logic for offsetting the map center point
    • offset can change if the browser window is resized
    • also storing the real center point on the bookmark
  • find a non-timeout solution for displaying a center marker on geosearch results click

Chart View

  • replace the chart legend section with a custom HTML component - the legend section is part of Highcharts and is rendered in SVG which makes it really hard to modify [components/chart-view.vue]
    • this will likely change the chart export output - find a way to include the legend section in the exported image anyway (might not be trivial, need investigation)
    • keep the current SVG legend section if we can avoid long string there which wrap
  • .csv export of the user defined range seems to be broken - the full range is being downloaded

General

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