Open paulbalomiri opened 10 years ago
Note that a correction has been made: The CORRECT version as updated in the ticket description is :
class Dataset
List<List<LocationBitDataset>> location_bits_content_by_picker_level
Whereas previously it was
class Dataset
List<List<String>> location_bits_content_by_picker_level
Structure
The Location picker is an element which contains an hierarchical data set of Location bits, meaning that each bit of information refines the previous bit (Note: Bit is used in this context as in piece, not as in bits of a byte).
In the image description above a Location picker UI Widget is displayed with it's elements which shall be explained in the following List:
LBx
andLBy
for whichx<y
,LBx
describes a geographical area which encompassesLBy
fixed
orfloating
fixed
LBs are written in boldfloating
LBs are written in plain and accompanied by anerasure marker
to the right.LBx
also erases allLBy
for whichy >= x
LB0
and the Location Picker has nodata_parent
data_child
exists and it is the lastLBx
, that is: for allLBy
in the Location Pickerx >=y
. Additionally the last LB is only defined if the dataset of the Location picker it belongs to is completedataset
containingLBs
of Location Pickersdataset
is linked to each formatted text entry, so that when picked, the correpondingdataset
part is loaded into the Location Picker it is destined forClass Model in pseudocode:
Operation mode:
Both the
LocationPicker
and theLocationActiveSearch
operate on and withLocationPickerDataset
Objects.Sequences of execution model:
Let's look at what happens from loading time to the completion of a Location specification:
LocationActiveSearch
dispatches a search request with an empty user string, and the current Location if available. This is done when no previous Location is stored, or when the current Location differs enough to invalidate at least one of theLocationBitDataset
components in the currentLocationPickerDataset
LocationPickerDataset
is persistently stored on the device as the current location if no other dataset exists with a common prefix (see picking currentLocationPickerDataset
)LocationPickerDataset
from the Result is set on theLocationPicker
'sLocationPicker
as the same dataset is referenced by all childLocationPicker
instancesLocationPicker
shall update to display the currentLocationPickerDataset
LocationPickerDataset
object is preconfigured which represents the current location. This object is loaded as the current location of theLocationPicker
LocationActiveSearch.search_delay
a search REQUEST is sent (asynchronously)LocationActiveSearch
the result is discarded if:LocationActiveSearch
is available for a later requestLocationActiveSearch.search_text
is compared to theLocationSearchUpdate.query
stringif LocationActiveSearch.search_text == LocationSearchUpdate.query
LocationSearchUpdate.formatted_result
contentsif LocationActiveSearch.search_text.contains(LocationSearchUpdate.query) or LocationSearchUpdate.query.contains(LocationActiveSearch.search_text)
:LocationSearchUpdate.formatted_result
contentselse
:LocationSearchUpdate.query
with the currently displayedLocationActiveSearch
.LocationSearchUpdate.query
is no longer valid the search results are removed immediately. Only the active search indicator (moving circle) remains.LocationActiveSearch
sets the pickedLocationPickerDataset
as the dataset of the rootLocationPicker
LocationPicker
in the hierarchyLocationBit
elements according to the new LocationPickerDatasetLocationBit
erasure:LocationPickerDataset
of theLocationPicker
is modified. All Entries corresponding to the selectedLocationBit
LBx
and all other entries corresponding to anyLNy
withx>=y
will be deletedLocationPicker
s affected are updatedLocationSearchUpdate.query
and the modifiedLocationPickerDataset