Wrap Text 2/2: 列ごとの折り返し、保存、リボン
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 43/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- java
- Domain
- desktop, full-stack, testing
Research direction
Read the referenced #1286 and #1283 issues first, then inspect SpreadSheetFieldArray.java, MpoSidecarJson, SpreadSheetRenderer, the ribbon command catalog, and the listed tests. Implement per-column wrapping, sidecar persistence, visible-row height recalculation, ribbon and dialog controls, and the specified tests; follow the issue’s Gradle commands and GUI quality gate. Done means all five tabs toggle wrapping, settings survive MPO round trips, row heights align with Gantt bars, and the required checks pass.
Written by the indexing model from the issue text.
Description
概要
#1286 の行ごとの高さを使って、列ごとの「文字列の折り返し」(Wrap Text) を作る。折り返しが on の列では、セルの文字を列幅で折り返して表示し、行の高さをその行で一番高いセルに合わせる。
前提: #1286 と #1283 がマージ済み(#1283 でセルの書式の当て方が変わるため、その後に行う)。親 issue: #1180。行番号は master 442494033 時点。
根拠にする Microsoft の公開文書: support.microsoft.com の「Wrap text in a column」相当の記事。URL は PR に書く。
作業手順
- 列の設定:
SpreadSheetFieldArray(modules/microproject_core/.../graphic/configuration/SpreadSheetFieldArray.java)のheaderWraps(:59、コピー :76、整列 :157、挿入 :175、削除 :186、移動 :195、取得 :445)と全く同じ作りでcellWrapsを足す。transientで POD には含めない。既定は false。 - 保存:
MpoSidecarJsonのheaderWrapsと同じ書き方でcellWrapsを書く・読む。値が無い既存ファイルは全列 false。 - 描画:折り返しが on の列のセルは、複数行で描く(
SpreadSheetRenderer)。行の高さは、その行の折り返し列のうち最も行数が多いセルに合わせ、#1286 のRowHeightsに設定する。列幅、フォント、列の折り返し設定が変わったら高さを計算し直す。計算は表示中の行だけにし、10,000 行で列幅を変えても固まらないようにする。 - 操作:リボンの「文字列の折り返し」ボタンは、選んでいる列の
cellWrapsを切り替える(トグル)。列が選ばれていないときは、カーソルのある列を対象にする。列の設定の変更は、既存の列の変更(列幅など)と同じく Undo の対象かどうかを既存の扱いに合わせ、PR に書く。「フィールドの設定」ダイアログにもチェック ボックスを足す。 - リボン:対象は Gantt Chart、Task Sheet、Task Usage、Resource Sheet、Resource Usage の書式タブ。
- リボンの台帳
modules/microproject_ui/src/test/java/com/microproject/ui/ribbon/MspRibbonOrderDiffTest.javaのMISSING_CONTROLSから、この issue で実装したエントリだけを削除する。理由の定数がどこからも参照されなくなったら定数も削除する。 - ボタンの文言は
modules/microproject_ui/src/main/resources/com/microproject/menu/menu.properties(英語)とmenu_ja.properties(日本語)の両方に足す。 - コマンドは
RibbonCommandCatalogに登録し、RibbonButtonBehaviorTestの表に 1 行足す。
- テスト:
SpreadSheetFieldArrayの挿入・削除・移動でcellWrapsが列に付いて動くテスト、MPO 往復テスト、長い名前の行が 2 行分の高さになり Gantt のバーの位置が合うテスト、GUI acceptance に Task Sheet で名前の列を折り返すジャーニーを 1 件(@GuiJourney)。
検証
.\gradlew.bat :microproject_core:test --tests "*SpreadSheetFieldArray*" --console=plain
.\gradlew.bat :microproject_exchange:test --tests "*MpoFileImporterTest*" --console=plain
.\gradlew.bat :microproject_ui:test --tests "*MspRibbonOrderDiffTest*" --tests "*RibbonButtonBehaviorTest*" --tests "*WrapText*" --console=plain
.\gradlew.bat :microproject_ui:guiTest --tests "*WrapText*" --console=plain
python scripts/test_source_inventory.py --check --output build/audit/test-source-inventory.json
git diff --check
画面の確認は docs/gui-quality-gate.md に従い、日本語と英語の両方で行う。
完了条件
- 5 つの書式タブに「文字列の折り返し」があり、選んだ列の折り返しを切り替える
- 折り返しの列で長い文字列の行が高くなり、Gantt のバーがその行に合う(テストあり)
- 列の挿入・削除・移動で折り返しの設定が列に付いて動く(テストあり)
- MPO で保存して開き直すと設定が残り、設定の無い既存ファイルは全列 false(テストあり)
- POD の読み書きに変更が無い
-
MISSING_CONTROLSから*/WrapTextの 5 エントリとWRAP_TEXT定数が消え、MspRibbonOrderDiffTestが通る - 必須チェック
buildとGUI acceptanceが成功する
範囲外
- 行ごとの高さの仕組み(#1286)
- MSPDI / MPP への列の折り返しの保存
- 行の高さの手動変更
- Dominant language
- Java
- Stars
- 2
- Forks
- 1
- Avg merge
- 4h 52m
- Merged PRs (30d)
- 349
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from tetsuji16/microProject
-
area: ui priority: medium
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
tetsuji16/microProject#1721 ·
Maintainers usually reply within 1 day
-
area: ui enhancement priority: low status: ready
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
tetsuji16/microProject#1386 · 3 comments ·
Maintainers usually reply within 1 day
-
area: ui enhancement priority: low status: ready
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
tetsuji16/microProject#1384 ·
Maintainers usually reply within 1 day
-
area: ui enhancement priority: low status: ready
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
tetsuji16/microProject#1385 ·
Maintainers usually reply within 1 day
-
area: ui enhancement priority: low status: ready
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
tetsuji16/microProject#1383 · 1 comment ·
Maintainers usually reply within 1 day
All issues in tetsuji16/microProject
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 2 days
-
The engine's "loaded, but had errors" message leaves out which library and line each error is inOpen
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
cqframework/clinical_quality_language#1980 ·
Maintainers usually reply within 3 days
-
[Bug] "Configure Colota" opens Colota with "Invalid configuration: No configuration data in URL"Open
Difficulty 1/5 1-3 hours Newbie friendliness 87/100
dedicatedcode/reitti#1445 ·
Maintainers usually reply within 1 day
-
backlog kind/bug
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
TencentBlueKing/bk-job#4642 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
hapifhir/hapi-fhir-jpaserver-starter#1024 ·
Maintainers usually reply within 1 day