-
Notifications
You must be signed in to change notification settings - Fork 290
feat(texteditor): swap editor view on touhscreens detection #5305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
marcellamaki
merged 12 commits into
learningequality:unstable
from
habibayman:feat/RTE-touchscreens
Sep 9, 2025
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
1d97750
refactor(texteditor): remove uploader component from assessment item …
habibayman 079146d
refactor(texteditor):better DOM handling for image node view
habibayman 593f20e
feat(texteditor): swap editor view on touchscreen detect
habibayman 4103d4d
refactor(texteditor): landscape screens better modals
habibayman bb871dc
fix(texteditor):show mobile format toolbar above keyboard
habibayman 81ed40f
feat(texteditor):move ItemToolbar up editor on touchscreens
habibayman be8957b
feat(texteditor):move ItemToolbar up on desktop overflow
habibayman 7f7b823
feat(texteditor):add text formtatting buttons to overflow
habibayman 4960f0c
fix(texteditor):add missing text on toolbar more dropdown
habibayman f11e454
(texteditor): translate unwrapped string in editortoolbar
habibayman 6b399ae
fix merge conflicts
habibayman fae6155
fix(texteditor): align formatbar on touchscreens correctly
habibayman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
11 changes: 11 additions & 0 deletions
11
contentcuration/contentcuration/frontend/shared/utils/browserInfo.js
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| /** | ||
| * Utility functions to detect browser and device capabilities. | ||
| * Currently studio isn't fully buit for touch devices, | ||
| * this file should be used for future-proofing | ||
| */ | ||
|
|
||
| // Check for presence of the touch event in DOM or multi-touch capabilities | ||
| export const isTouchDevice = | ||
| 'ontouchstart' in window || | ||
| window.navigator?.maxTouchPoints > 0 || | ||
| window.navigator?.msMaxTouchPoints > 0; |
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see elsewhere you're using
isTouchDevice || screenSizeLevel <= 3- should this be similar or!isMobile && !isTouchDevice?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This condition flips the toolbar component itself (Mobile / Desktop), while the
isTouchDevice || screenSizeLevel <= 3condition manages the<AssessmentItemToolbar />placement.++ I've checked with Jessica and she said that the Mobile Formatting bar mustn't appear unless it's displayed on a touch device, so I manage the desktop toolbar on small screens elsewhere.