refactor: make the abstract a paragraph instead of a paper field
A template's abstract paragraph (`0 Abstract`) *is* the paper's abstract: it has a position in the document, the heading and typography the template gives it, and the same sentence-by-sentence editing as everything else. `paper.abstract` was a second home for that text — one the document never reads, so a paper could show two different abstracts and the column could drift from the body. The column is gone, from the table, the model, the schemas, the API payloads, the paper form, the list subtitle and the paper page. Nothing else changed. The text already written into it is not gone. Revision a83f5c21d7b6 writes each stored abstract into the paper's body first — one sentence per 。 at the paragraph carrying the abstract heading, appended after anything already there rather than replacing it. A template without such a heading keeps the text too, one position above its first paragraph, where the document renders it under 未设定. Verified against the one paper that had an abstract: 450 characters in, 450 out, identical including `|J| ≤ α · I⁻ᵝ`, split into six sentences in the `0 Abstract` paragraph, still with its own edit button. The smoke test no longer assumes an empty database: it records the paper total before it starts and compares against that, so it can run on a real one.
This commit is contained in:
+11
-2
@@ -72,8 +72,7 @@ template_field a field placed in a template — and the only
|
||||
field_id → template_field_library, sort
|
||||
|
||||
paper the document
|
||||
id, title, template_id, abstract, author, status, keywords,
|
||||
target_journal
|
||||
id, title, template_id, author, status, keywords, target_journal
|
||||
|
||||
paper_sentence one sentence, at one position, in one paper
|
||||
id, paper_id → paper, template_id, paper_template_filed_sort, sort, content
|
||||
@@ -82,6 +81,16 @@ paper_sentence_reference the citations of one sentence
|
||||
id, sentence_id → paper_sentence, reference_id, quote, sort
|
||||
```
|
||||
|
||||
`paper` has no `abstract` column, and that is a decision rather than an
|
||||
omission. A paper's abstract *is* a paragraph of its body — the template's
|
||||
`0 Abstract` field — so it has a position in the document, the heading and
|
||||
typography the template gives it, and the same sentence-by-sentence editing as
|
||||
every other paragraph. A column for it would be a second home for the same
|
||||
text, one the document never reads: a paper could show two different abstracts,
|
||||
and the one in the column could drift from the one in the body. Revision
|
||||
`a83f5c21d7b6` removed it, moving each stored abstract into the abstract
|
||||
paragraph first.
|
||||
|
||||
`template_field` and `template_field_library` are one word apart and mean
|
||||
opposite things. The first is a *placement* — this template puts this field
|
||||
here, `sort` included. The second is the *catalogue* the field was picked from,
|
||||
|
||||
Reference in New Issue
Block a user