Read locations written in other systems in the app - #65
Merged
Merged
Conversation
The search field, links and text selected in another app now take a location written in several other systems and in the links common map services share. Each is read by its owner's published rules and tested against the owner's published answers, and the card says which system the place came from. A short code of another system written with its town is read against the town, found in the name index or on the device. A converted code says how much its source said: when the source named an area larger than a cell, or a link's coordinates stop at a few decimals, the card calls the code the centre of that area, not a door, and a link that carries only the middle of a map view says so. Ten characters that are a code here and in another system too open as a code here, with the other reading offered one tap away. What only its owner's service can read, and a short link that says where it goes only when opened, are named and refused rather than guessed. The names of other systems live only in the parser, its tests and the app's strings.
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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
The search field, a link, or text selected in another app now takes a location written in another system, or a link from one of the common map services. The app converts it to a code, and the card says which system the place came from. The names of those systems appear only in the parser (
core/Formats.kt), its tests and the app's strings, as the scoped exception allows. They appear nowhere else in the repository, this description included.A converted code says how much its source said
A code names 2.5 m wherever it came from. When the source named an area larger than a cell, the card calls the code the centre of that area, not a door. Examples: a code for a square about 14 m across, or a link whose coordinates stop at two decimals and are good to about 1.1 km.
Ten characters that could be either
One system writes its codes as ten symbols with no separators, every one of which is also in this alphabet. So the same text is a code here and a place there. It opens as a code here, and the list under the field offers the other reading, one tap away. Written with that system's older separators, it can only be the other, and opens as that.
Checks
OtherFormatsTest(17 tests):