Schema editor: a comment line before a continued directive keeps the table as text
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 62/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- graphql, typescript
- 領域
- frontend
調査の方向性
Start in parseFields in src/features/instance/applications/lib/schema/parseSchema.ts, where a comment line between a field's type and its continued directive ends the field. Then check generateTable in serializeSchema.ts, which must emit the captured comment above the directive block. The regression test "a comment between a field and its continued directive" in serializeSchema.test.ts currently locks in the text fallback and will need updating. Done when the example table parses visually, the comment survives an edit and round-trip, and the test passes.
索引モデルが issue の本文から書いたものです。
説明
Problem
The visual schema editor can't edit a table when a # comment line sits between a field and the directive continued on the lines below it:
type Product @table(audit: true) {
id: ID @primaryKey
title: String
catalogSearch: FullText
# searches the title
@fullText(fields: [{ name: "title" }])
}
The parser reads directives continued onto following lines (the layout Harper's docs use for @fullText), but a comment line in that gap ends the field. The table then stays raw text: nothing is lost, and "Edit as text" still works, but the visual editor doesn't offer it.
Why it was left
Carrying the comment through a regeneration needs a place in the field model for comments between a field's type and its continued directives. Without one, parsing past the comment would drop it on the next edit. Keeping the table as text is the safe behavior, and a regression test records it (serializeSchema.test.ts, "a comment between a field and its continued directive").
What would fix it
Capture comment lines between a field's type and its continued directives in parseFields (src/features/instance/applications/lib/schema/parseSchema.ts), and emit them above the directive block in generateTable (serializeSchema.ts).
Found in the pre-push review of the full-text work for #2014.
Review-Deferral: 5dc0829d5b20df5d severity=nit category=correctness
- 主要言語
- TypeScript
- スター
- 5
- フォーク
- 4
- 平均マージ
- 2日 13時間
- マージ済み PR(30日)
- 60
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
HarperFast/studio のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
HarperFast/studio#2111 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
HarperFast/studio#2109 ·
メンテナーはふだん 1 日以内に返信
-
rum
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
HarperFast/studio#2085 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
HarperFast/studio#2070 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
HarperFast/studio#2067 ·
メンテナーはふだん 1 日以内に返信
HarperFast/studio の issue をすべて見る
似ている issue
-
bot:ai-assisted component:platform-js status:untriaged
難易度 1/5 1時間未満 初心者へのやさしさ 74/100
midnightntwrk/platform-js#38 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
ranxianglei/billion-context#7068 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
mybigday/whisper.rn#348 ·
-
enhancement severity:low
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
Battle-Cattle/BCUK-Bot-4#1075 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
ilan-pinto/roaring-lions#1552 ·
メンテナーはふだん 1 日以内に返信