Skip to content
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

Refactor Codebase #1279

Closed
8 of 9 tasks
karkarl opened this issue May 3, 2023 · 4 comments
Closed
8 of 9 tasks

Refactor Codebase #1279

karkarl opened this issue May 3, 2023 · 4 comments
Assignees
Labels
enhancement Expand an existing sample or add feature to app

Comments

@karkarl
Copy link
Collaborator

karkarl commented May 3, 2023

Refactor WinUI-Gallery codebase:

Tasks

  1. app enhancement help wanted
  2. enhancement help wanted
@karkarl karkarl converted this from a draft issue May 3, 2023
@karkarl karkarl added the enhancement Expand an existing sample or add feature to app label May 3, 2023
@Jay-o-Way
Copy link
Contributor

Spring clean-up 🧹🪣🧽😛

@Jay-o-Way
Copy link
Contributor

Jay-o-Way commented May 30, 2023

@niels9001 Would this include - for example - the following?

<!-- Style (inc. the correct spacing) of a section header -->
<Style
x:Key="SettingsSectionHeaderTextBlockStyle"
BasedOn="{StaticResource BodyStrongTextBlockStyle}"
TargetType="TextBlock">
<Style.Setters>
<Setter Property="Margin" Value="1,29,0,5" />
</Style.Setters>
</Style>

Those numbers are not by the book; the elements (TextBlock) can probably be replaced with more modern implementations via SettingsGroup (Header)

@karkarl
Copy link
Collaborator Author

karkarl commented May 30, 2023

@Jay-o-Way Yes - the idea is to have WinUI Gallery also be a useful repo to refer to for best coding practices. That includes updating redundant xaml.

@Jay-o-Way
Copy link
Contributor

Jay-o-Way commented May 30, 2023

Also a nit I found:

<Setter Target="TitleTxt.Style" Value="{StaticResource SubtitleTextBlockStyle}" />

is unneeded - actually conflicting with line 49: Style="{StaticResource TitleTextBlockStyle}"


Is it better to define style with Setters or in-element?

@karkarl karkarl moved this from Committed 🤞 to 💻 In progress in WinUI Gallery Backlog Aug 28, 2023
karkarl pushed a commit that referenced this issue Oct 16, 2023
<!--- Provide a general summary of your changes in the Title above -->

## Description
<!--- Describe your changes in detail -->
Renames the NewControls page to HomePage since the menu item is called
"Home" and showing new control samples is no longer its only purpose.
## Motivation and Context
<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here. -->
Part of #1279

## How Has This Been Tested?
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran
to -->
<!--- see how your change affects other areas of the code, etc. -->

## Screenshots (if appropriate):

