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

Porting Behaviors #20

Merged
merged 13 commits into from
Apr 20, 2023
Merged

Porting Behaviors #20

merged 13 commits into from
Apr 20, 2023

Conversation

Arlodotexe
Copy link
Member

@Arlodotexe Arlodotexe commented Apr 14, 2023

This PR ports Behaviors from the old WCT repo. Closes #7.

Prerequisite PR CommunityToolkit/Tooling-Windows-Submodule#46

Directory.Build.props Outdated Show resolved Hide resolved
components/Behaviors/src/BehaviorBase.cs Show resolved Hide resolved
components/Behaviors/src/FocusBehavior.cs Outdated Show resolved Hide resolved
@Arlodotexe Arlodotexe self-assigned this Apr 18, 2023
@Arlodotexe Arlodotexe added the enhancement New feature or request label Apr 18, 2023
@Arlodotexe Arlodotexe marked this pull request as ready for review April 18, 2023 00:55
@Arlodotexe
Copy link
Member Author

After more testing, KeyDownTriggerBehavior doesn't work on WASM. Will investigate more tomorrow.

@michael-hawker
Copy link
Member

Rebased on top of main and removed commits for the tooling submodule updates.

@michael-hawker
Copy link
Member

michael-hawker commented Apr 19, 2023

WinUI 2 fail from .NET Native
WinUI 3 from:

       "D:\a\Windows\Windows\CommunityToolkit.AllComponents.sln" (default target) (1:2) ->
       "D:\a\Windows\Windows\tooling\ProjectHeads\AllComponents\Tests.WinAppSdk\CommunityToolkit.Tests.WinAppSdk.csproj" (default target) (20:6) ->
       "D:\a\Windows\Windows\components\Extensions\src\CommunityToolkit.WinUI.Extensions.csproj" (GetTargetPathWithTargetPlatformMoniker target) (8:259) ->
         D:\a\Windows\Windows\components\Extensions\src\CommunityToolkit.WinUI.Extensions.csproj : error MSB4057: The target "GetTargetPathWithTargetPlatformMoniker" does not exist in the project.

Very weird. 🤔 Could it be dotnet/msbuild#4303?

@michael-hawker
Copy link
Member

michael-hawker commented Apr 19, 2023

Going to try changing back the path thing just to try... otherwise I'm not really sure what's different about this PR...

@michael-hawker
Copy link
Member

@Arlodotexe pretty sure that was is... WinUI 3 build just succeeded. Seems like docs are wrong about the trailing slash or something...? Maybe good for us to keep breaking up PRs our that make other miscellaneous changes.

@Arlodotexe
Copy link
Member Author

Arlodotexe commented Apr 19, 2023

@Arlodotexe pretty sure that was is... WinUI 3 build just succeeded. Seems like docs are wrong about the trailing slash or something...? Maybe good for us to keep breaking up PRs our that make other miscellaneous changes.

That's... really odd. I've had issues in Labs in the past where MSBuildThisFileDirectory (the value of RepositoryDirectory) added a trailing slash and caused issues with other tooling. In the future, if we start hitting those problems again, MSBuild provides a few property methods that should help.

Moving forward then, thanks for the hand @michael-hawker!

@Arlodotexe Arlodotexe added this pull request to the merge queue Apr 20, 2023
Copy link
Member

@michael-hawker michael-hawker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good with merging, but we should add tasklist line-items to follow-up and investigate on the main tracking issue:

  • AutoSelectBehavior not working on WinAppSDK
  • AutoSelectBehavior not working when clicking in/on the textbox, only with keyboard focus (I think the new platform styles don't show selection when the control doesn't have focus, so this may be related compared to how it used to work?)
  • Bit confused by FocusBehavior and what it enables, maybe we can improve docs/samples later
  • The KeyDownTriggerBehavior not working on WASM as you mentioned
  • Doesn't look like the IsAlwaysOn properly unregisters for the ViewportBehavior on WASM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Port Behaviors
2 participants