Vague documentation, misleading for Android
Toga's DetailedList widget supports primary, secondary, and refresh actions. The original documentation described these actions in generic terms — referring to "platforms that use swipe interactions" without specifying which platform uses which interaction.
The maintainer filed an issue noting that while Android is commonly associated with swipe gestures, Toga's Android implementation actually uses a long-press popup menu. A developer reading the original paragraph would reasonably assume Android uses swipes — and write code or user instructions based on that incorrect assumption.
The same gap existed for the refresh action, which varies from pull-to-refresh on mobile to a button on desktop platforms.
From vague to platform-specific
Items in a DetailedList can respond to a primary and secondary action. On platforms that use swipe interactions, the primary action will be associated with "swipe left", and the secondary action will be associated with "swipe right". Other platforms may implement the primary and secondary actions using a different UI interaction (e.g., a right-click context menu).
Items in a DetailedList will respond to a primary and secondary action if the on_primary_action and on_secondary_action handlers are set:
- On Android, a long press displays a menu with the primary and secondary actions.
- On iOS, swiping left triggers the primary action, and swiping right triggers the secondary action.
- On GTK, a right click displays buttons for the primary and secondary actions.
- On macOS, a right click displays a context menu with the primary and secondary actions.
- On Qt, the primary and secondary actions are displayed as standalone buttons.
- On Windows, the implementation does not currently support primary or secondary actions.
The DetailedList as a whole will also respond to a refresh UI action if an on_refresh handler is set:
- On macOS, iOS and Android, pulling down at the top of the list triggers a refresh.
- On Qt, a button bar displays a refresh button.
- On GTK, a floating refresh button is displayed when scrolled to the top.
- On Windows, the implementation does not currently support refresh.
Contribution workflow
This was my first contribution to an open source project. The process involved learning GitHub's fork-and-PR workflow, navigating CI requirements, and responding to maintainer feedback — all in a live, public code review.
Skills applied
Audience-centered rewriting. The original paragraph was technically correct but misleading for developers targeting specific platforms. The revision gives each platform its own explicit entry — a developer can scan for their target platform and find the exact behavior.
Consistency under constraints. Each bullet follows the same grammatical pattern: "On [platform], [trigger] [result]." The maintainer refined this pattern further during review, and I adopted the improvements.
Working within an existing workflow. Open source contribution requires following the project's conventions — commit message format, change note files, CI checks, review etiquette. This PR demonstrates the ability to navigate that process from start to merge.