-
Notifications
You must be signed in to change notification settings - Fork 682
Re-focus view button when closing details panel #3368
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
Conversation
private async Task ClearSelectedResourceAsync() | ||
{ | ||
SelectedResource = null; | ||
|
||
if (_elementIdBeforeDetailsViewOpened is not null) | ||
{ | ||
await JS.InvokeVoidAsync("focusElement", _elementIdBeforeDetailsViewOpened); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You've changed this so the view button is always focused when the resource is closed, but there are a number of ways to close the resource. For example, if someone changes search parameters on a page then the resource is closed. We don't want to focus the button in that scenario.
What is the exact scenario where the view button should be focused?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can check the linked bug, but this is in reaction to the user manually closing the details panel.
You've changed this so the view button is always focused when the resource is closed
Oops, thanks. Fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will have to be changed when we remove the view buttons
We should make sure that we note this somewhere in the issues list. This PR addresses the issue we need to address, so approving from that perspective.
} | ||
else | ||
{ | ||
SelectedResource = resource; | ||
} | ||
} | ||
|
||
private void ClearSelectedResource() | ||
private async Task ClearSelectedResourceAsync(bool causedByUserAction = false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Technically the other ways it gets dismissed are by user actions too (e.g. filtering). Maybe fromExplicitDismiss
or something is more accurate?
* Re-focus button when closing details panel * Add internal id for log entries, make sure to null element id on detail view closed * Make sure view button is selected only after a user action --------- Co-authored-by: Adam Ratzman <adamratzman@microsoft.com> (cherry picked from commit e784c91)
* Make sure copy button is tab-accessible and visible on tab (#3192) Co-authored-by: Adam Ratzman <adamratzman@microsoft.com> (cherry picked from commit 2bba2ad) * Avoid reconnection modal taking up entire screen, not being able to i… (#3189) * Avoid reconnection modal taking up entire screen, not being able to interact with page * add slight padding, shadow --------- Co-authored-by: Adam Ratzman <adamratzman@microsoft.com> (cherry picked from commit 87fab1e) * Force log level select position to be below (#3406) Co-authored-by: Adam Ratzman <adamratzman@microsoft.com> (cherry picked from commit 5a6856d) * Re-focus view button when closing details panel (#3368) * Re-focus button when closing details panel * Add internal id for log entries, make sure to null element id on detail view closed * Make sure view button is selected only after a user action --------- Co-authored-by: Adam Ratzman <adamratzman@microsoft.com> (cherry picked from commit e784c91)
Fixes #3362 - this will have to be changed when we remove the view buttons
Microsoft Reviewers: Open in CodeFlow