-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Props parity work #15400
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
Closed
Closed
Props parity work #15400
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
#15309) * Disable the deep import warning * Change files * Align index.windows.js with core * Change files
…ec files (#15096) * Initial plan * Fix init-windows template to use conditional codegen includes Co-authored-by: anupriya13 <54227869+anupriya13@users.noreply.github.com> * Automatically detect existing codegen spec files instead of using hardcoded names Co-authored-by: anupriya13 <54227869+anupriya13@users.noreply.github.com> * Add explanatory comments about Mustache template syntax for C++ developers Co-authored-by: sundaramramaswamy <29264916+sundaramramaswamy@users.noreply.github.com> * Change files * Run yarn change prerelease and yarn lint:fix Co-authored-by: anupriya13 <54227869+anupriya13@users.noreply.github.com> * Revert unrelated changes to FlatList-multiColumn.windows.js Co-authored-by: anupriya13 <54227869+anupriya13@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: anupriya13 <54227869+anupriya13@users.noreply.github.com> Co-authored-by: sundaramramaswamy <29264916+sundaramramaswamy@users.noreply.github.com> Co-authored-by: Sundaram Ramaswamy <suramaswamy@microsoft.com>
* Realign View.js with upstream * Change files * fix * fix * update snapshots
* visual studio 2026 strict check fix * Fix Crash after closing DesktopPopupSiteBridge * Change files * yarn lint:fix amd format * remove debug logs * Revert "visual studio 2026 strict check fix" * visual studio 2026 strict check fix * nit comment
* metro config fix * Change files
* Change files * Implement context menu support for Fabric TextInput with contextMenuHidden property * Fix beachball change file - add meaningful comment * Fix context menu Paste option to check clipboard content - Added clipboard content check using IsClipboardFormatAvailable(CF_UNICODETEXT) - Paste menu item now only enabled when clipboard has text AND field is editable - Fixes bug where Cut/Copy/Paste showed even when text field was empty - Matches XAML TextBox automatic clipboard state checking behavior Menu item logic now matches Paper: - Cut: requires selection AND editable - Copy: requires selection only - Paste: requires editable AND clipboard has text content - Select All: requires non-empty text AND editable * Fix context menu to show on button release (WM_RBUTTONUP) instead of press --------- Co-authored-by: Nitin Chaudhary <nitchaudhary@microsoft.com>
* Change files * Implement textAlign justify and writingDirection support in Fabric TextInput - Add support for textAlign='justify' using PFA_JUSTIFY flag - Implement writingDirection (baseWritingDirection) support for 'ltr', 'rtl', and 'auto' - Make textAlign='auto' (Natural) respect RTL writing direction - Set PFM_RTLPARA and PFE_RTLPARA flags for RTL text - Achieves full parity with Paper XAML implementation * Fix beachball change file - add meaningful comment * Add textAlign and writingDirection support to TextInput and text layout - TextInput now properly handles textAlign (Left, Right, Center, Justified, Natural) - TextInput now properly handles writingDirection/baseWritingDirection (LTR, RTL, Natural) - WritingDirection::Natural uses layoutMetrics.layoutDirection since direction can be overridden at any point in the tree - Added matching support in WindowsTextLayoutManager for text measurement - WindowsTextLayoutManager now sets DWRITE_READING_DIRECTION based on baseWritingDirection - TextAlignment::Natural now respects reading direction (RTL = trailing, LTR = leading) - Fixes layout affecting flags that impact text measurement throughout the system * Fix reading direction to only apply when explicitly set - Only call SetReadingDirection when baseWritingDirection is explicitly specified - Avoids breaking existing text layouts that don't specify writingDirection - Fixes LegacyControlStyleTest snapshot failure - Natural alignment still respects RTL when baseWritingDirection is set --------- Co-authored-by: Nitin Chaudhary <nitchaudhary@microsoft.com>
* Implement pagingEnabled prop for Fabric ScrollView - Add pagingEnabled boolean member to CompScrollerVisual - Implement PagingEnabled() method in IScrollVisual interface - Generate viewport-sized snap points when pagingEnabled=true - Wire up pagingEnabled prop in ScrollViewComponentView::updateProps() - Achieves parity with Paper ScrollView pagingEnabled support * Implement pagingEnabled property for Fabric ScrollView - Added bool m_pagingEnabled member to CompScrollerVisual - Implemented PagingEnabled() method in IScrollVisual interface - Generate viewport-sized snap points when pagingEnabled=true - Wired up prop handling in ScrollViewComponentView - snapToOffsets disables pagingEnabled (matches Paper/iOS/Android behavior) - Excludes snapToEnd when pagingEnabled to avoid conflicts - Validates viewport size before generating snap points - Reconfigures snap points when size changes and paging is enabled Achieves full parity with Paper XAML and cross-platform React Native behavior. * Implement snapToInterval and snapToAlignment for Fabric ScrollView Added complete snap point parity with Paper/iOS/Android: 1. pagingEnabled: Snaps to viewport-size intervals - Already implemented in previous commit - Full page-by-page scrolling behavior 2. snapToInterval: Snaps to fixed interval multiples - More flexible than pagingEnabled - Works with any interval value - Generates snap points at: 0, interval, 2*interval, 3*interval, ... maxScroll 3. snapToAlignment: Controls snap point alignment - Values: 'start' (Near), 'center' (Center), 'end' (Far) - Only applies when snapToInterval is set - Start: no offset (default) - Center: offset = -viewport/2 - End: offset = -viewport Priority hierarchy matches React Native official behavior: - snapToOffsets (highest) > snapToInterval > pagingEnabled > snapToStart/snapToEnd Implementation: - Added SnapPointsAlignment enum to CompositionSwitcher.idl - Added m_snapToInterval and m_snapToAlignment members to CompScrollerVisual - Implemented SnapToInterval() and SnapToAlignment() methods - Updated ConfigureSnapInertiaModifiers() with priority-based snap point generation - Wired props in ScrollViewComponentView::updateProps() - snapToOffsets disables both snapToInterval and pagingEnabled Matches Paper's SnapPointManagingContentControl behavior where: - GetRegularSnapPoints() returns m_interval when set - SnapToOffsets() sets m_interval = 0 (disables it) - XAML SnapPointsAlignment maps to: Near=start, Center=center, Far=end * Fix snapToInterval type - Float not optional * Update change file and fix formatting for snap point implementation --------- Co-authored-by: Nitin Chaudhary <nitchaudhary@microsoft.com>
Contributor
|
Raise PR against 0.81 stable branch, you have raised for main. |
Contributor
Author
I raised it on the 0.81 stable , how the hell this went to main, let me check |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Cherry-picked commits (in order):
dacbadc - ContextMenu implementation in Fabric as per Parity to Paper (#15339)
9490b2f - TextAlign and WritingDirection Parity for Fabric TextInput (#15340)
40c0967 - PagingEnabled Parity for Fabric ScrollView (#15341)
Microsoft Reviewers: Open in CodeFlow