Cartodb: Improve geocode flow

Created on 7 Nov 2017  路  26Comments  路  Source: CartoDB/cartodb

Context

Refer to this ticket
https://github.com/CartoDB/design/issues/1032

Design

Most helpful comment

I think this'll release before, hopefully today 馃

Since it was going to be changed at some point & @piensaenpixel gave me the choice, I removed the button completely. It's simpler than adding a new state to the button, because of how the code is

All 26 comments

back to development

Documenting this because it's friday and we might forget.

There are a few things missing

  • [x] When the geocoding analyses finishes correctly, navigate towards the style tab.
  • [x] When the geocoding finishes, view should re-render. You're currently locked out of the other tabs.
  • [ ] We should remove a bunch of dead code that's around, like all the georeference placeholders that show on the other tabs.
  • [x] The current solution marks empty layers as layers that need georeferencing. This doesn't make sense, but on the layer list we don't know if a layer has any rows.
  • [ ] Show loading state for the above 馃憜

First 3 are most likely straightforward. Fourth one requires doing an arbitrary number of requests on the layer list view, for all layers that:

  • Don't have a geocoding applied
  • Don't have a geometry
  • Don't have a custom query

Having no rows is the fourth condition that needs to pass, so we should fetch it if all of the above are true.

Bonus points: It would be interesting to know if users use the add empty dataset button often, and / or also what percentage of the datasets that users have without geometry are also datasets that have no rows.

I discussed this issue with design and they are already aware of the new states for the layers in the layers list. Feel free to ping them directly to ask for those new styles @rjimenezda

/cc @urbanphes @piensaenpixel

I already did the asynchronous loading, so I'm open to implementing a new style / add a transition or whatever for the layer component 馃

In case you'd like to track our work for that: https://github.com/CartoDB/design/issues/1074

@urbanphes

There's a case that's not covered on the mocks. What happens if the user deletes the geocoding analysis? I see two options:

A) After it鈥檚 deleted, the user is immediately presented with an unsaved georeference analysis. This is what happens when the user clicks on the layer on this new approach.

B) There鈥檚 an intermediate step in which we tell the user: Hey, you have to georeference the layer, with a button that causes A)

B) is what we have on the analysis tab right now on production (for a non-geocoded layer), but with disabled tabs.

@rjimenezda In that case, I think we go with the option A. Our premise here is that the layer will be geocoded and the best way to gain this is with the _option A_.

Here they are in motion, I like A because there are less steps and is consistent, but it might be a bit weird for the user?

This is option A):
directly

This is option B):
intermideate
(please ignore the bug with the selected tab)

I've uploaded this to ded15

I'm sorry for not answering before. This was talking between @rjimenezda and me, at last, we are going with the B Option, it's more natural.

Acceptance on ded12:

I've left a map prepared with 3 layers there, on user ruben-ded12:

  • An empty layer
  • A Layer that needs geocoding
  • A regular layer (airbnb listings)

Things to look out for:

  • The empty layer and the layer that needs geocoding should show the new 'loading' state for a bit.
  • When clicking on the layer that needs geocoding, only the analysis tab is enabled, already showing a geocoding analysis that can't be canceled.
  • After applying this analyisis (for instance, geocode with coordinates, use cartodb_id for both lat/lon), it should redirect to the style tab. Tabs should be reenabled
  • On the layer list, the layer should display as a regular layer now.
  • Removing the geocoding analysis should show an intermediate step to let the user know that they should apply an analysis, which won't show if the user goes back to the layer list and back to the layer.

All of this new behavior should not affect regular layers & old behaviour.

@urbanphes or someone from design, can you give it a try?

While writing the above I noticed that I forgot to disable the add analysis button, so the user can change the analysis. I'll fix that at some point today, but I would appreciate if anyone can give it a look, since I have to switch back to this issue 馃拫

Hi @rjimenezda, I've tested the following steps:

  • [x] The empty layer and the layer that needs geocoding should show the new 'loading' state for a bit.
  • [x] When clicking on the layer that needs geocoding, only the analysis tab is enabled, already showing a geocoding analysis that can't be canceled.
  • [x] After applying this analyisis (for instance, geocode with coordinates, use cartodb_id for both lat/lon), it should redirect to the style tab. Tabs should be reenabled
  • [x] On the layer list, the layer should display as a regular layer now.
  • [x] Removing the geocoding analysis should show an intermediate step to let the user know that they should apply an analysis, which won't show if the user goes back to the layer list and back to the layer.

... and the feature works well.

My only concern is when I've deleted the analysis, the following screen say something like this.

captura de pantalla 2017-11-29 a las 16 31 28

At this point, I would remove the part " or manually add data to visualize" Because we look forward that the layer will be geocoding. But It will be great if anybody from @CartoDB/design can help us here.

Truth be told, I didn't even read that copy, it's the same that we used to show on the other tabs. While it's techincally true, user could manually add geometry, I think it doesn't make any sense to show that there. I'll remove the 'add data' 馃憤 and also fix the bug that I mentioned before

What do you think something like? "There's no geometry in your data, please geocode it"

@piensaenpixel @urbanphes What should I do with the add analysis button, on the horizontal list. It shouldn't do anything. Do we prefer removing it or adding a disabled state?

We are changing it, so the easiest thing for you

https://github.com/CartoDB/design/issues/1071

I don't know if the new add buttons (the ticket sharing https://github.com/CartoDB/design/issues/1071) will release this ticket. These are the examples:

Current button:

captura de pantalla 2017-11-30 a las 8 12 29

New button:

captura de pantalla 2017-11-30 a las 8 12 52

Apart from that, I think we can do:

  • If the new buttons release after, we can disable the current button (blue box with "+") with a 24% opacity. The same that we use in all UI.
  • If the new buttons release before; we can add the new buttons with the same disabled state: 24% opacity.

What do you think?

I think this'll release before, hopefully today 馃

Since it was going to be changed at some point & @piensaenpixel gave me the choice, I removed the button completely. It's simpler than adding a new state to the button, because of how the code is

@urbanphes On ded12 one more time, with the button gone in that particular case

I'm not sure if this is related to, but... in ded12 I only can geocode it with lat and long.

image

Only one very small thing, if you think we can do it know ok, if not we can do it later:

  • []聽To be consistent, could we put latitude and longitude in the same order?
    image

Label or controls?

y prefer the select (type)

The rest is ok!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jesusbotella picture jesusbotella  路  4Comments

javitonino picture javitonino  路  5Comments

nygeog picture nygeog  路  5Comments

ivanmalagon picture ivanmalagon  路  3Comments

saleiva picture saleiva  路  4Comments