[stable33] Feat/touch device detection#6916
Merged
vitormattos merged 6 commits intostable33from Feb 17, 2026
Merged
Conversation
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>
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.
Backport of PR #6915