With the recent change in Asana that added icons to the List, Board, Calendar, etc. layout tabs in a project, it seems the URL structure has also changed. This has broken an incredibly intuitive UX that I was taking advantage of in my application.
In my application, I allow Asana users to simply provide the project link (actually, the web browser address URL) of the view/layout which they’d like to “embed”.
For example, the URL for a project’s board layout was originally like:
Is there still a simple and intuitive way for a user to simply “grab” the URL of a specific project view/layout?
How do I parse this new URL format to determine the desired project view?
Is there documentation or was there a warning for this update?
Was it risky on my part to have relied upon the Asana web app’s internal URL structure?
a. I figured this was a simple, intuitive way for a user to say, “embed this project like this,” by simply copying the URL of what they’re looking at. However, I’m now wondering if that’s bad practice and not recommended. My original thought was that Asana’s own app URLs would be even less likely to change than API endpoints, but I suppose the API endpoints do at least provide fair warning of upcoming changes.
b. I realize this also wasn’t a device-agnostic approach since the Asana mobile app doesn’t have an address bar nor does the desktop app. Perhaps that’s reason enough my approach was wrong from the start—despite my app being used 99.99% of the time within a desktop web browser.
c. Also note that my implementation is a text-based integration (eg. oEmbed)—otherwise, I would definitely build a more elaborate “project + layout picker” form component-based UX.
Not that it makes much difference but just for accuracy, it wasn’t the icons change that added project view gids and broke your code, it was the ability to add additional custom views to a project.
Is there still a simple and intuitive way for a user to simply “grab” the URL of a specific project view/layout?
Why can’t they still copy from the address bar, which it sounds like the way you had them doing it before, when they’re on their desired view?
How do I parse this new URL format to determine the desired project view?
so you can parse that. (But realizing that it can change at any time; see #4 below.)
Is there documentation or was there a warning for this update?
There’s never been any documentation for the format of Asana URLs so I wouldn’t have expected anything here. And because it’s not a documented feature, I don’t think we can ding them for not warning about the change. Having said that, I do wish that when they introduced the new feature of adding additional custom views, they had at least mentioned, “Please note that this will change the URL blah blah blah”. It would have been a thoughtful thing to do.
Was it risky on my part to have relied upon the Asana web app’s internal URL structure?
Yup. Any time you build something based on an aspect of a product that’s not an official and documented part of the API, it’s risky. That doesn’t mean you shouldn’t ever do it - a few things in Flowsana do it - you just need to think really hard about whether you want to do it, and if you do, go into it realizing that it could change at any moment and if it does, you have to be prepared to jump into action to quickly update your code to work with the change.
Phil, this is the exact kind of answer I was looking for! Thank you so much for answering my many questions in rich detail.
One thing is still unclear to me, though: What exactly is a project_view_gid?
Because I tried looking for information about this in the API documentation and couldn’t find anything schematic about project views. I only see the default_view attribute on a project resource which is simply the original layout keyword I was parsing from the URL before. (eg. list, board, calendar, etc.)
Yeah, it’s not documented anywhere yet, because it’s not yet supported in the API. (I’ll see if I can get some info on if/when it might be.)
As you said in your initial post, it used to be that there was only a fixed, predetermined set of views for each project: overview, list, board, calendar, timeline. Because of this, it worked fine for Asana’s URL of a project view to use the name of the view, like
https://app.asana.com/0/<project_gid>/board
But recently they added the ability for users to create their own additional views. This required a way to store/retrieve/manage those views, so they gave each view a unique gid like other Asana objects have. It’s that gid that you’re seeing in the URL. Make sense?
Absolutely, @Phil_Seeman, it makes total sense! I must’ve missed this feature announcement, so I’ll need to look into it more.
That’s super helpful to know that I can’t yet access it as a developer because I already have users asking about integrating this new feature of Asana!