{"action":"created","issue":{"url":"https://api.github.com/repos/Kitware/minerva/issues/355","repository_url":"https://api.github.com/repos/Kitware/minerva","labels_url":"https://api.github.com/repos/Kitware/minerva/issues/355/labels{/name}","comments_url":"https://api.github.com/repos/Kitware/minerva/issues/355/comments","events_url":"https://api.github.com/repos/Kitware/minerva/issues/355/events","html_url":"https://github.com/Kitware/minerva/pull/355","id":155994522,"number":355,"title":"Adding style configuration controls","user":{"login":"jbeezley","id":31890,"avatar_url":"https://avatars.githubusercontent.com/u/31890?v=3","gravatar_id":"","url":"https://api.github.com/users/jbeezley","html_url":"https://github.com/jbeezley","followers_url":"https://api.github.com/users/jbeezley/followers","following_url":"https://api.github.com/users/jbeezley/following{/other_user}","gists_url":"https://api.github.com/users/jbeezley/gists{/gist_id}","starred_url":"https://api.github.com/users/jbeezley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbeezley/subscriptions","organizations_url":"https://api.github.com/users/jbeezley/orgs","repos_url":"https://api.github.com/users/jbeezley/repos","events_url":"https://api.github.com/users/jbeezley/events{/privacy}","received_events_url":"https://api.github.com/users/jbeezley/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-05-20T15:52:21Z","updated_at":"2016-06-23T18:28:02Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Kitware/minerva/pulls/355","html_url":"https://github.com/Kitware/minerva/pull/355","diff_url":"https://github.com/Kitware/minerva/pull/355.diff","patch_url":"https://github.com/Kitware/minerva/pull/355.patch"},"body":"I'm at a crossroads on this branch, and I decided to make WIP PR to solicit advice.\r\n\r\nBackground: We want to be able to generate styles to differentiate features in a dataset.  For example, to color states by a \"population\" field in the properties.  This branch adds UI elements to the `jsonConfigWidget` to allow the user to map properties in their dataset to the styles of the features generated.\r\n\r\nMy intent was to run a preprocessor on the dataset model that does two things:\r\n\r\n* Normalizes the datasets representation\r\n* Generates a \"summary\" object that provides information about the properties of the dataset\r\n\r\nI [attached](https://github.com/Kitware/minerva/blob/geojson-style/web_external/js/models/DatasetModel.js#L26) a preprocessor to a change event that runs when the dataset loads.  The problem is that in the current codebase, the dataset doesn't load on the client until the data is displayed.  I would need to load the full dataset to generate the `jsonConfigWidget` which I think would be a bad user experience.  I can think of a couple of alternatives:\r\n\r\n1. Do the preprocessing and normalization server-side and add either a new endpoint to get the properties summary or attach it directly to the dataset metadata.  This would mean that all datasets need to pass through the server first, which I don't think is an assumption that we've made before explicitly.  This would add more flexibility how we parse datasets because we wouldn't be limited to JS-only libraries and would provide a unified data path.  But, it would also make it more difficult to create client-side components that can be used elsewhere.\r\n2. Add a button on the modal dialog to \"Load dataset\" if it hasn't already been loaded.  This is similar to what QGIS does--there is a button that you have to press any time it needs to parse the dataset to fill in information on the settings dialog.  This prevents unexpected lag in the application when responding to user input.\r\n\r\n(2) would be much easier in the short term, but I suspect we will end up needing to implement (1) sooner or later.  @mgrauer, do you have any thoughts about where we should go with this?"},"comment":{"url":"https://api.github.com/repos/Kitware/minerva/issues/comments/228140930","html_url":"https://github.com/Kitware/minerva/pull/355#issuecomment-228140930","issue_url":"https://api.github.com/repos/Kitware/minerva/issues/355","id":228140930,"user":{"login":"dorukozturk","id":11761461,"avatar_url":"https://avatars.githubusercontent.com/u/11761461?v=3","gravatar_id":"","url":"https://api.github.com/users/dorukozturk","html_url":"https://github.com/dorukozturk","followers_url":"https://api.github.com/users/dorukozturk/followers","following_url":"https://api.github.com/users/dorukozturk/following{/other_user}","gists_url":"https://api.github.com/users/dorukozturk/gists{/gist_id}","starred_url":"https://api.github.com/users/dorukozturk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dorukozturk/subscriptions","organizations_url":"https://api.github.com/users/dorukozturk/orgs","repos_url":"https://api.github.com/users/dorukozturk/repos","events_url":"https://api.github.com/users/dorukozturk/events{/privacy}","received_events_url":"https://api.github.com/users/dorukozturk/received_events","type":"User","site_admin":false},"created_at":"2016-06-23T18:28:02Z","updated_at":"2016-06-23T18:28:02Z","body":"I think overall it is really good. I have 2 recommendations.\r\n\r\n1) I think the styling button should be on Session Layers panel. Also in order to change the color back and forth we need to delete the layer and add it back. Is there a reason for that?\r\n\r\n2) Can we also implement color schemes with more or less steps? We have 6 steps only. I can see the dropdown can get complicated with more or less colors though. Maybe another dropdown which specifies how many steps there will be?\r\n\r\nOther than that I think the tool is very nice. "}}
{"actor":{"display_login":"dorukozturk"}}