Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions app/components/feed-quality/FeedQualitySection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export function FeedQualitySection() {

const filterQuery = useFeedQualityFilters();
const hasFilters = Object.keys(filterQuery).length > 0;
const { rows, groups, isLoading, error, retry } = useFeedQuality(
const { groups, isLoading, error, retry } = useFeedQuality(
enabled,
filterQuery
);
Expand All @@ -53,13 +53,13 @@ export function FeedQualitySection() {
let okCount = 0;
let warningCount = 0;
let errorCount = 0;
for (const row of rows) {
if (row.status === "OK") okCount += 1;
else if (row.status === "WARNING") warningCount += 1;
for (const group of groups) {
if (group.worstStatus === "OK") okCount += 1;
else if (group.worstStatus === "WARNING") warningCount += 1;
else errorCount += 1;
}
return { total: rows.length, okCount, warningCount, errorCount };
}, [rows]);
return { total: groups.length, okCount, warningCount, errorCount };
}, [groups]);

// True while a fresh result is loading (first load or a new filter
// combination). Only the figures and table rows swap to placeholders — the
Expand Down Expand Up @@ -101,7 +101,7 @@ export function FeedQualitySection() {
role="status"
aria-live="polite"
>
Showing data streams that match your filters above.
Showing data providers that match your filters above.
</p>
)}
{error ? (
Expand Down Expand Up @@ -145,7 +145,7 @@ function EmptyState() {
No data quality data yet.
</p>
<p className="mt-1 text-sm text-oa-grey-600">
OpenActive hasn&apos;t assessed any data streams in this window. Check back
OpenActive hasn&apos;t assessed any data providers in this window. Check back
once data providers have started sharing data.
</p>
</div>
Expand All @@ -156,7 +156,7 @@ function NoMatchesState() {
return (
<div className="rounded-sm bg-white p-8 text-center ring-1 ring-oa-grey-200">
<p className="text-base font-semibold text-oa-navy">
No data streams match your current filters.
No data providers match your current filters.
</p>
<p className="mt-1 text-sm text-oa-grey-600">
Try removing a filter above to widen the search.
Expand Down
2 changes: 1 addition & 1 deletion app/components/feed-quality/FeedQualityStatusFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export function FeedQualityStatusFilter({
<div
ref={groupRef}
role="group"
aria-label="Filter data streams by status"
aria-label="Filter data providers by status"
className="no-scrollbar relative -mx-1 flex items-center gap-1.5 overflow-x-auto px-1 py-1"
>
<Chip
Expand Down
8 changes: 4 additions & 4 deletions app/components/feed-quality/FeedQualitySummary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ export function FeedQualitySummary({

return (
<article
aria-label="Data stream status overview"
aria-label="Data provider status overview"
aria-busy={loading || undefined}
>
<p className="text-[11px] font-bold uppercase tracking-[0.18em] text-oa-grey-600">
Data stream status
Data provider status
</p>

<p className="mt-2 flex items-baseline gap-2">
Expand All @@ -72,8 +72,8 @@ export function FeedQualitySummary({
</span>
<span className="text-sm font-medium text-oa-grey-600">
{!loading && total === 1
? "data stream tracked"
: "data streams tracked"}
? "data provider tracked"
: "data providers tracked"}
</span>
</p>

Expand Down
8 changes: 4 additions & 4 deletions app/components/feed-quality/FeedQualityTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -256,10 +256,10 @@ export function FeedQualityTable({
// currently sees so screen readers know if their filter actually matched.
const liveMessage = useMemo(() => {
const count = filteredGroups.length;
const noun = count === 1 ? "data stream" : "data streams";
const noun = count === 1 ? "data provider" : "data providers";
if (!hasActiveFilters) return "";
return count === 0
? "No data streams match the current filters."
? "No data providers match the current filters."
: `${count} ${noun} match the current filters.`;
}, [filteredGroups.length, hasActiveFilters]);

Expand Down Expand Up @@ -388,7 +388,7 @@ export function FeedQualityTable({
{!loading && filteredGroups.length === 0 ? (
<div className="rounded-sm bg-white p-8 text-center ring-1 ring-oa-grey-200">
<p className="text-base font-semibold text-oa-navy">
No data streams match those filters.
No data providers match those filters.
</p>
<p className="mt-1 text-sm text-oa-grey-600">
{query
Expand Down Expand Up @@ -493,7 +493,7 @@ export function FeedQualityTable({
aria-live="polite"
className="px-3 py-3 text-center text-xs text-oa-grey-500"
>
Loading more data streams…
Loading more data providers…
</div>
)}
</div>
Expand Down
4 changes: 3 additions & 1 deletion docs/feed-quality.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,16 @@ If the API fails, the failed key is dropped so Retry can try again.

`groupFeedsByDataset` in `app/lib/feed-quality.ts` groups rows by dataset.

Each group gets a `worstStatus` (the most severe status among that dataset's feeds). The summary overview and the All / Healthy / Warnings / Errors chips both count **data providers** (dataset groups) by that `worstStatus`, so their totals match the table. Individual feed statuses still show when a group is expanded.

The UI has two views (`FeedQualityViewToggle`):

- **Data completeness** - core fields used for headline opportunity figures (dates, location, activity or facility)
- **Content quality** - extra fields that help people see/choose (age range, level, accessibility, gender restriction)

Completeness bands (high / moderate / low / none / not assessed) are defined in `COMPLETENESS_BANDS` in the same file. Colour cells use those bands.

Each feeds also has a status: `OK`, `WARNING`, or `ERROR` (shown as Healthy / Warning / Error).
Each feed also has a status: `OK`, `WARNING`, or `ERROR` (shown as Healthy / Warning / Error).

## Opportunities column

Expand Down
Loading