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

Remove "Back to home" link on import error when using /from-post-message #5222

Open
nisargjhaveri opened this issue Nov 21, 2024 · 3 comments
Labels
feature Work that is user facing, and typically should be planned through https://airtable.com/shrRydo6UXheb

Comments

@nisargjhaveri
Copy link
Contributor

nisargjhaveri commented Nov 21, 2024

When import fails, we show the following dialog.

Screenshot 2024-11-22 at 1 56 02 AM

When using /from-post-message, we know the user did not come from Firefox Profiler home. Can we remove the "Back to home" link in this case? If not, can we have a query param to disable navigating to home somehow?

This is important, as in embedded environment (I'm thinking VS Code), going to home on failure to open a profile is not really useful or expected.

┆Issue is synchronized with this Jira Task

@fqueze
Copy link
Contributor

fqueze commented Nov 22, 2024

I never really noticed that link, but I think it's rarely useful. I think the most common use cases are to load a profile directly from the browser, or to load a profile from a profile link that has been shared. In both of these cases, the user has not seen the home page before encountering the error message.
If the user has tried to load a profile from disk using a drag&drop, it's still possible to drop a new profile file onto the error message, so going to the home page not useful either.
I think the only case where going to the home page is useful would be when the user loaded a broken profile from a file, using the file picker. Then they might want to go to the homepage to access the file picker again.

A link to some documentation helping to understand the error message might make more sense.

@nisargjhaveri
Copy link
Contributor Author

nisargjhaveri commented Nov 22, 2024

Makes sense. In that case, we can maybe just remove the "Back to home" as in most cases that is not where the user is coming from in the first place. Link to documentation would be nice, but looks like we just show the raw JS error that occurs, and might not really have useful documentation for those?

What do you think about the link to home here at "Firefox Profiler"? For the VS Code/embedded usecase, we'd need to remove that as well.
Screenshot 2024-11-22 at 11 56 28 PM

@julienw julienw added the feature Work that is user facing, and typically should be planned through https://airtable.com/shrRydo6UXheb label Dec 2, 2024
@julienw
Copy link
Contributor

julienw commented Dec 2, 2024

To fix the initial description, it would be straightforward to update the code in

showBackHomeLink={true}

Where the boolean could be something such as dataSource === 'from-file' for example.

You could also be interested in changing it here:

const showBackHomeLink = Boolean(
view.additionalData && view.additionalData.message
);

I believe this check was introduced to remove the back home link when using from-url from Safari, but I think it could be better to use the same "dataSource === 'from-file' check.

For the link in the list of uploaded profiles, I'm not fully sure, ideally it could be a target="_blank" in that case. But I believe it's another issue, it could be handled separately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Work that is user facing, and typically should be planned through https://airtable.com/shrRydo6UXheb
Projects
None yet
Development

No branches or pull requests

3 participants