Adding Screen Recording Feature to the RTL Experiment Study#4
Adding Screen Recording Feature to the RTL Experiment Study#4abdelrahman1234567 wants to merge 1 commit into
Conversation
Added screen recording functionality with both Arabic and English configurations.
|
A preview of is uploaded and can be seen here: ✨ https://revisit.dev/study/PR4 ✨ Changes may take a few minutes to propagate. |
There was a problem hiding this comment.
Pull request overview
Adds screen recording to the RTL experiment study and localizes the permission/rejection UI for English vs Arabic variants.
Changes:
- Enable screen recording in both
rtl-exp-enandrtl-exp-arstudy configs (including importing thescreen-recordinglibrary and inserting the permission component into the sequence). - Localize the screen-recording permission UI based on
studyId(Arabic vs English) and set RTL/LTR direction. - Localize the “screen recording stopped” rejection modal based on
studyId.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/store/hooks/useScreenRecording.ts | Extends permission-component detection to avoid false “rejected” state when using alternate permission component names. |
| src/public/libraries/screen-recording/assets/ScreenRecording.tsx | Adds Arabic/English UI strings and RTL/LTR direction handling for the permission screen. |
| src/components/interface/ScreenRecordingRejection.tsx | Adds Arabic/English copy and RTL/LTR direction for the rejection modal. |
| public/rtl-exp-en/config.json | Enables screen recording + imports screen-recording library + inserts permission component in the sequence. |
| public/rtl-exp-ar/config.json | Enables screen recording + imports screen-recording library + adds an Arabic-wrapped permission component and inserts it in the sequence. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const isPermissionComponent = currentComponent === '$screen-recording.co.screenRecordingPermission' | ||
| || currentComponent === '$screen-recording.components.screenRecordingPermission' | ||
| || currentComponent === 'screenRecordingPermissionAr'; | ||
|
|
||
| if (!isPermissionComponent && currentComponent !== 'end' && screenCaptureStarted && !isScreenCapturing) { |
There was a problem hiding this comment.
isPermissionComponent hard-codes the study-specific component key screenRecordingPermissionAr. Since any study can wrap $screen-recording.*.screenRecordingPermission in a derived component with an arbitrary name, this check won’t generalize and could cause false rejections. Consider detecting permission pages by resolving the current component config (via studyConfig.components[currentComponent] / getComponent) and treating it as a permission component when its resolved/base component is $screen-recording.*.screenRecordingPermission (or ends with .screenRecordingPermission).
|
|
||
| const AR_LABELS = { | ||
| title: 'تم إيقاف تسجيل الشاشة', | ||
| message: 'شكراً لمشاركتك في هذه الدراسة. تم إيقاف تسجيل الشاشة.لا يمكنك المتابعة.', |
There was a problem hiding this comment.
Arabic message string is missing a space after the period: تم إيقاف تسجيل الشاشة.لا يمكنك المتابعة. This reads like a typo in the UI; add a space (or appropriate punctuation) between the sentences.
| message: 'شكراً لمشاركتك في هذه الدراسة. تم إيقاف تسجيل الشاشة.لا يمكنك المتابعة.', | |
| message: 'شكراً لمشاركتك في هذه الدراسة. تم إيقاف تسجيل الشاشة. لا يمكنك المتابعة.', |
Added screen recording functionality with both Arabic and English configurations.