## Types of changes
<!--- What types of changes does your code introduce? Put an `x` in all
the boxes that apply: -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
marcelwgn added a commit to marcelwgn/WinUI-Gallery that referenced this issue Oct 21, 2023
commit 220426e
Author: Marcel Wagner <[email protected]>
Date:   Tue Oct 17 20:40:21 2023 +0200

    Fix sample presenter not properly determing if its empty (microsoft#1374)

    <!--- Provide a general summary of your changes in the Title above -->
    <!--- Describe your changes in detail -->
    The sample presenter did not properly determine if it was empty
    resulting in it not hiding despite it being empty.
    <!--- Why is this change required? What problem does it solve? -->
    <!--- If it fixes an open issue, please link to the issue here. -->
    Fixes microsoft#1373
    <!--- Please describe in detail how you tested your changes. -->
    <!--- Include details of your testing environment, and the tests you ran
    to -->
    <!--- see how your change affects other areas of the code, etc. -->
    <!--- What types of changes does your code introduce? Put an `x` in all
    the boxes that apply: -->
    - [x] Bug fix (non-breaking change which fixes an issue)
    - [ ] New feature (non-breaking change which adds functionality)
    - [ ] Breaking change (fix or feature that would cause existing
    functionality to change)

commit b78b8a5
Author: Marcel Wagner <[email protected]>
Date:   Tue Oct 17 20:35:26 2023 +0200

    Fix Selection Indicator for GridView sample (microsoft#1385)

    <!--- Provide a general summary of your changes in the Title above -->
    <!--- Describe your changes in detail -->
    Due to a missing BasedOn, the selection indicator and other interface
    characteristics where missing on the custom layout sample.
    <!--- Why is this change required? What problem does it solve? -->
    <!--- If it fixes an open issue, please link to the issue here. -->
    Fixes microsoft#1072
    <!--- Please describe in detail how you tested your changes. -->
    <!--- Include details of your testing environment, and the tests you ran
    to -->
    <!--- see how your change affects other areas of the code, etc. -->
    <!--- What types of changes does your code introduce? Put an `x` in all
    the boxes that apply: -->
    - [x] Bug fix (non-breaking change which fixes an issue)
    - [ ] New feature (non-breaking change which adds functionality)
    - [ ] Breaking change (fix or feature that would cause existing
    functionality to change)

commit 09424a9
Author: Karen <[email protected]>
Date:   Mon Oct 16 17:41:14 2023 -0700

    Refactor IconsPage ItemsRepeater to ItemsView (microsoft#1376)

    <!--- Provide a general summary of your changes in the Title above -->
    <!--- Describe your changes in detail -->
    The ItemsRepeater for IconsPage has too many accessibility issues
    including lack of keyboard navigation and narrator announcement.
    Refactored to ItemsView that has all of it built in.

    Also added Narrator announcement when filtered items have changed.
    <!--- Why is this change required? What problem does it solve? -->
    <!--- If it fixes an open issue, please link to the issue here. -->
    [Bug
    44661633](https://microsoft.visualstudio.com/DefaultCollection/OS/_workitems/edit/44661633):
    [WinUI Accessibility: Design guidance -> Icons]: Unable to navigate and
    access the Icons present under “Fluent Icons Library” using keyboard.

    [Bug
    44661471](https://microsoft.visualstudio.com/DefaultCollection/OS/_workitems/edit/44661471):
    [WinUI Accessibility: Design guidance -> Icons]: Screen reader fails to
    announce regarding the available suggestions.
    <!--- Please describe in detail how you tested your changes. -->
    <!--- Include details of your testing environment, and the tests you ran
    to -->
    <!--- see how your change affects other areas of the code, etc. -->
    Manual verification
    <!--- What types of changes does your code introduce? Put an `x` in all
    the boxes that apply: -->
    - [x] Bug fix (non-breaking change which fixes an issue)
    - [ ] New feature (non-breaking change which adds functionality)
    - [ ] Breaking change (fix or feature that would cause existing
    functionality to change)

commit 85d3945
Author: Marcel Wagner <[email protected]>
Date:   Tue Oct 17 01:26:29 2023 +0200

    Update infobadge samples to be more accessible (microsoft#1311)

    <!--- Provide a general summary of your changes in the Title above -->
    <!--- Describe your changes in detail -->
    <!--- Why is this change required? What problem does it solve? -->
    <!--- If it fixes an open issue, please link to the issue here. -->
    Fixes microsoft#769
    <!--- Please describe in detail how you tested your changes. -->
    <!--- Include details of your testing environment, and the tests you ran
    to -->
    <!--- see how your change affects other areas of the code, etc. -->
    <!--- What types of changes does your code introduce? Put an `x` in all
    the boxes that apply: -->
    - [x] Bug fix (non-breaking change which fixes an issue)
    - [ ] New feature (non-breaking change which adds functionality)
    - [ ] Breaking change (fix or feature that would cause existing
    functionality to change)

commit a735e50
Author: Marcel Wagner <[email protected]>
Date:   Tue Oct 17 00:55:19 2023 +0200

    Rename NewControls page to Homepage (microsoft#1381)

    <!--- Provide a general summary of your changes in the Title above -->
    <!--- Describe your changes in detail -->
    Renames the NewControls page to HomePage since the menu item is called
    "Home" and showing new control samples is no longer its only purpose.
    <!--- Why is this change required? What problem does it solve? -->
    <!--- If it fixes an open issue, please link to the issue here. -->
    Part of microsoft#1279
    <!--- Please describe in detail how you tested your changes. -->
    <!--- Include details of your testing environment, and the tests you ran
    to -->
    <!--- see how your change affects other areas of the code, etc. -->
    <!--- What types of changes does your code introduce? Put an `x` in all
    the boxes that apply: -->
    - [ ] Bug fix (non-breaking change which fixes an issue)
    - [ ] New feature (non-breaking change which adds functionality)
    - [ ] Breaking change (fix or feature that would cause existing
    functionality to change)

commit cd00c13
Author: Marcel Wagner <[email protected]>
Date:   Tue Oct 17 00:53:49 2023 +0200

    Update ListView sample code to match used resources (microsoft#1383)

    <!--- Provide a general summary of your changes in the Title above -->
    <!--- Describe your changes in detail -->
    The brushes used for the messaging sample were out of date which this PR
    addresses.
    <!--- Why is this change required? What problem does it solve? -->
    <!--- If it fixes an open issue, please link to the issue here. -->
    <!--- Please describe in detail how you tested your changes. -->
    <!--- Include details of your testing environment, and the tests you ran
    to -->
    <!--- see how your change affects other areas of the code, etc. -->
    <!--- What types of changes does your code introduce? Put an `x` in all
    the boxes that apply: -->
    - [ ] Bug fix (non-breaking change which fixes an issue)
    - [ ] New feature (non-breaking change which adds functionality)
    - [ ] Breaking change (fix or feature that would cause existing
    functionality to change)

commit afd79ce
Author: Ranjesh <[email protected]>
Date:   Mon Oct 16 09:24:53 2023 -0700

    Add ToString method to view model in StandardUICommand sample so accessibility name does not default to data type name. (microsoft#1382)

    Without a ToString, accessibility tools end up using the TypeName.

    ![image](https://github.com/microsoft/WinUI-Gallery/assets/28935693/6604dc35-626d-484d-b300-4c366acdb6fd)

    After fix:

    ![image](https://github.com/microsoft/WinUI-Gallery/assets/28935693/d809ffdd-7532-4177-a5a5-06a81fa21ac5)

commit b1572ee
Author: Karen <[email protected]>
Date:   Wed Oct 11 13:51:39 2023 -0700

    P1 Accessibility Fixes (microsoft#1380)

    <!--- Provide a general summary of your changes in the Title above -->
    <!--- Describe your changes in detail -->
    Miscellaneous p1 accessibility fixes:

    - [Bug
    44661786](https://microsoft.visualstudio.com/DefaultCollection/OS/_workitems/edit/44661786):
    [WinUI Accessibility: Design guidance -> Accessibility-> Keyboard
    support]: Screen reader is announcing incorrect information about the
    shortcuts.
    - [Bug
    46762667](https://microsoft.visualstudio.com/DefaultCollection/OS/_workitems/edit/46762667):
    [WinUI 3 Gallery: Item View]: Screen reader fails to announce the label
    for the radio buttons present in under 'Layout' group.
    - [Bug
    46763238](https://microsoft.visualstudio.com/DefaultCollection/OS/_workitems/edit/46763238):
    [WinUI 3 Gallery: Progress Ring]: Accessibility name and visual name is
    not same for working toggle button present under 'Toggle Work' group.
    - [Bug
    46818786](https://microsoft.visualstudio.com/DefaultCollection/OS/_workitems/edit/46818786):
    [WinUI 3 Gallery: Clipboard]: Screen reader is not announcing the
    success message after activating the 'Copy Text to the Clipboard'
    button.
    - [Bug
    46818852](https://microsoft.visualstudio.com/DefaultCollection/OS/_workitems/edit/46818852):
    [WinUI 3 Gallery: FilePicker]: Screen reader is not announcing the
    success message after activating the 'Open a file/Open a picture/Save a
    file' button.
    - [Bug
    46820249](https://microsoft.visualstudio.com/DefaultCollection/OS/_workitems/edit/46820249):
    [WinUI 3 Gallery: Design Guidance: Color]: Upon invoking 'Copy brush
    name' button screen reader is on mute and there is no visual changes.
    - [Bug
    46820807](https://microsoft.visualstudio.com/DefaultCollection/OS/_workitems/edit/46820807):
    [WinUI 3 Gallery: Typography]: Some parts of right side of the screen is
    getting truncated in High DPI mode also not having scroll bar to scroll
    towards right.
    - [Bug
    46821911](https://microsoft.visualstudio.com/DefaultCollection/OS/_workitems/edit/46821911):
    [WinUI 3 Gallery: List View]: Text present beside the images which
    present under 'List view with image' heading is getting truncated in
    normal mode.
    - [Bug
    46825231](https://microsoft.visualstudio.com/DefaultCollection/OS/_workitems/edit/46825231):
    [WinUI 3 Gallery: Connected Animation]: Text present beside the images
    which present in 'Connected Animation' card is getting truncated in
    normal mode.
    - [Bug
    41570653](https://microsoft.visualstudio.com/DefaultCollection/OS/_workitems/edit/41570653):
    [WinUI Accessibility-> Left Navigation Pane]: No success information
    announced by screen reader, when user invokes open/close navigation
    button.
    - [Bug
    41597549](https://microsoft.visualstudio.com/DefaultCollection/OS/_workitems/edit/41597549):
    [WinUI Gallery] WinUI Accessibility-> TeachingTip: Unable to navigate to
    the image present in "Quickly reference this sample!" dialog using caps
    arrow keys.
    <!--- What types of changes does your code introduce? Put an `x` in all
    the boxes that apply: -->
    - [x] Bug fix (non-breaking change which fixes an issue)
    - [ ] New feature (non-breaking change which adds functionality)
    - [ ] Breaking change (fix or feature that would cause existing
    functionality to change)

commit 9a2c60b
Author: Karen <[email protected]>
Date:   Wed Oct 11 12:32:02 2023 -0700

    Add Test to Scan All Pages for Axe Issues (microsoft#1361)

    <!--- Provide a general summary of your changes in the Title above -->
    <!--- Describe your changes in detail -->
    - Add a test that physically navigates to each page via NavView and
    check for Axe issues.
    - Utilizes DynamicData attribute to create grouped tests based on
    section category (ie. TreeView parent)
    - This also tests for run-time crashes with each page.
    - Miscellaneous Axe fixes.
    <!--- What types of changes does your code introduce? Put an `x` in all
    the boxes that apply: -->
    - [ ] Bug fix (non-breaking change which fixes an issue)
    - [x] New feature (non-breaking change which adds functionality)
    - [ ] Breaking change (fix or feature that would cause existing
    functionality to change)

commit 1d23724
Author: Marcel Wagner <[email protected]>
Date:   Wed Oct 11 02:31:01 2023 +0200

    Cleanup unnecessary code (microsoft#1299)

commit 20cd457
Author: Scott Jones <[email protected]>
Date:   Tue Oct 10 17:30:05 2023 -0700

    Update to WinAppSDK 1.4.2 and remove temporary workaround for including version info without dupe warnings (microsoft#1379)

commit c2fd30d
Author: Scott Jones <[email protected]>
Date:   Tue Oct 10 10:47:39 2023 -0700

    Set TrimMode explicitly back to partial for .NET 7 compat (microsoft#1378)

    See:

    https://learn.microsoft.com/en-us/dotnet/core/deploying/trimming/trimming-options?pivots=dotnet-7-0

commit f72609f
Author: Pratik Anand <[email protected]>
Date:   Tue Oct 3 12:29:10 2023 -0700

    Clickable Interactive control sample for custom titlebar (microsoft#1360)

    With 1.4 changes, WinUI 3 custom titlebar now uses appwindow titlebar + nonclientinputpointersource apis under the hood. This opens up new possibilities like allowing clickable interactive controls like textbox, button in the titlebar area, surrounded by draggable region on both left and the right sides.

    This code adds a sample to titlebar page which shows users how to create interactive controls in winui 3 titlebar. It also demonstrates the power of mixing and matching high level winui 3 custom titlebar apis and low level nonclient apis.

commit 5a96afc
Author: Andrew KeepCoding <[email protected]>
Date:   Thu Sep 28 19:31:59 2023 +0900

    Fix issue that crashes the app when navigating to SemanticZoomPage (microsoft#1363)

commit 9650e4e
Author: Marcel Wagner <[email protected]>
Date:   Thu Sep 28 12:31:39 2023 +0200

    Switch .NET 7 (microsoft#1115)

commit 8f1b425
Author: Marcel Wagner <[email protected]>
Date:   Thu Sep 28 12:31:22 2023 +0200

    First round of UWP link replacement (microsoft#1347)

    Co-authored-by: Bob Pulliam <[email protected]>

commit 1fcd8ed
Author: Steve <[email protected]>
Date:   Thu Sep 28 05:21:29 2023 +0900

    Fix division by zero (microsoft#1366)

    <!--- Provide a general summary of your changes in the Title above -->
    Fix division by zero exception when the window is too narrow.
    Fixes microsoft#1365
    <!--- What types of changes does your code introduce? Put an `x` in all
    the boxes that apply: -->
    - [x] Bug fix (non-breaking change which fixes an issue)
    - [ ] New feature (non-breaking change which adds functionality)
    - [ ] Breaking change (fix or feature that would cause existing
    functionality to change)

commit cbfc1fb
Author: Scott Jones <[email protected]>
Date:   Sun Sep 24 04:55:17 2023 -0700

    Fixes for WinUI submodule compatibility (microsoft#1362)

commit 398af50
Author: Scott Jones <[email protected]>
Date:   Wed Sep 20 04:03:02 2023 -0700

    Update to WinAppSDK 1.4.1 and remove menu theme workaround (microsoft#1359)

commit 9c80909
Author: Mike Crider <[email protected]>
Date:   Mon Sep 18 21:42:15 2023 -0700

    Added a "Capture element / camera preview" page in the Media section. (microsoft#1357)
    `CaptureElement` from UWP XAML does not exist in WinAppSDK, but
    `MediaPlayerElement` can be used in its place. The change adds a new
    sample page to demonstrate how this can be done.

    Note: Currently this page just reuses the same icon as the
    MediaPlayerElement page. Ideally at some point we'll get a camera icon
    which could be used here instead.
    Demonstrate the couple of calls to get from a `MediaCapture` to an
    `IMediaPlaybackSource` necessary to display the capture in a
    MediaPlayerElement. This also demonstrates basic creation of a
    `MediaCapture` to provide an end-to-end sample. This sample should help
    address questions in microsoft/microsoft-ui-xaml#4710 and
    microsoft/microsoft-ui-xaml#8214.
    Ad-hoc testing and testing with Accessibility Insights for Windows tool.
    - [ ] Bug fix (non-breaking change which fixes an issue)
    - [x] New feature (non-breaking change which adds functionality)
    - [ ] Breaking change (fix or feature that would cause existing
    functionality to change)

commit 258d8c8
Merge: 46137e8 6d4d692
Author: Karen <[email protected]>
Date:   Mon Sep 18 14:14:37 2023 -0700

    Merge pull request microsoft#1354 from ghost1372/AcrylicKind

    Add new Desktop Acrylic kind (Base and Thin)

commit 6d4d692
Author: Mahdi Hosseini <[email protected]>
Date:   Tue Sep 19 00:17:19 2023 +0330

    fix indent

commit 41df384
Author: Mahdi Hosseini <[email protected]>
Date:   Sat Sep 9 14:11:01 2023 +0330

    Add Missing Sample for Desktop Acrylic

commit 05d2c80
Author: Mahdi Hosseini <[email protected]>
Date:   Sat Sep 9 14:03:42 2023 +0330

    Update SystemBackdropsSample

commit 97afe68
Author: Mahdi Hosseini <[email protected]>
Date:   Sat Sep 9 14:03:14 2023 +0330

    Add DesktopAcrylic Kind (Base, Thin)

commit 46137e8
Author: Karen <[email protected]>
Date:   Fri Sep 8 17:15:16 2023 -0700

    WinUI Gallery 2.2.0.0 Release (microsoft#1353)

commit eb71711
Merge: 10d21fb 6f42854
Author: Scott Jones <[email protected]>
Date:   Fri Sep 8 11:22:05 2023 -0700

    Merge pull request microsoft#1352 from microsoft/scottj1s/disable_r2r

    disable ReadyToRun as it was mistakenly trimming Microsoft.UI.Xaml.Controls.ScrollView from Microsoft.WinUI.dll

commit 6f42854
Author: Scott Jones <[email protected]>
Date:   Fri Sep 8 11:05:21 2023 -0700

    disable ReadyToRun as it was mistakenly trimming Microsoft.UI.Xaml.Controls.ScrollView from Microsoft.WinUI.dll
karkarl added a commit that referenced this issue Feb 16, 2024
## Description

First attempt to clean up the codebase:
- Clean up themeresources and styles in App.xaml
- Fix minimal mode TitleBar layout
- CaptureElement and AnnotatedScrollBar Icons

## Motivation and Context
Part of #1279 efforts
This was referenced Feb 22, 2024
karkarl added a commit that referenced this issue Feb 22, 2024
Replace AppUIBasics to WinUIGallery Namespace

Part of #1279
karkarl pushed a commit that referenced this issue Feb 27, 2024
## Description
This PR cleans up some obsolete code/data and includes minor code
improvements.

## Motivation and Context
Part of #1279 

## Open questions
The Related Controls section no longer exists, should we also remove
that from the code and json?
karkarl pushed a commit that referenced this issue Jul 15, 2024
<!--- Provide a general summary of your changes in the Title above -->

## Description
<!--- Describe your changes in detail -->
Renames the NewControls page to HomePage since the menu item is called
"Home" and showing new control samples is no longer its only purpose.
## Motivation and Context
<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here. -->
Part of #1279

## How Has This Been Tested?
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran
to -->
<!--- see how your change affects other areas of the code, etc. -->

## Screenshots (if appropriate):

## Types of changes
<!--- What types of changes does your code introduce? Put an `x` in all
the boxes that apply: -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
karkarl added a commit that referenced this issue Jul 15, 2024
## Description

First attempt to clean up the codebase:
- Clean up themeresources and styles in App.xaml
- Fix minimal mode TitleBar layout
- CaptureElement and AnnotatedScrollBar Icons

## Motivation and Context
Part of #1279 efforts
karkarl added a commit that referenced this issue Jul 15, 2024
Replace AppUIBasics to WinUIGallery Namespace

Part of #1279
karkarl pushed a commit that referenced this issue Jul 15, 2024
## Description
This PR cleans up some obsolete code/data and includes minor code
improvements.

## Motivation and Context
Part of #1279 

## Open questions
The Related Controls section no longer exists, should we also remove
that from the code and json?
@karkarl karkarl moved this from 💻 In progress to ✅ Done in WinUI Gallery Backlog Aug 22, 2024
@karkarl karkarl closed this as completed Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Expand an existing sample or add feature to app
Projects
Status: Done
Development

No branches or pull requests

3 participants