LocalGround / localground

Other
18 stars 7 forks source link

Feature legend updates #202

Closed gitriley closed 6 years ago

gitriley commented 6 years ago

New functionality for presentation legend. Check to make sure layers and symbols are displaying correctly. e.g.:

example - uniform symbols: screen shot 2018-07-06 at 6 24 45 pm

example - symbols expanded: screen shot 2018-07-06 at 6 24 18 pm

example - symbols collapsed: screen shot 2018-07-06 at 6 24 11 pm

vanwars commented 6 years ago

Hi Riley, This looks great! Two small requests:

  1. @cynthiamah and I were discussing the symbol-level headings, and trying to figure out a way to make it more obvious that they were expandable. She suggested that we include the counts (like in the Map Editor) in the Symbol Headers. Could you add that in and see how it looks.
  2. Minor bug: when the symbols are minimized, and then the user clicks a map marker, the legend expands so that everything's showing. Can you make it so that if the symbols are minimized and the user clicks a marker, the legend stays minimized?
gitriley commented 6 years ago
  1. Sounds good. I was thinking the same thing actually!
  2. Ok. I'll fix this. Must be a problem with the rerendering.

One other problem that I'm aware of is that the routing that we use to select a particular marker doesn't work on the initial load of a page. So, for example, if you load a page fresh with the url 'http://localhost:7777/maps/c925f362d3574c14a910c70fbf1b3a72/#/layers/19/dataset_4/65', it won't actually display Record 65. The routing works when you click on the records after loading the page, but not on the initial load. I think this is due to the timing of the initialization of the legend from the presentation-app.js file; i.e. the legend isn't initialized until after the routing events are fired?

vanwars commented 6 years ago

Ahh. Good catch. We can take a look at how routing is working on the map editor. Hopefully it's something small (maybe around the ordering of function calls on initialization?).

On Tue, Jul 10, 2018, 8:41 AM Riley Flynn notifications@github.com wrote:

  1. Sounds good. I was thinking the same thing actually.
  2. Ok. I'll fix this. Must be a problem with the rerendering.

One other problem that I'm aware of is that the routing that we use to select a particular marker doesn't work on the initial load of a page. So, for example, if you load a page fresh with the url ' http://localhost:7777/maps/c925f362d3574c14a910c70fbf1b3a72/#/layers/19/dataset_4/65', it won't actually display Record 65. The routing works when you click on the records after loading the page, but not on the initial load. I think this is due to the timing of the initialization of the legend from the presentation-app.js file; i.e. the legend isn't initialized until after the routing events are fired?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/LocalGround/localground/pull/202#issuecomment-403869379, or mute the thread https://github.com/notifications/unsubscribe-auth/ABKGwzBNA4ZIgDwZSVygQmBU9pMGKyo4ks5uFMsogaJpZM4VGLeE .

vanwars commented 6 years ago

@gitriley, one more thing I found: if the layer is turned off in the Map Editor, that should be honored in the Map Presentation.

vanwars commented 6 years ago

@gitriley Looks great! Last thing: can you please add presentation-app-test.js to the repo? I think you forgot to check it in.

gitriley commented 6 years ago

@vanwars sorry about that! I just added it and pushed.