広場投稿追加画面の刷新 (#399) #413
@@ -153,6 +153,9 @@ pass or the remaining failure is clearly blocked.
|
|||||||
- When new user-facing wording appears necessary, ask the user for the exact
|
- When new user-facing wording appears necessary, ask the user for the exact
|
||||||
wording and placement before implementing it.
|
wording and placement before implementing it.
|
||||||
- Do not invent replacement copy when removing unrequested wording.
|
- Do not invent replacement copy when removing unrequested wording.
|
||||||
|
- Do not use `タグなし` as user-facing copy for an empty tag state. When the
|
||||||
|
tag state is empty, show no copy. If actual data contains the tag name
|
||||||
|
`タグなし`, treat it as ordinary data and display it normally.
|
||||||
- When adding dynamic tag colour classes, update `tailwind.config.js` safelist
|
- When adding dynamic tag colour classes, update `tailwind.config.js` safelist
|
||||||
if the class cannot be statically detected.
|
if the class cannot be statically detected.
|
||||||
- Do not introduce new UI libraries or production dependencies without approval.
|
- Do not introduce new UI libraries or production dependencies without approval.
|
||||||
|
|||||||
@@ -86,9 +86,10 @@ const PostImportRowSummary: FC<Props> = (
|
|||||||
<div className="truncate text-xs text-neutral-600 dark:text-neutral-300">
|
<div className="truncate text-xs text-neutral-600 dark:text-neutral-300">
|
||||||
{row.url}
|
{row.url}
|
||||||
</div>
|
</div>
|
||||||
<div className="truncate text-xs text-neutral-500 dark:text-neutral-400">
|
{String (row.attributes.tags ?? '') && (
|
||||||
{String (row.attributes.tags ?? '') || 'タグなし'}
|
<div className="truncate text-xs text-neutral-500 dark:text-neutral-400">
|
||||||
</div>
|
{String (row.attributes.tags ?? '')}
|
||||||
|
</div>)}
|
||||||
<div className="text-xs text-neutral-500 dark:text-neutral-400">
|
<div className="text-xs text-neutral-500 dark:text-neutral-400">
|
||||||
{summaryDate (row)}
|
{summaryDate (row)}
|
||||||
</div>
|
</div>
|
||||||
@@ -143,9 +144,10 @@ const PostImportRowSummary: FC<Props> = (
|
|||||||
<div className="flex flex-wrap gap-2">
|
<div className="flex flex-wrap gap-2">
|
||||||
{displayStatus != null && <PostImportStatusBadge value={displayStatus}/>}
|
{displayStatus != null && <PostImportStatusBadge value={displayStatus}/>}
|
||||||
</div>
|
</div>
|
||||||
<div className="text-xs text-neutral-500 dark:text-neutral-400">
|
{String (row.attributes.tags ?? '') && (
|
||||||
{String (row.attributes.tags ?? '') || 'タグなし'}
|
<div className="text-xs text-neutral-500 dark:text-neutral-400">
|
||||||
</div>
|
{String (row.attributes.tags ?? '')}
|
||||||
|
</div>)}
|
||||||
<div className="text-xs text-neutral-500 dark:text-neutral-400">
|
<div className="text-xs text-neutral-500 dark:text-neutral-400">
|
||||||
{summaryDate (row)}
|
{summaryDate (row)}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -482,7 +482,7 @@ const MaterialListPage: FC = () => {
|
|||||||
className={inputClass (invalid)}>
|
className={inputClass (invalid)}>
|
||||||
<option value="all">すべて</option>
|
<option value="all">すべて</option>
|
||||||
<option value="tagged">タグあり</option>
|
<option value="tagged">タグあり</option>
|
||||||
<option value="untagged">タグなし</option>
|
<option value="untagged"></option>
|
||||||
</select>)}
|
</select>)}
|
||||||
</FormField>
|
</FormField>
|
||||||
|
|
||||||
|
|||||||
@@ -814,7 +814,8 @@ const PostImportReviewPage: FC<Props> = ({ user }) => {
|
|||||||
importErrors: undefined })
|
importErrors: undefined })
|
||||||
})
|
})
|
||||||
const persisted = await persistSession (buildSession (nextRows))
|
const persisted = await persistSession (buildSession (nextRows))
|
||||||
if (persisted != null && processableImportRows (persisted.rows).length === 0)
|
if (persisted != null
|
||||||
|
&& persisted.rows.every (row => isCompletedReviewRow (row)))
|
||||||
finishImport ()
|
finishImport ()
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
@@ -845,10 +846,7 @@ const PostImportReviewPage: FC<Props> = ({ user }) => {
|
|||||||
{
|
{
|
||||||
const processingRows = processableImportRows (currentSession.rows)
|
const processingRows = processableImportRows (currentSession.rows)
|
||||||
if (processingRows.length === 0)
|
if (processingRows.length === 0)
|
||||||
{
|
return
|
||||||
finishImport ()
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
const result = await apiPost<{ results: BulkApiRow[] }>(
|
const result = await apiPost<{ results: BulkApiRow[] }>(
|
||||||
'/posts/bulk',
|
'/posts/bulk',
|
||||||
@@ -879,7 +877,8 @@ const PostImportReviewPage: FC<Props> = ({ user }) => {
|
|||||||
importErrors: undefined })
|
importErrors: undefined })
|
||||||
})
|
})
|
||||||
const persisted = await persistSession (buildSession (nextRows))
|
const persisted = await persistSession (buildSession (nextRows))
|
||||||
if (persisted != null && processableImportRows (persisted.rows).length === 0)
|
if (persisted != null
|
||||||
|
&& persisted.rows.every (row => isCompletedReviewRow (row)))
|
||||||
finishImport ()
|
finishImport ()
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
@@ -1013,7 +1012,7 @@ const PostImportFooter = (
|
|||||||
<Button
|
<Button
|
||||||
type="button"
|
type="button"
|
||||||
onClick={onSubmit}
|
onClick={onSubmit}
|
||||||
disabled={loading || creatableCount === 0}>
|
disabled={loading}>
|
||||||
{creatableCount > 1 ? '一括追加' : '追加'}
|
{creatableCount > 1 ? '一括追加' : '追加'}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
新しい課題から参照
ユーザをブロックする