Skip to content

Feat/touch device detection#6915

Merged
vitormattos merged 6 commits intomainfrom
feat/touch-device-detection
Feb 17, 2026
Merged

Feat/touch device detection#6915
vitormattos merged 6 commits intomainfrom
feat/touch-device-detection

Conversation

@vitormattos
Copy link
Member

No description provided.

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>
@vitormattos vitormattos added this to the Next Major (34) milestone Feb 17, 2026
@vitormattos vitormattos self-assigned this Feb 17, 2026
@github-project-automation github-project-automation bot moved this to 0. Needs triage in Roadmap Feb 17, 2026
@vitormattos
Copy link
Member Author

/backport to stable32

@vitormattos
Copy link
Member Author

/backport to stable33

@vitormattos vitormattos merged commit faa7bb3 into main Feb 17, 2026
61 checks passed
@vitormattos vitormattos deleted the feat/touch-device-detection branch February 17, 2026 02:08
@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

Labels

None yet

Projects

Status: 4. to release

Development

Successfully merging this pull request may close these issues.

1 participant