-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Code Quality: Removed ISidebarItemModel 1 #17992
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
base: main
Are you sure you want to change the base?
Conversation
| private void UpdateIcon() | ||
| { | ||
| Icon = Item?.IconSource?.CreateIconElement(); | ||
| if (Icon is not null) |
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.
Why are we no longer doing this?
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.
We are now using binding for icons, we cannot call CreateIconElement in XAML.
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.
No, why are we no longer setting the UIA property appropriately? Also just because something doesnt work in xaml doesnt mean we should just ignore what the code did before.
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.
Don't we set it in XAML today already?
Files/src/Files.App.Controls/Sidebar/SidebarStyles.xaml
Lines 114 to 124 in 01ddde9
| <!-- Icon --> | |
| <ContentPresenter | |
| x:Name="IconPresenter" | |
| Grid.Column="1" | |
| Width="16" | |
| Height="16" | |
| Margin="8,0,0,0" | |
| HorizontalAlignment="Center" | |
| VerticalAlignment="Center" | |
| AutomationProperties.AccessibilityView="Raw" | |
| Content="{Binding Icon, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" /> |
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.
AccessibilityView is not a transitive property so every element needs to set it themselves. Just setting it on the presenter does not exclude its children from showing up in the UIA tree
Resolved / Related Issues
This is part of the phase 1 mentioned in #17970 (comment)
Steps used to test these changes