Skip to content

Conversation

adamint
Copy link
Member

@adamint adamint commented Apr 3, 2024

Animation

Fixes #3362 - this will have to be changed when we remove the view buttons

Microsoft Reviewers: Open in CodeFlow

@adamint adamint requested review from JamesNK and tlmii April 3, 2024 20:54
@ghost ghost added the area-dashboard label Apr 3, 2024
Comment on lines 223 to 231
private async Task ClearSelectedResourceAsync()
{
SelectedResource = null;

if (_elementIdBeforeDetailsViewOpened is not null)
{
await JS.InvokeVoidAsync("focusElement", _elementIdBeforeDetailsViewOpened);
}
}
Copy link
Member

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?

Copy link
Member Author

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

@adamint adamint requested a review from JamesNK April 5, 2024 14:42
Copy link
Member

@tlmii tlmii left a 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)
Copy link
Member

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?

@kvenkatrajan kvenkatrajan merged commit e784c91 into dotnet:main Apr 5, 2024
adamint added a commit to adamint/aspire that referenced this pull request Apr 8, 2024
* 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)
RussKie pushed a commit that referenced this pull request Apr 9, 2024
* 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)
@github-actions github-actions bot locked and limited conversation to collaborators May 8, 2024
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.

When we close "Details view" section focus moves to top of the page: A11y_.NetAspireDashboard_Resource_Details view_Keyboard
4 participants