Repository navigation
fix(data-sources): say a source did not answer instead of "0 in view" - #734
Merged
Merged
Conversation
When a fuel, charging or parking source is not ready, the search answer carries `partial: "unavailable"`. The panel only noticed `"area"`, so an unavailable source with no results read "0 in view", as if there were no stations here. Show a notice that not every source answered, with a retry action instead of "zoom in", and leave out the count while it is unknown. Results that did arrive stay listed. The area-limited notice and complete empty answers are unchanged. Refs #412 Claude-Session: https://claude.ai/code/session_017DEL8C49cYr4sPqU7EJgCR
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed and why
When a fuel, charging or parking source isn't ready, the OpenConditions providers answer with
partial: "unavailable". The mobility panel only showed a notice forpartial === "area". So an unavailable source with no results showed "0 in view", which reads as "there are no stations here".Now, for
unavailable:Unchanged: the area-limited "Zoom in to load more" notice, complete empty answers ("0 in view", no notice), and the loading and error states. The notice follows the current query, so a new viewport, provider or filter drops a stale notice.
Text added in English and German (
dataSources.sourceDidNotAnswer); Retry reusescommon.retry.Related work
Fixes #412.
Verification
DataSourceFilterContent.test.tsx(new) covers: unavailable with no results, unavailable with results, the pending retry, loading during refetch, the area notice, a complete empty answer, and the notice clearing when the answer changes. Against the old component, the four unavailable cases fail and the three unchanged-behaviour cases pass.DataSourcePartialNotice.test.tsxcovers both reasons in English and German.vitest run apps/web/src/components/panels/datasource/: 11 passed.tsc --noEmitforapps/web: passes.pnpm check-translations: pass (0 errors).Not performed: screenshots or a browser check of the rendered notice; the maintainer asked to skip them. Full test suite and other workspaces' type checks are left to CI.
Release and upgrade impact
None.