Skip to content

Add Arabic and English RTL experiment study configs, assets, and UI t…#1

Open
abdelrahman1234567 wants to merge 2 commits intomainfrom
rtl-exp-study
Open

Add Arabic and English RTL experiment study configs, assets, and UI t…#1
abdelrahman1234567 wants to merge 2 commits intomainfrom
rtl-exp-study

Conversation

@abdelrahman1234567
Copy link
Copy Markdown
Collaborator

Replicating the demo version but with one block of questions for barcharts and another block for line charts. For each new user opening the study, the block of questions coming first, before the break, is random.

Concretely the flow that a participant sees would be:
Consent form --> then either the block for Barcharts or block for Linechart, --> Last page

Each block will start with an introduction page w/ the instructions --> then the trial questions.
There should be a break page between Block1 and Block2

@abdelrahman1234567 abdelrahman1234567 self-assigned this Apr 3, 2026
Copilot AI review requested due to automatic review settings April 3, 2026 14:25
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

This PR adds new RTL experiment study materials (English + Arabic) including trial templates and instruction/break/outro content, plus a small UI localization tweak so the study browser sidebar can display Arabic labels when running the Arabic study config.

Changes:

  • Added English and Arabic trial HTML templates (numeric + dropdown) that hide the chart after a fixed time and post answers via reVISit iframe messaging.
  • Added study content assets (instruction markdown, break/outro pages) and a set of bar-chart stimulus SVGs for both languages.
  • Updated the app’s Study Browser sidebar to render Arabic labels when studyId === 'rtl-exp-ar'.

Reviewed changes

Copilot reviewed 15 out of 79 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/components/interface/AppAside.tsx Adds Arabic label mapping for the Study Browser sidebar when running the Arabic study.
public/rtl-exp-en/assets/trial-numerical.html English numeric-input trial template with timed stimulus hiding and reactive answer posting.
public/rtl-exp-en/assets/trial-dropdown.html English dropdown trial template with timed stimulus hiding and reactive answer posting.
public/rtl-exp-en/assets/outro.md English completion/thank-you page content.
public/rtl-exp-en/assets/line/intro-line.md English line-chart block instruction page content.
public/rtl-exp-en/assets/line/intro-line-ex.svg English line-chart example illustration asset.
public/rtl-exp-en/assets/break.md English inter-block break page content.
public/rtl-exp-en/assets/bar/intro-bar.md English bar-chart block instruction page content.
public/rtl-exp-en/assets/bar/intro-bar-ex.svg English bar-chart example illustration asset.
public/rtl-exp-en/assets/bar/img-trials/intro-radial.svg English bar block: intro icon/illustration asset.
public/rtl-exp-en/assets/bar/img-trials/intro-line.svg English bar block: intro icon/illustration asset.
public/rtl-exp-en/assets/bar/img-trials/intro-bar.svg English bar block: intro icon/illustration asset.
public/rtl-exp-en/assets/bar/img-trials/bar-8-u.svg English bar block: trial stimulus SVG asset.
public/rtl-exp-en/assets/bar/img-trials/bar-7-u.svg English bar block: trial stimulus SVG asset.
public/rtl-exp-en/assets/bar/img-trials/bar-7-sts.svg English bar block: trial stimulus SVG asset.
public/rtl-exp-en/assets/bar/img-trials/bar-7-sst.svg English bar block: trial stimulus SVG asset.
public/rtl-exp-en/assets/bar/img-trials/bar-6-u.svg English bar block: trial stimulus SVG asset.
public/rtl-exp-en/assets/bar/img-trials/bar-5-u-2.svg English bar block: trial stimulus SVG asset.
public/rtl-exp-en/assets/bar/img-trials/bar-5-u-1.svg English bar block: trial stimulus SVG asset.
public/rtl-exp-en/assets/bar/img-trials/bar-4-sts.svg English bar block: trial stimulus SVG asset.
public/rtl-exp-en/assets/bar/img-trials/bar-4-sst.svg English bar block: trial stimulus SVG asset.
public/rtl-exp-en/assets/bar/img-trials/bar-3-u.svg English bar block: trial stimulus SVG asset.
public/rtl-exp-en/assets/bar/img-trials/bar-2-sts.svg English bar block: trial stimulus SVG asset.
public/rtl-exp-en/assets/bar/img-trials/bar-2-sst.svg English bar block: trial stimulus SVG asset.
public/rtl-exp-en/assets/bar/img-trials/bar-1-u.svg English bar block: trial stimulus SVG asset.
public/rtl-exp-ar/assets/trial-numerical.html Arabic numeric-input trial template with RTL styling and reactive answer posting.
public/rtl-exp-ar/assets/trial-dropdown.html Arabic dropdown trial template with RTL styling and reactive answer posting.
public/rtl-exp-ar/assets/outro.md Arabic completion/thank-you page content (RTL wrapper).
public/rtl-exp-ar/assets/line/intro-line.md Arabic line-chart block instruction page content (RTL wrapper).
public/rtl-exp-ar/assets/break.md Arabic inter-block break page content (RTL wrapper).
public/rtl-exp-ar/assets/bar/intro-bar.md Arabic bar-chart block instruction page content (RTL wrapper).
public/rtl-exp-ar/assets/bar/img-trials/bar-7-u.svg Arabic bar block: trial stimulus SVG asset.
public/rtl-exp-ar/assets/bar/img-trials/bar-7-sts.svg Arabic bar block: trial stimulus SVG asset.
public/rtl-exp-ar/assets/bar/img-trials/bar-7-sst.svg Arabic bar block: trial stimulus SVG asset.
public/rtl-exp-ar/assets/bar/img-trials/bar-6-u.svg Arabic bar block: trial stimulus SVG asset.
public/rtl-exp-ar/assets/bar/img-trials/bar-5-u-2.svg Arabic bar block: trial stimulus SVG asset.
public/rtl-exp-ar/assets/bar/img-trials/bar-5-u-1.svg Arabic bar block: trial stimulus SVG asset.
public/rtl-exp-ar/assets/bar/img-trials/bar-4-sts.svg Arabic bar block: trial stimulus SVG asset.
public/rtl-exp-ar/assets/bar/img-trials/bar-4-sst.svg Arabic bar block: trial stimulus SVG asset.
public/rtl-exp-ar/assets/bar/img-trials/bar-3-u.svg Arabic bar block: trial stimulus SVG asset.
public/rtl-exp-ar/assets/bar/img-trials/bar-2-sts.svg Arabic bar block: trial stimulus SVG asset.
public/rtl-exp-ar/assets/bar/img-trials/bar-2-sst.svg Arabic bar block: trial stimulus SVG asset.
public/rtl-exp-ar/assets/bar/img-trials/bar-1-u.svg Arabic bar block: trial stimulus SVG asset.
Comments suppressed due to low confidence (1)

src/components/interface/AppAside.tsx:140

  • The UI strings are translated for Arabic, but the aria-label for this settings icon remains English ("Edit Study Modes"). For accessibility/screen readers, please localize aria-label (and any other ARIA text) using the same L mapping when isArabic is true.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +124 to +126
let responseId = 'trial-ans';
let currentValue = null;

Copy link

Copilot AI Apr 3, 2026

Choose a reason for hiding this comment

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

currentValue is declared but never read. Please remove it to avoid dead code and keep the trial template minimal.

Copilot uses AI. Check for mistakes.
Comment on lines +129 to +131
let responseId = 'trial-ans';
let currentValue = null;

Copy link

Copilot AI Apr 3, 2026

Choose a reason for hiding this comment

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

currentValue is declared but never read. Please remove it to avoid dead code and keep the trial template minimal.

Copilot uses AI. Check for mistakes.
Comment on lines +146 to +152
function postCurrentAnswer() {
const val = document.getElementById('dropdown-select').value;
if (val === '') return; // don't post placeholder selection
const answers = {};
answers[responseId] = val;
Revisit.postAnswers(answers);
}
Copy link

Copilot AI Apr 3, 2026

Choose a reason for hiding this comment

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

When the user re-selects the placeholder (empty value), postCurrentAnswer returns early and the previously posted answer remains set. Consider posting null/empty for responseId on empty selection so answers can be cleared reliably.

Copilot uses AI. Check for mistakes.
Comment on lines +151 to +157
function postCurrentAnswer() {
const val = document.getElementById('dropdown-select').value;
if (val === '') return;
const answers = {};
answers[responseId] = val;
Revisit.postAnswers(answers);
}
Copy link

Copilot AI Apr 3, 2026

Choose a reason for hiding this comment

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

When the user re-selects the placeholder (empty value), postCurrentAnswer returns early and the previously posted answer remains set. Consider posting null/empty for responseId on empty selection so answers can be cleared reliably.

Copilot uses AI. Check for mistakes.
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 3, 2026

A preview of 2e12981 is uploaded and can be seen here:

https://revisit.dev/study/PR1

Changes may take a few minutes to propagate.

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