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

Support opening trace files through a dialog #1054

Merged

Conversation

ngondalia
Copy link
Contributor

This commit adds another button for opening trace files through a dialog. Futhermore, the theia-trace-explorer-placeholder-widget can be configured to render either one or both buttons (Open Trace folder, Open Trace File).

Fixes #1053

Signed-off-by: Neel Gondalia ngondalia@blackberry.com

@ngondalia
Copy link
Contributor Author

openbuttons.mp4

Copy link
Contributor

@hriday-panchasara hriday-panchasara left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, I like this approach of allowing the extension to control which option gets rendered. The UX would now have to explicitly state 'Open Trace File' or 'Open Trace Folder'

  • In trace-viewer-commands.ts, could you rename the label of the OpenTraceCommand to 'Open Trace Folder'? This is so that if a user decides to open a trace through the command palette they know what type of traces they can access. You could even add a command for 'Open Trace File' in this case.

@ngondalia ngondalia force-pushed the handleOpenTraceFiles branch from 257eeb7 to 1ef8e2f Compare March 12, 2024 18:34
@ngondalia
Copy link
Contributor Author

Overall, I like this approach of allowing the extension to control which option gets rendered. The UX would now have to explicitly state 'Open Trace File' or 'Open Trace Folder'

  • In trace-viewer-commands.ts, could you rename the label of the OpenTraceCommand to 'Open Trace Folder'? This is so that if a user decides to open a trace through the command palette they know what type of traces they can access. You could even add a command for 'Open Trace File' in this case.

Thanks for reviewing! I have addressed your comments.

if (healthResponse && healthResponse.isOk() && healthResponse.getModel()?.status === 'UP') {
this.openDialog(rootPath);
this.openDialog(rootPath, selectFiles);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should change the title of the dialog. Right now the title is Open Trace for both cases. It might not be clear for the user. Maybe change the title to Open Trace File/Open Trace Folder or Select Trace File to Open/Select Trace Folder to Open.

<div className="placeholder-open-workspace-button-container">
<button
className="plcaeholder-open-workspace-button"
title="Select a trace to open"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be different for each case to be clear to the user, maybe 'Select a single trace file to open' for file traces and 'Select a trace folder to open`

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok - I will update it in the next patch!

@ngondalia ngondalia force-pushed the handleOpenTraceFiles branch from 1ef8e2f to 1a67a62 Compare March 15, 2024 15:46
@ngondalia ngondalia requested a review from bhufmann March 15, 2024 15:46
This commit adds another button for opening trace files through a dialog.
Futhermore, the theia-trace-explorer-placeholder-widget can be configured
to render either one or both buttons (Open Trace folder, Open Trace File).

Fixes eclipse-cdt-cloud#1053

Signed-off-by: Neel Gondalia <ngondalia@blackberry.com>
@ngondalia ngondalia force-pushed the handleOpenTraceFiles branch from 1a67a62 to 32f0abd Compare March 15, 2024 15:51
Copy link
Collaborator

@bhufmann bhufmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Thanks!

@bhufmann
Copy link
Collaborator

@hriday-panchasara could you please update your review?

Copy link
Contributor

@hriday-panchasara hriday-panchasara left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks for the contribution!

@hriday-panchasara hriday-panchasara merged commit 7ca1a45 into eclipse-cdt-cloud:master Mar 15, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Handle opening of single trace files via dialog
3 participants