tangram-play
tangram-play copied to clipboard
share menu option
once we implement #637, add a "Share" menu item that generates a mapzen.com/tangram/view URL based off of the current scene.
Share requires saving, we should have the button show up prominently for now. Button stays active and prompts sign-in+save to share
Can we try making the 'Share' more buttony feeling to both call it out as an action item in the menu and highlight it? otherwise, placement is good.
thanks -- and noticed the non-dev http://mapzen.com/tangram/view URLs are working.
Am assuming tangram/view is the most recent version of tangram-frame -- adjacently related I've made an issue for a URL shortening suggestion https://github.com/tangrams/tangram-frame/issues/40 -- basically https://mapzen.com/tangram/view/22/148#15/37.7615/-122.4173
Make share a menu and make the options-
- Public link (requires user to have signed in and saved the style)
- Embed code
@burritojustice I'll add some more thoughts about URL shortening in the other issue, but I just wanted to clarify that for Tangram Play's goals, we will not be shortening URLs here.
working with folks outside Mapzen on a project in Play, I realized we need a Share Code
option (that open's Play) as well as Share Map
(which opens the tangram view url)
Is this something that save -> copy and paste the URL couldn't do?
If I understand John correctly, he is talking about 2 different use cases of what Share could mean -
- A user who wants to share the cool map they made as a visual. They don't want to see the Play editor but the tangram view url
- A user who wants to share the code they used to create a cool map/shader, this opens the Play editor
@burritojustice is that right?
Correct -- opening the map in tangram view, vs opening Play with the yaml for the map visible.
Right - so my point is the link for Play, with the YAML content, is right in the URL line for the page:
You can copy-paste this and get a link:
https://mapzen.com/tangram/play/?scene=https%3A%2F%2Fmapzen.com%2Fapi%2Fscenes%2F7%2F26%2Fresources%2Fempty.yaml#9.9757/40.7667/-74.0994
Were you expecting a dropdown -> modal to display the same contents as the URL bar? I feel like I'm missing something, maybe we mean different things?
You are right, but we should just do both. I understand it's a redundancy but in some cases it's not obvious if copy/pasting a link will successfully open it for a different user (especially if it is something that is saved in your account)
Ok -- I see your point. The location bar URL is not guaranteed to open exactly the code you are seeing, especially if you do not save it first.
I'm going to punt this for later. This thread has been a series of moving goal posts, and keeping in mind the zero-one-infinity rule, there is not just two types of share links, there are potentially many kinds of shareable links. I will think on this so we know have a good plan for this and not just shoe-horned functionality.
👍 thanks Lou
+1 for moving / duplicating some of the "camera" button functionality into the Share menu.