xamarin / Xamarin.PropertyEditing

MIT License
24 stars 16 forks source link

Show proper expanded icon by default #827

Closed BretJohnson closed 1 year ago

BretJohnson commented 1 year ago

Fix so that when a category is expanded by default the UI shows the proper icon (the expanded icon, not collapsed).

There are two main changes here:

  1. Remove the code added in https://github.com/xamarin/Xamarin.PropertyEditing/commit/96561f19bf1c81e24c852e0a88ef46bd72e05e38 to support custom disclosures for Catalina. That's no longer required in newer versions of macOS. Now we just let AppKit handle setting the right disclosure icon.
  2. Add call to UpdateExpansions in OnPropertiesChanged, so that the default expansion state is correct when the property editor context changes, ensuring that categories are autoexpanded when they are supposed to be.

Fixes AB#1559942

BretJohnson commented 1 year ago

@Therzok @netonjm - can you please weigh in, given my comment above. Again, this code just sets the icon, setting it in a way that matches other places where it's set, handling a missed case there (when it's expanded by default). We don't want to use expandItem - it's already expanded. It seems OK (and works and looks to be a safe/small change), but given all that if you have any concerns please note them. Thx.

BretJohnson commented 1 year ago

@netonjm @Therzok - OK, I followed Jose's suggestion, removing the custom Catalina code and adding a call to expand groups that should be expanded by default (auto expanded). My testing on Monterey looks good. Can you please review/approve. Thx.