profiler icon indicating copy to clipboard operation
profiler copied to clipboard

Consider keeping the deploy preview URLs when publishing & shortening

Open canova opened this issue 4 years ago • 6 comments

We have a check while shortening that converts back all non profiler.firefox.com urls: https://github.com/firefox-devtools/profiler/blob/6b0146209d963aaa1154a9777b71a9125f5b822b/src/utils/shorten-url.js#L13-L19

I think this is useful when we are working on localhost, but I don't think this is exactly what we need for deploy previews. When I'm working on a deploy preview, I usually want to preserve the deploy preview URL when publishing, so I can send it to other people. But this check is making it impossible. So in that case, we resort to sending the long urls which is annoying most of the time, since the url can be very long.

So to solve this issue, it would be good to add an exception for deploy preview URLs.

canova avatar Jan 07 '21 12:01 canova

I believe the reason is that the goal for this check is that we don't stay easily on a non-production version without knowing it. But I also agree this can be surprising and painful in some cases.

Therefore, why not, but then I think we also need a check that we are on profiler.firefox.com, and provide a warning and a button switch otherwise. (of course I don't know where to put that :) ). What do you think?

julienw avatar Jan 11 '21 11:01 julienw

I think we can use our Warning component to display that too. One negative side is, it can be pretty disturbing if it pops up every time.

Also thinking that mostly we (as in Firefox Profiler developers and some internal users) use the deploy previews, I feel like it should also be safe to not show anything as well. Do you think these links can fall into the hands of end users? :)

canova avatar Jan 13 '21 10:01 canova

The situation I'm talking about is more about adding a deploy preview URL in a bugzilla bug, coming there a few months later and not realizing that it's outdated. It can also be a problem for ourselves. What do you call "end users" ? :) I think "internal users" are also our end users. But that's only a few and that's why I think we need something more discreet than a Warning component, but also something easy to do because we don't want to spend too much time on this. This could be in the profile info panel?

julienw avatar Jan 18 '21 11:01 julienw

Note that the server has a check about URLs starting with profiler.firefox.com, so we'll have to change the server if we want to do this. (which should be fairly easy)

julienw avatar Jun 25 '21 16:06 julienw

Result of our discussion: if we're in a deploy preview, do not shorten, but instead use the full url in the permalink widget.

julienw avatar Sep 07 '22 09:09 julienw

Yes, this result of discussion is due to how we changed handling our urls recently. My initial complain was the url being too long. But with the recent changes, we've changed how we handle thread orders and they are being shortened a lot for most of the cases. So it's not a big concern anymore.

canova avatar Sep 07 '22 10:09 canova