Describe the reason for these changes and the problem that they solve
When the application loads recipes for display -- whether an individual item from local cache, or a set of results from the API -- we generally want to scroll the viewpoint so that the top result is displayed to the user.
The logic to perform this is a bit fragmented at the moment; it relates in some ways to navigation state, in some ways to bootstrap-table, and in some ways to the different logic that the application contains for each view (tab). It is partially but not completely abstracted by the shared recipe-list view component.
This changeset removes some likely-faulty old logic related to page state discovered during #217.
The changeset also attempts to simplify the intended logic by invoking the scroll event directly.
Briefly summarize the changes
Update pseudo-results responses (local-authority, empty fallback) to match the current API authority response format
Add a scrollToResults call to the load-successful event handler for the recipe search results list component
Emit load-successful events instead of page-change events when 'local' (non-fetched) recipe results are loaded
How have the changes been tested?
Browser-based testing; not thorough, and not ideal
List any issues that this change relates to
Discovered during #217.
Describe the reason for these changes and the problem that they solve
When the application loads recipes for display -- whether an individual item from local cache, or a set of results from the API -- we generally want to scroll the viewpoint so that the top result is displayed to the user.
The logic to perform this is a bit fragmented at the moment; it relates in some ways to navigation state, in some ways to
bootstrap-table
, and in some ways to the different logic that the application contains for each view (tab). It is partially but not completely abstracted by the sharedrecipe-list
view component.This changeset removes some likely-faulty old logic related to page state discovered during #217.
The changeset also attempts to simplify the intended logic by invoking the scroll event directly.
Briefly summarize the changes
scrollToResults
call to the load-successful event handler for the recipe search results list componentHow have the changes been tested?
List any issues that this change relates to Discovered during #217.