How to navigate without full refresh

Hey here!

We’re developing a chrome extension to be able to accommodate our review process in our company. We’ve done that based on the official Asana extension for Chrome but we have no “clear” way to redirect the user to the new task.

We’ve done location.href replacement but that does a full reload which is unwanted since a lot happens when that goes on. We would just like to trigger a normal navigation such as clicking on a task.

This is a shot in the dark but would be really appreciated if you let us know any way to do this. We’ve thought of clicking on the comment of the task to be reviewed (which is commented with a link to the new task) but the polling takes 10 seconds and we might get unlucky and have to wait more than needed.


That’s an interesting thought… unfortunately, I don’t think there’s a good way to pull that off in our app. Perhaps if you know that you’re expecting to get a comment with the task, you can pull up the information for the linked task from our API and display it in your extension?

I’m assuming that the polling you mention is to scrape or monitor the DOM in order to see if new links get added, then simulating a click on that link. Is that right? I think that’s unfortunately your best bet - and scraping is notoriously fickle and subject to breaking, so we don’t really recommend that as a super solid solution.

On the plus side, performance has been something we’ve been cranking on for over a year now, and a cold-load of Asana in full-screen or “focus” mode (such as would happen if you received a link to a task from an Asana email) is definitely one of the things we’re continuing to optimize.

A focus mode url is really simple to create: append a /f to the url, and there you go. That is, if a link is of the format[projectid]/[taskid], to see it in focus mode, the url would be[projectid]/[taskid]/f. You should see something like a 25-50% increase in loading this page through setting location.href to this url as compared to the non-focus mode, though of course focus mode means you wouldn’t see the task in context of its projects.

I’m also curious as to what your review process entails. Are you connecting Asana to an external app that creates this link, or is this done by one of your team? We always love to hear how people are using and customizing their workflows in order to prioritize API and integrations work, and it sounds like you guys might be building a pretty neat version of this. Cheers!

1 Like

Hey Matt, thanks for answering, it’s what I thought then!

I don’t want to rely on scraping the DOM and what I meant by polling is that Asana does some polling to get new updates. There’s an ongoing network call being made. From my investigation, there are actions that (naturally) trigger that polling to refresh the information. Clicking a task (even if it’s already open) is a natural example.

I was already aware of the focus mode (although I didn’t know it was named like that) I discovered it when trying to form the URL to redirect that and copying the link on the task that says “Copy Task Url”. Focus mode still takes from 2-4 seconds to happen which ironically makes you lose the focus in this instance as you have to wait for things to happen.

For now we’ve resorted to click the button, as soon as it finishes, we complete the task and that usually makes the comment appear.

Regarding your question, the process is as follows. We’re a small agency and once a task is completed it usually need to pass UAT. Either from the client itself or one of us. We were experimenting with subtasks but they lose the tags. So, all this extension does is to create a clone of the current task and prepends “Review:” to the title. All of the custom fields and tags are copied over. A link to the original task is added on the description of the new one and a comment is auto-added on the old task to point to the new one. We then complete the “main task” and then assign this task to the reviewer.

If the review fails, al the reviewer has to do is to unmark the task as done, so the person that was in charge of it knows what happens.

If you happen to be curious the extension is now public: Asana Review Task - Chrome Web Store

Thanks again for your support!

1 Like