generated from john/python-template
Tweak empty page settings to make them more uniform.
This commit is contained in:
@@ -42,7 +42,7 @@ def render_documents_table(rows: Sequence[DocumentTableRow]) -> None:
|
||||
"""Render documents table with search filtering and custom type chips."""
|
||||
if not rows:
|
||||
with archival_card(extra_classes="p-8 text-center"):
|
||||
render_empty_state("No documents in repository yet.")
|
||||
render_empty_state("No documents found in repository.")
|
||||
return
|
||||
|
||||
table = build_table(
|
||||
|
||||
@@ -57,7 +57,7 @@ def render_jobs_table(rows: Sequence[JobTableRow]) -> None:
|
||||
"""Render jobs table with search filtering and custom status chips."""
|
||||
if not rows:
|
||||
with archival_card(extra_classes="p-8 text-center"):
|
||||
render_empty_state("No active or historical processing jobs found.")
|
||||
render_empty_state("No job records found in repository.")
|
||||
return
|
||||
|
||||
table = build_table(
|
||||
|
||||
@@ -48,7 +48,7 @@ def render_sources_table(rows: Sequence[SourceTableRow]) -> None:
|
||||
"""Render sources table and open detail page when clicking a row."""
|
||||
if not rows:
|
||||
with archival_card(extra_classes="p-8 text-center"):
|
||||
render_empty_state("No source file records found.")
|
||||
render_empty_state("No source file records found in repository.")
|
||||
return
|
||||
|
||||
table = build_table(
|
||||
|
||||
@@ -13,6 +13,7 @@ from transcription.ui.components.app_shell import render_navigation_header
|
||||
from transcription.ui.components.cards import archival_card
|
||||
from transcription.ui.components.error_presenter import show_error
|
||||
from transcription.ui.components.primitives import section_header_row
|
||||
from transcription.ui.components.primitives import render_empty_state
|
||||
from transcription.ui.theme import page_header
|
||||
|
||||
from ...db.session import SessionFactoryDep
|
||||
@@ -56,12 +57,11 @@ async def sources_page(
|
||||
|
||||
with ui.column().classes("w-full max-w-7xl mx-auto p-6 gap-6"):
|
||||
with section_header_row():
|
||||
page_header(header_title, subtitle="Manage digitized source pages, raw OCR transcripts, and human revisions.")
|
||||
page_header(header_title)
|
||||
|
||||
if not sources:
|
||||
with archival_card(title="No Source Assets Found"):
|
||||
ui.label("No source images or pages match the current filter criteria.").classes("text-sm ui-text-muted mb-4")
|
||||
ui.button("Upload New Documents", on_click=lambda: ui.navigate.to("/jobs/new")).classes("ui-btn-primary")
|
||||
with archival_card(extra_classes="p-8 text-center"):
|
||||
render_empty_state("No source file records found in repository.")
|
||||
return
|
||||
|
||||
columns = [
|
||||
|
||||
@@ -69,6 +69,8 @@ class TestSourcesPageRendering:
|
||||
assert response.status_code == 200
|
||||
assert "Source Asset Records" in response.text
|
||||
assert "No Source Assets Found".upper() in response.text.upper()
|
||||
assert "No source asset records found in repository." in response.text
|
||||
assert "Upload New Documents" not in response.text
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_sources_page_lists_seeded_sources(self, app_client):
|
||||
|
||||
Reference in New Issue
Block a user