Show coordinates labels all 64 squares instead of the board edges
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 78/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- css, javascript
- 領域
- frontend
調査の方向性
座標のルールは css/board.css の14〜104行目あたりにあり、.square::before が data-col から筋の文字を、.square::after が data-row から段の数字を、すべてのマスに対して設定しています。js/board.js を読んで、マスと .chess-board.flipped クラスがどのように作られるかを確認し、ラベルを端のマスだけに限定して、.chess-board.flipped の下では端を反転させてください。座標が有効なときに筋の文字8個と段の数字8個が表示され、Flip board に追従し、最後の手のマスと手の候補点のマスでも表示され続ければ完了です。関連するテストファイルは tests/unit/settings.test.js で、npm test で実行します。
索引モデルが issue の本文から書いたものです。
説明
Summary
With "Show coordinates" on, every one of the 64 squares gets both a file letter and a rank number. The board fills with 126 small labels, where chess boards normally label only the bottom rank and one side file.
Where
css/board.css:14-104(the.square::beforeand.square::aftercoordinate rules)
Details
The file letter is set by data-col and the rank number by data-row for all squares:
.square[data-col='0']::before {
content: 'a';
}
/* ... */
.square[data-row='7']::after {
content: '1';
}
The comment at line 98, "Hide file coordinate on a1 and rank coordinate on h8 for less clutter", suggests the labels were meant for the edges only, but no rule limits them to the edge squares.
Two side effects of using the squares' pseudo-elements for this:
- The last-move tint uses
::before, so the file letter is not shown on the two squares of the last move. - The move dot uses
::after, so the rank number is not shown on squares a selected piece can move to.
Impact
Players who turn coordinates on, which is most useful to beginners and to anyone following along with notation. The labels are hard to scan and partly disappear during play.
Suggested fix
Show file letters only on the rank nearest the player and rank numbers only on one side file, following the board when it is flipped. For example, restrict the rules to .square[data-row='7']::before and .square[data-col='0']::after (and the opposite edges under .chess-board.flipped). Since those edge squares still share pseudo-elements with the last-move tint and the move dot, consider drawing coordinates in their own elements, or outside the board edge, so they never get replaced.
Acceptance criteria
- With coordinates on, 8 file letters and 8 rank numbers are shown, on the edges nearest the player
- They follow the board when "Flip board" is on
- They stay visible on last-move squares and on squares showing a move dot
Getting started
- Relevant files:
css/board.css,js/board.js(how squares and the flipped class are created),tests/unit/settings.test.js - How to run tests:
npm test
Filed by repo-audit/ui-rework at 0144de7. Severity: low. Effort: S. audit-key: enhancement|css/board.css|show-coords
- 主要言語
- JavaScript
- スター
- 4
- フォーク
- 2
- 平均マージ
- 4時間 8分
- マージ済み PR(30日)
- 1
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
TMHSDigital/Static_Chess のほかの issue
-
documentation good first issue severity: low
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
TMHSDigital/Static_Chess#79 ·
-
enhancement good first issue severity: low
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
TMHSDigital/Static_Chess#77 ·
-
enhancement good first issue severity: low
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
TMHSDigital/Static_Chess#76 ·
-
enhancement good first issue severity: low
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
TMHSDigital/Static_Chess#75 ·
-
documentation good first issue severity: low
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
TMHSDigital/Static_Chess#49 ·
TMHSDigital/Static_Chess の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 1 日以内に返信
-
discovery:other factory-active task-identify-harness-labels-done task-identify-issue-type-done
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
needs-triage typo
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
llm-d-incubation/llm-d-scaling-manager#122 ·
メンテナーはふだん 1 日以内に返信
-
create-strapi-app doesn't await writing license.txt, so a failed write skips its error handlingオープンflag: invalid template issue: bug severity: low source: cli status: pending reproduction version: 5
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
strapi/strapi#28637 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信