feat: enhance table layout and interaction across various components
Deploy production / deploy (push) Successful in 53s

- Introduced a new `WorkspaceTable` component for consistent table styling and behavior.
- Updated `BacktestPage`, `DatasetPage`, and `DataPreparationPage` to utilize the new `WorkspaceTable`.
- Implemented compact row heights and ellipsis for long text in table cells.
- Added validation for online field queries to ensure at least one filter is provided.
- Enhanced error handling and user feedback for invalid input scenarios.
- Improved pagination controls with dynamic page size options.
- Documented table display specifications in `ui-tables.md`.
- Added tests to verify table layout, interaction, and error handling.
This commit is contained in:
yuxuanhui
2026-09-12 02:13:48 +08:00
parent d9fbaa7cf7
commit b9975e58e9
19 changed files with 586 additions and 81 deletions
+14 -3
View File
@@ -88,12 +88,13 @@ async def test_scope_dimensions_rejected_without_creating_collection(catalog, ke
async def test_online_fields_without_sync_and_local_search_before_pagination(catalog):
client, _, _ = catalog
response = await client.get("/api/v1/catalog/worldquant/fields", params={**SCOPE, "limit": 100})
params = {**SCOPE, "dataset_id": "TEST_FIN", "limit": 100}
response = await client.get("/api/v1/catalog/worldquant/fields", params=params)
assert response.status_code == 200, response.text
first = response.json()
assert len(first["items"]) == 100 and first["has_more"]
second = (
await client.get("/api/v1/catalog/worldquant/fields", params={**SCOPE, "limit": 100, "offset": 100})
await client.get("/api/v1/catalog/worldquant/fields", params={**params, "offset": 100})
).json()
assert len(second["items"]) > 0
assert (await client.get("/api/v1/catalog/fields", params=SCOPE)).json()["total"] == 0
@@ -298,7 +299,8 @@ async def test_full_sync_restart_keeps_page_and_auth_pauses_all_datasets(catalog
async def test_online_instrument_type_is_verified(catalog):
client, _, state = catalog
state["fields"][0]["instrumentType"] = "FUTURE"
assert (await client.get("/api/v1/catalog/worldquant/fields", params=SCOPE)).status_code == 502
response = await client.get("/api/v1/catalog/worldquant/fields", params={**SCOPE, "q": "TEST"})
assert response.status_code == 502
async def test_mcp_collection_reads_and_versioned_submit_contract(catalog):
@@ -350,3 +352,12 @@ async def test_retry_waiting_full_job_requeues_its_checkpoint(catalog):
async with runner.sessions.begin() as db:
result = await Business(db).retry_job(job.id)
assert result["status"] == "queued" and result["checkpoint"]["offset"] == 100
async def test_online_fields_reject_empty_criteria_before_requesting_platform(catalog):
client, _, state = catalog
before = list(state["calls"])
for params in (SCOPE, {**SCOPE, "q": " ", "dataset_id": ""}):
response = await client.get("/api/v1/catalog/worldquant/fields", params=params)
assert response.status_code == 422
assert state["calls"] == before