Skip to content

[stable33] Feat/touch device detection#6916

Merged
vitormattos merged 6 commits intostable33from
backport/6915/stable33
Feb 17, 2026
Merged

[stable33] Feat/touch device detection#6916
vitormattos merged 6 commits intostable33from
backport/6915/stable33

Conversation

@backportbot-libresign
Copy link

Backport of PR #6915

Introduce a new mixin that detects touch device capabilities by checking
'ontouchstart' in window or navigator.maxTouchPoints > 0. This enables
components to conditionally show/hide touch-specific UI elements based
on the device type.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Use isTouchDevice mixin to conditionally show View PDF button:
- Desktop (no touch): Button appears on hover via #actions template
- Touch devices: Button always visible in #extra-actions template

This improves usability on touch devices where hover is unavailable,
while keeping the desktop interface clean.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Use isTouchDevice mixin to conditionally show file action buttons:
- Desktop (no touch): Open and Delete buttons appear on hover via #actions
- Touch devices: Buttons always visible in #extra-actions with icons only

Replaces NcActionButton with NcButton variant=tertiary for better
touch device accessibility. Maintains clean desktop UI with hover-only
actions.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Cover mixin functionality with pragmatic tests:
- Verify isTouchDevice is a valid computed property
- Test that it returns a boolean value
- Validate logic matches environment capabilities
- Ensure consistency across multiple accesses
- Confirm mixin is reactive

Tests account for actual environment where touch detection
may be enabled, validating against detected capabilities.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
New test suite validates:
- isTouchDevice computed property exists from mixin
- View PDF action slot rendering on non-touch devices
- viewFile method calls with correct parameters
- openDocument integration when viewFile invoked

Tests ensure responsive behavior works correctly across
device types and document viewer integration functions.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
New test suite validates:
- isTouchDevice computed property exists from mixin
- File action slot rendering based on device type
- openFile and handleDelete method invocations
- openDocument integration when opening files

Tests ensure file action buttons work correctly across
device types and properly integrate with document viewer.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
@github-project-automation github-project-automation bot moved this to 0. Needs triage in Roadmap Feb 17, 2026
@backportbot-libresign backportbot-libresign bot added this to the Next RC (33) milestone Feb 17, 2026
@vitormattos vitormattos merged commit 1bbc107 into stable33 Feb 17, 2026
60 checks passed
@vitormattos vitormattos deleted the backport/6915/stable33 branch February 17, 2026 02:14
@github-project-automation github-project-automation bot moved this from 0. Needs triage to 4. to release in Roadmap Feb 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: 4. to release

Development

Successfully merging this pull request may close these issues.

1 participant