Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spurious vizualization step discards data from second table #2145

Closed
cshirky opened this issue Feb 10, 2015 · 8 comments
Closed

Spurious vizualization step discards data from second table #2145

cshirky opened this issue Feb 10, 2015 · 8 comments
Assignees
Milestone

Comments

@cshirky
Copy link

cshirky commented Feb 10, 2015

Carto now requires the creation of a visualization whenever a second layer is created in map view.

The interface reports that data added to this second layer gets saved, when in fact it is discarded, and the newly created layer is destroyed.

Steps to reproduce.

  1. Create a new table with one layer and at least one data point.
  2. Go to map view.
  3. Add layer, using Empty Table.
  4. A dialog box pops up asking you to name a new visualization. Provide a name and submit. (Note that the upper-right button will still read Visualize, not Share.)
  5. Add an element to layer Finish the process when uploads a new table #2 in Map view. (I drew a box around the original point.) Carto will show elements in both layers, and the popup above the map will show "Saving..." and then "Saved".
    screen shot 2015-02-10 at 4 32 12 pm
  6. Switch to data view. The screen will briefly switch to the table from layer Finish the process when uploads a new table #2, with an overlay reading "Setting table...", then redirect to table Manage tables pagination with Backbone #1.
  7. Switch back to Map view. Layer Finish the process when uploads a new table #2 has been deleted.
    screen shot 2015-02-10 at 4 39 26 pm

The workaround is to name a visualization in step #4, then click Visualize and name a second Visualization before step #6, making the named visualization in step #4 completely spurious, and the "Saving.../Saved" dialog inaccurate.

The right behaviors would be:

a) Making the visualization from step #4 save any subsequent layers or,
b) leaving the creation of a visualization to the Vizualize button, and just showing the user layered maps until they want to create a Visualization.

I prefer a, as it's closer to the right behavior, but either a or b would be much better than this.

@saleiva
Copy link
Contributor

saleiva commented Feb 10, 2015

Hi Clay, this is a bug. It should behave like you say on A.
Prioritizing

cc/ @iriberri

@saleiva saleiva added this to the Sanabria milestone Feb 10, 2015
@iriberri
Copy link
Contributor

The visualization remains with the two layers, the issue is that clicking on the "Table view" is using the URL of the first table (tablename/table) instead of the table view of the visualization (viz-id/table). So you get redirected to your actual table and you're no longer browsing your visualization (check that in your step 7 you're again in the "Visualize" process, which belongs to a table).

If you check your saved visualizations, the two layers are there. The issue is that creating a visualization from a table is not updating the links in the view.

@cshirky
Copy link
Author

cshirky commented Feb 10, 2015

Ah, got it, thanks.

If creating a visualization from adding a second layer in Map view did update the links, would that also shift the upper-right button option from Visualize to Share?

@javierarce
Copy link
Contributor

Yes, I think so. The problem is that right now we are only changing the browser URL and not triggering any changes in the UI:

https://github.com/CartoDB/cartodb/blob/master/lib/assets/javascripts/cartodb/table/actions_menu.js#L352

So if you reload the page after you've added the second table, everything will work as expected.

@cshirky
Copy link
Author

cshirky commented Feb 10, 2015

Reloading works.

It looks like the problem is that the URL is getting altered in the URL bar, but the URL attached to "Data View" is NOT updated when you are using the Map View for the second layer, and still sends me to
https://username.cartodb.com/tables/untitled_table/table

@javierarce
Copy link
Contributor

@cshirky, we've pushed a fix that should solve this issue. Thanks for the nice bug report!

@javierarce
Copy link
Contributor

Bad news, we had to rollback the change. I'm sorry about it. I'll let you know when it's fixed.

@javierarce javierarce reopened this Feb 10, 2015
@javierarce javierarce modified the milestones: Sanabria, Guarrate Feb 19, 2015
@javierarce javierarce modified the milestones: Guarrate, ElSoto Mar 5, 2015
@javierarce
Copy link
Contributor

We deployed a fix yesterday, so this should no longer be a problem. Sorry it took us so long to fix this issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants