Implement RTL support
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 30/100
- issue の種類
- 機能追加
- 明瞭さ
- 説明が足りない
- 活発さ
- 活発
- 技術スタック
- typescript
調査の方向性
まず、既存の document.documentElement.dir の読み取り、SegmentView の strip の順序、token chips、gloss inputs、baseline-text のレンダリングを確認します。最初に方向がグローバルなのか、側ごと/token ごとなのかを明らかにし、その後、これらの領域全体で影響を受ける RTL と bidi の挙動を追跡します。Hebrew または Arabic のデータで、RTL レイアウト、混在方向のコンテンツ、CSS の配置、円弧のジオメトリ、coverage tests が機能すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Here is Claude's analysis of what needs to be done:
RTL Support — Scope Assessment
A scoping write-up for adding right-to-left (RTL) language support to the interlinearizer
extension. This is exploratory — it estimates the work, it doesn't commit to a timeline.
TL;DR: Medium-sized effort, not a rewrite. The architecture is mostly RTL-favorable already
(coordinate-based arc geometry, scrollIntoView-based scrolling, some logical CSS in place). The
single biggest decision — and the thing most likely to expand scope — is whether text direction is
one global flag or threaded per writing-system (source can be RTL while glosses are LTR).
Settle that first; everything else follows.
Current state
- The app tracks a
writingSystem(BCP 47 tag) on every token, plumbed through from the project
setting into the tokenizer and onto eachToken. - It reads
document.documentElement.dir === 'rtl'in exactly one place (to flip the
prev/next navigation arrows)… - …but it never writes
diranywhere. So in practice RTL text is currently laid out as LTR.
The team has clearly started thinking about RTL (logical CSS properties in the fade overlays, the
arrow flip, arc geometry that measures real pixel positions), but the foundation — actually
establishing direction — isn't wired up yet.
Work, by area
1. Establish direction — small code / design-heavy — DO FIRST
The keystone everything depends on. Today documentElement.dir is read but never set.
- Add an
isRtlLanguageTag(tag)util that derives direction from the BCP 47writingSystem
(script-subtag lookup, orIntl.Locale().textInfo.directionwhere available). - Apply
dirto the DOM. Complication: source and target can have different directions
(RTL Hebrew source, LTR English gloss). A singledocumentElement.diris too coarse — this
likely wantsdirset per-strip / per-token based on each side's writing system, not one
global flag. - This design decision (global vs. per-side) is the real work and ripples into every area
below.
2. Token strip ordering — medium — highest visual risk
Both views render the token strip as a plain flex row in document order. Flexbox will reverse
visually under an RTL ancestor — but only once dir="rtl" is actually set (see #1). After that:
- Verify SegmentView's multi-row wrapping lays out right-to-left, top-to-bottom correctly.
- Audit the doc-order ↔ visual-order assumptions in the code/comments. The sorting logic is fine
(it sorts by document index, correct either way), but several comments literally say "visual
left-to-right order" and need to be re-checked so nothing actually depends on doc-order ==
left-to-right.
3. Arc geometry — small — mostly works already, needs verification
The arc path computation measures real getBoundingClientRect() values and normalizes spans with
Math.min/max, so arcs connect boxes wherever they land — this should survive RTL "for free."
Verify rather than rewrite:
- The gutter-side ("nearer left") choice is geometric, so fine — confirm the reserved left/right
gutter padding lands on the correct visual side once boxes flip. - Split-button positioning and de-confliction are pixel-based; should be fine but untested under RTL.
4. Physical → logical CSS — small, mechanical
A handful of physical left/right styles remain and should become logical (start/end):
- Token chip remove-badge
-right-1.5→-end-1.5. - Baseline-text segment
text-left→text-start. - The view-options dropdown anchors with physical
right+window.innerWidth - rect.right—
needs RTL-aware positioning. - A few modals use
text-left/mr-1. - Centered elements using
left-1/2 -translate-x-1/2are direction-neutral — no change needed.
5. Bidi correctness in mixed content — medium — easy to under-scope
The subtle one QA will catch late if ignored:
- Token chips carry no
dir/langdespite each token having awritingSystem. RTL baseline with
LTR glosses (or numerals/punctuation) will mis-order without per-element hints. Settingdir+
langper token fromwritingSystemis the clean fix. - Gloss input fields need their own direction matching the analysis language, independent of the
baseline. - The verse-label + baseline concatenation in baseline-text mode needs bidi isolation so a numeric
label doesn't reorder against RTL text.
Rough sizing
| Area | Size | Risk |
|---|---|---|
| 1. Establish direction (incl. global-vs-per-side decision) | S code / design-heavy | Foundational |
| 2. Strip ordering | M | High visual risk |
| 3. Arc geometry | S (verify + test) | Low |
| 4. Physical → logical CSS | S | Low |
| 5. Bidi / mixed-content correctness | M | Easy to under-scope |
Overall: on the order of a week-ish of focused work plus QA with real Hebrew/Arabic data,
assuming the per-side direction question in #1 is settled early. Note the test suite enforces 100%
coverage, so every component touched needs RTL test cases added.
Recommended first step
Decide #1: global vs. per-side direction. That single call determines whether dir is one flag
or threaded per writing-system through tokens, glosses, and strips — and therefore the true size of
everything else.
- 主要言語
- TypeScript
- スター
- 2
- フォーク
- 0
- 平均マージ
- 2日 5時間
- マージ済み PR(30日)
- 46
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
sillsdev/interlinearizer-extension のほかの issue
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
sillsdev/interlinearizer-extension#388 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
sillsdev/interlinearizer-extension#383 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 65/100
sillsdev/interlinearizer-extension#382 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 54/100
sillsdev/interlinearizer-extension#379 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
sillsdev/interlinearizer-extension#369 ·
メンテナーはふだん 1 日以内に返信
sillsdev/interlinearizer-extension の issue をすべて見る
似ている issue
-
bug priority:low ready-for-dev
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
Automattic/data-liberation-agent#685 ·
メンテナーはふだん 1 日以内に返信
-
Business
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
txn2/mcp-data-platform#2063 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 1/5 1時間未満 初心者へのやさしさ 77/100
Crosstalk-Solutions/project-nomad#1427 ·
メンテナーはふだん 2 日以内に返信