Skip to content

Conversation

habibayman
Copy link
Member

@habibayman habibayman commented Aug 17, 2025

Summary

Following a conversation with Jessica on the design thread link, In this PR I've configured the editor to switch to touch screens design based on touch device detection. in this way the design will work for tablets & mobile phones too.
for the check, I copied a utility from Kolibri here. It's not used anywhere else in studio but it'll help when we decide to prepare the whole UI of studio for touch screens too.

I also moved the <AssessmentItemToolbar /> up on touch screens and for medium desktop screen sizes.

I noticed that the overflow button in the specs had text next to the icon, I added that too.


References


Reviewer Guidance

Try the editor in different screen sizes + in touch/non-touch screens


Visuals

desktop.webm
RTL-Desktop.webm
Mobile.webm

@habibayman habibayman force-pushed the feat/RTE-touchscreens branch 3 times, most recently from 0b938bd to 46c5880 Compare August 24, 2025 19:52
@habibayman habibayman marked this pull request as ready for review August 24, 2025 19:56
Copy link
Member

@nucleogenesis nucleogenesis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I gave the code a good look through (I'm pretty sure I got the right commit range 😅) -- and overall it looks excellent.

I tested it locally and on touchscreen devices it was exactly as expected w/ the toolbar at the bottom & the dropdown menu. I tested on the question & hints editors successfully.

I think this is ready to go to QA

v-if="!isMobile"
v-if="!isTouchDevice"
Copy link
Member

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?

Copy link
Member Author

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 <= 3 condition 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.

@habibayman habibayman force-pushed the feat/RTE-touchscreens branch from 46c5880 to 6b399ae Compare September 2, 2025 13:11
@habibayman
Copy link
Member Author

habibayman commented Sep 2, 2025

I found a problem with the touchscreens formatting bar. Sometimes it did get positioned right over the keyboard and sometimes not. after some debugging I found out that the problem was the autoscroll behavior the browser does to keep the cursor visible.

fixed in fae6155

Please try the formatting bar in browserstack to see if it aligns correctly -- @nucleogenesis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[New Rich Text Editor]: Swap Editor UI on screen type not size
3 participants