Refer to this ticket
https://github.com/CartoDB/design/issues/1032
back to development
Documenting this because it's friday and we might forget.
There are a few things missing
First 3 are most likely straightforward. Fourth one requires doing an arbitrary number of requests on the layer list view, for all layers that:
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):

This is option B):

(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:
Things to look out for:
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:
... and the feature works well.
My only concern is when I've deleted the analysis, the following screen say something like this.

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
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:

New button:

Apart from that, I think we can do:
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.

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

Label or controls?
y prefer the select (type)
The rest is ok!
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