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
Add Expander native component (WinUI 2.6) #756
Conversation
…r/fluentui-react-native into windows-native-expander
packages/experimental/Expander/FluentUIReactNativeButton.podspec
Outdated
Show resolved
Hide resolved
…native into windows-native-expander
Something I forgot to mention: If you could add screenshots / videos to your PR, it would be really helpful to understand how the component looks / should behave when reviewing. And is good historical data when looking through git history :D |
packages/experimental/Expander/windows/ReactNativeExpander/ExpanderView.cpp
Show resolved
Hide resolved
packages/experimental/Expander/windows/ReactNativeExpander/ReactPackageProvider.cpp
Outdated
Show resolved
Hide resolved
packages/experimental/Expander/windows/ReactNativeExpander/ExpanderViewManager.cpp
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great stuff! Left a few nit comments. Also, make sure you finish off ReplaceChild()
and resolve the conflict in yarn.lock
packages/experimental/Expander/windows/ReactNativeExpander/ExpanderView.idl
Show resolved
Hide resolved
…native into windows-native-expander
if (userProps.onCollapsing !== undefined) { | ||
userProps.onCollapsing(); | ||
} | ||
// Need to delay the height change so that the animation runs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this a pattern rn-windows folks have been taking to generate layout animations w/o using LayoutAnimation [due to limitations e.g. its global nature] ? This is a 175ms wait on the JS thread, am I reading that right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we added a wait on the JS thread to allow enough time for the native animation to complete before changing the height of the Expander.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@PPatBoyd RNW does not support RN layout animations. All animations here are XAML animations.
*/ | ||
chevronForeground?: ColorValue; | ||
/* | ||
* Chevron background color on pointer over |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the chevron gets different background and foreground colors from the rest of the control's background
, e.g. we can't reuse BackgroundTokens ?
the variations should be handled in styling and only need chevronBackground chevronForeground
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I pulled these tokens from values that can be put in the ResourceDictionary, so they can all be different colors.
…native into windows-native-expander
@Saadnajmi Just added the test files. |
apps/fluent-tester/src/FluentTester/TestComponents/Expander/ExpanderTest.tsx
Outdated
Show resolved
Hide resolved
Hello @Saadnajmi! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
Platforms Impacted
Description of changes
Adding a native windows Expander control (WinUI 2.6) to FURN.
Notable design choices:
Future work:
Verification
Tested on a React Native for Windows v0.64.x tester app. Expander was tested for light mode, dark mode, and keyboard accessibility.
Basic Expander
Basic_Expander_Demo.mp4
Full Expander Functionality
Expander_Full_Demo.mp4
Dark Mode
Pull request checklist
This PR has considered (when applicable):