Files icon indicating copy to clipboard operation
Files copied to clipboard

Code Quality: Remove context flyout builder

Open 0x5bfa opened this issue 1 year ago • 2 comments

Summary

This is also an prepatation PR for the IRichCommand parameter introduction.

In the effort to introduction of IRichCommand parameter, it'd be better to remove duplication and provide single way of generating ContextFlyoutItems.

  • ContextMenuFlyoutItemType to ContextFlyoutItemType
  • Removed ContextMenuFlyoutItemViewModelBuilder
  • ContextMenuFlyoutItemViewModel to ContextFlyoutItemModel
  • Added XML comments in ContextFlyoutItemModel
  • Added some constructors to adopt with IRichCommand in ContextFlyoutItemModel
  • Converted OpacityIconModel from struct to class to use constructor
  • ~~Use IsVisible instead of Show to be more boolean-tic~~
  • ~~Removed ID and use Tag instead.~~

PR Checklist

  • [x] Were these changes approved in an issue or discussion with the project maintainers? In order to prevent extra work, feature requests and changes to the codebase must be approved before the pull request will be reviewed. This prevents extra work for the contributors and maintainers.
  • [x] Did you build the app and test your changes?
  • [ ] Did you check for accessibility? You can use Accessibility Insights for this.
  • [ ] Did you remove any strings from the en-us resource file?
    • [ ] Did you search the solution to see if the string is still being used?
  • [ ] Did you implement any design changes to an existing feature?
    • [ ] Was this change approved?
  • [x] Are there any other steps that were used to validate these changes?
    1. Go to layout page
    2. Right click (check if shown correctly)
    3. Select item and right click (check again)
    4. Right click Sidebar item (again)
    5. Go to Home
    6. Right click Widget item (again)

Screenshots

None

0x5bfa avatar May 01 '24 20:05 0x5bfa

Are there any other steps that were used to validate these changes

yaira2 avatar May 01 '24 20:05 yaira2

Done all. Full change log is available in the PR body.


We have two unused boolean properties, removing is out of scope?

ID and SingleItemOnly.

0x5bfa avatar May 03 '24 02:05 0x5bfa

Causing many issues....

0x5bfa avatar May 03 '24 08:05 0x5bfa