Conversation
There was a problem hiding this comment.
Pull request overview
This PR improves the MarkdownTextBlock image handling by replacing fixed Width/Height sizing with a MaxWidth/MaxHeight constraint-based approach, preventing images from being stretched beyond their parent container. It also includes XAML formatting improvements for the theme options pane and updates to sample documentation.
- Changed image sizing from fixed dimensions to flexible MaxWidth/MaxHeight constraints to prevent stretching
- Simplified constraint application logic by directly using MaxWidth/MaxHeight instead of complex scaling calculations
- Reformatted XAML file with consistent indentation and attribute placement
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| MyImage.cs | Refactored image sizing logic to use MaxWidth/MaxHeight constraints instead of fixed dimensions, allowing images to scale properly within their containers |
| ThemeOptionsPane.xaml | Applied consistent code formatting with proper indentation and line breaks |
| MarkdownTextBlockCustomThemeSample.xaml.cs | Added documentation about image corner radius feature and included additional sample image |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
components/MarkdownTextBlock/samples/MarkdownTextBlockCustomThemeSample.xaml.cs
Outdated
Show resolved
Hide resolved
components/MarkdownTextBlock/samples/MarkdownTextBlockCustomThemeSample.xaml.cs
Outdated
Show resolved
Hide resolved
components/MarkdownTextBlock/samples/MarkdownTextBlockCustomThemeSample.xaml.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
- Tests that theme constraints should not enlarge images smaller than the constraint - Tests that precedent dimensions from markdown syntax should be respected - Tests that theme constraints properly limit larger images - Reveals current bugs where constraints are always applied regardless of context
There was a problem hiding this comment.
Surfaced a few regressions:
- This should be fixed in this PR before closing. Failing tests have been pushed to demonstrate the issue.
- The missing image corner radius bit should be handled in a new PR.
The remaining review comments from Copilot are either trivial and already merged or false positives.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 9 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
components/MarkdownTextBlock/samples/MarkdownTextBlockImageProviderSample.xaml.cs
Outdated
Show resolved
Hide resolved
components/MarkdownTextBlock/tests/ImageProviderConstraintTest.cs
Outdated
Show resolved
Hide resolved
components/MarkdownTextBlock/samples/MarkdownTextBlockImageProviderSample.xaml.cs
Outdated
Show resolved
Hide resolved
components/MarkdownTextBlock/samples/MarkdownTextBlockImageProviderSample.xaml.cs
Outdated
Show resolved
Hide resolved
components/MarkdownTextBlock/samples/MarkdownTextBlockImageProviderSample.xaml.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…unityToolkit/Labs-Windows into niels9001/mdtb-improvements
components/MarkdownTextBlock/tests/ImageProviderConstraintTest.cs
Outdated
Show resolved
Hide resolved
components/MarkdownTextBlock/samples/MarkdownTextBlockImageProviderSample.xaml.cs
Outdated
Show resolved
Hide resolved
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request TO DO: Upgrade to the latest version of MarkdownTextBlock: CommunityToolkit/Labs-Windows#771 This PR introduces the following changes: **Removed the custom titlebars on the OOBE Window, and replaced it with the inbox WinUI `TitleBar` control.** **New "What's new" experience following the VS Code release notes experience** - Created a new SCOOBE Windows that is a standalone window to better visualize release notes. - Adding a nav menu on the left to easily switch between release notes, instead of a long page. - Point releases are combined with the latest main release.. e.g. 0.96.1 is rendered above 0.96.0. - The 'hero image' on main release notes will automatically be rendered at the top of the page. - Improved markdown styling for better readability. - Pull requests links can now be clicked. - Upgraded `CommunityToolkit.Labs.MarkdownTextblock` to the latest version as it includes much needed bugfixes. <img width="1234" height="819" alt="image" src="https://github.com/user-attachments/assets/447b3136-306b-4f24-bc7a-c022a99e8e51" /> Note: the blurry image shown above will be replaced in new releases by an image that fits the right dimensions. <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [ ] Closes: #xxx <!-- - [ ] Closes: #yyy (add separate lines for additional resolved issues) --> - [ ] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected - [ ] **Tests:** Added/updated and all pass - [ ] **Localization:** All end-user-facing strings can be localized - [ ] **Dev docs:** Added/updated - [ ] **New binaries:** Added on the required places - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx <!-- Provide a more detailed description of the PR, other things fixed, or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed --------- Co-authored-by: Leilei Zhang <leilzh@microsoft.com>
Uh oh!
There was an error while loading. Please reload this page.