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

View details with row click #5000

Merged
merged 4 commits into from
Aug 2, 2024
Merged

View details with row click #5000

merged 4 commits into from
Aug 2, 2024

Conversation

JamesNK
Copy link
Member

@JamesNK JamesNK commented Jul 21, 2024

Use new OnRowClick feature in FluentUI to show details on pages:

  • Resources
  • Structured logs
  • Traces
  • Trace detail (already had row click, moves feature to row instead of cell)

Clickable UI on rows takes precedent. For example, clicking on a resource endpoint URL will launch a new browser to that URL. It doesn't open the detail view.

Changes:

  • Add OnRowClick to data grids
  • Add @onclick:stopPropagation="true" where required. Clicking on UI will bubble the event up until it stops. That means clicking on the View button triggers the button action and the row click action. The fix is to tell Blazor to stop propagating the event with the stopPropagation attribute.
  • Re-enable pointer on grids with row click events

Demo:
row-click

Microsoft Reviewers: Open in CodeFlow

@ilmax
Copy link

ilmax commented Jul 22, 2024

Was wondering if it make sense to dismiss the details when pressing the Esc key.

@drewnoakes
Copy link
Member

Was wondering if it make sense to dismiss the details when pressing the Esc key.

I think so. Perhaps clicking the resource a second time hides the details too.

@JamesNK
Copy link
Member Author

JamesNK commented Jul 24, 2024

ESC closing the details view isn't relevant to this PR. Please create a separate issue.

@drewnoakes
Copy link
Member

I see the relevance being that it's now much easier to accidentally open the details pane by clicking in the grid. It's friendly to have escape get things back to "normal".

@JamesNK
Copy link
Member Author

JamesNK commented Jul 24, 2024

They're conceptually related, but this PR is focused on row clicks. If closing with ESC is done, it will be in a different PR.

@JamesNK
Copy link
Member Author

JamesNK commented Jul 24, 2024

Issue for shortcut to close details view: #5050

@JamesNK JamesNK force-pushed the jamesnk/row-click branch 2 times, most recently from ec5756f to 2bcc1ac Compare July 25, 2024 02:34
@JamesNK
Copy link
Member Author

JamesNK commented Jul 25, 2024

@leslierichardson95 Do you have any feedback on this UI change?

Copy link

@leslierichardson95 leslierichardson95 left a comment

Choose a reason for hiding this comment

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

This change looks good to me! :)

@JamesNK JamesNK merged commit 4416174 into main Aug 2, 2024
11 checks passed
@JamesNK JamesNK deleted the jamesnk/row-click branch August 2, 2024 12:13
@samsp-msft
Copy link
Member

Love the interaction this enables 😸

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants