fix: remove non-functional IsSwipeEnabled from TodoApp.Uno TodoListPage#564
Merged
Merged
Conversation
ListViewBase.IsSwipeEnabled is only implemented on the native WinUI/Windows renderer in Uno Platform, causing an Uno0001 build warning on the android, browserwasm, desktop, and ios-maccatalyst heads. The sample doesn't implement any actual swipe-to-reveal-actions gesture (no SwipeItems, no Uno.Toolkit.UI SwipeContainer), so the attribute was dead configuration with no user-facing effect on any platform. Removing it eliminates the warning without changing behavior. Closes CommunityToolkit#537
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
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.
Summary
TodoApp.Uno'sViews/TodoListPage.xamlsetIsSwipeEnabled="True"on theListView, butListViewBase.IsSwipeEnabledis only implemented on thenative WinUI/Windows renderer in Uno Platform. This produced an
Uno0001build warning on the
android,browserwasm,desktop, andios-maccatalystheads (notwindows).Root cause
This is a known Uno Platform limitation:
ListViewBase.IsSwipeEnabled(andthe swipe-to-reveal-actions gesture it enables) only exists on the
WinUI/Windows renderer. Setting it is a no-op — and a compile-time warning —
on every Skia-based head. The sample doesn't implement any actual swipe
gesture (no
SwipeItems, noUno.Toolkit.UISwipeContainer/SwipeButton),so the attribute was dead configuration with no user-facing effect on any
platform, including Windows.
Fix
Removed the
IsSwipeEnabled="True"attribute from theListViewinViews/TodoListPage.xaml. This matches option (1) from the issue(remove the dead attribute) — the minimal fix, since:
TodoApp.WinUI3/Views/TodoListPage.xamlListViewneverset this attribute either, so it isn't a cross-sample convention.
docs/samples/todoapp/unoplatform.md) referencesswipe-to-delete as an intentional teaching point for this sample.
Verification
dotnet restore/dotnet buildagainstDatasync.Toolkit.sln(libraryand test projects, which don't include
TodoApp.Uno) succeed unaffected.build-samples.ymlon this branch:https://github.com/adrianhall/CommunityToolkit-Datasync/actions/runs/29148063118
— all jobs passed, including all
todoapp-unoheads (android,browserwasm,desktop,ios-maccatalyst,windows).Uno0001warning no longer appears in thetodoapp-uno / androidjob log (previously affected head).Closes #537