Skip to content

Adding Screen Recording Feature to the RTL Experiment Study#4

Open
abdelrahman1234567 wants to merge 1 commit into
mainfrom
vid-rec
Open

Adding Screen Recording Feature to the RTL Experiment Study#4
abdelrahman1234567 wants to merge 1 commit into
mainfrom
vid-rec

Conversation

@abdelrahman1234567
Copy link
Copy Markdown
Collaborator

Added screen recording functionality with both Arabic and English configurations.

Added screen recording functionality with both Arabic and English configurations.
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 23, 2026

A preview of is uploaded and can be seen here:

https://revisit.dev/study/PR4

Changes may take a few minutes to propagate.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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-en and rtl-exp-ar study configs (including importing the screen-recording library 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.

Comment on lines +181 to +185
const isPermissionComponent = currentComponent === '$screen-recording.co.screenRecordingPermission'
|| currentComponent === '$screen-recording.components.screenRecordingPermission'
|| currentComponent === 'screenRecordingPermissionAr';

if (!isPermissionComponent && currentComponent !== 'end' && screenCaptureStarted && !isScreenCapturing) {
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

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

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).

Copilot uses AI. Check for mistakes.

const AR_LABELS = {
title: 'تم إيقاف تسجيل الشاشة',
message: 'شكراً لمشاركتك في هذه الدراسة. تم إيقاف تسجيل الشاشة.لا يمكنك المتابعة.',
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
message: 'شكراً لمشاركتك في هذه الدراسة. تم إيقاف تسجيل الشاشة.لا يمكنك المتابعة.',
message: 'شكراً لمشاركتك في هذه الدراسة. تم إيقاف تسجيل الشاشة. لا يمكنك المتابعة.',

Copilot uses AI. Check for mistakes.
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.

2 participants