Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make "selection" area more flexible #27

Open
joto opened this issue Mar 20, 2019 · 3 comments
Open

Make "selection" area more flexible #27

joto opened this issue Mar 20, 2019 · 3 comments

Comments

@joto
Copy link
Collaborator

joto commented Mar 20, 2019

We should think about making the "Selection" area on the right more flexible, so that layers can do different things there.

@abrensch has done some changes there in his fork at http://brouter.de/osmoscope/ .

I am not sure what exactly we need here, but some kind of link back to the source of the layer seems like something other layers might need, too. Maybe we can find a generic way of doing this, for instance by allowing the layer description to define some links (based on an id field or so).

@hbruch
Copy link
Contributor

hbruch commented Mar 20, 2019

How about an addition in the layer json like:

"actions": [
  { "action": "Hide", 
    "description": "Marks feature as false positive", 
    "url": "<some action/layer specific url like e.g. http:/server/layername/{id}/?action=falsePositive"},
  ...
}]

action name can be shown as button label, description as mouseover. Probably, we should distinguish between opening the url in a new window or just requesting the url and then reloading features (or later on an updated false positives list, which will hide the feature). Perhaps different HTTP-methods should be supported(?)

@joto
Copy link
Collaborator Author

joto commented Mar 20, 2019

@hbruch I'd rather have a fixed list of possible "actions" instead of making everything just free texts. Reasons: First, at some point we want those texts to be translatable. Second: Those texts will show up on the Osmoscope web site but supplied by a basically untrusted third party. Some more control is better here. It would also make for a better user experience when there is a standard way of doing things.

@abrensch
Copy link

A bi-directional API to the layer-provider can get complex quickly. When attaching BRouter-Suspects, first I thought that just merging the contents of my dispatcher-page into your selection page is easy - but it's not. Doing error handling in such a mix between client- and server-side logic is tricky.

On the other hand, if you want to define the issue tracking workflow then you can as well provide it's database - this is less complex then having an unclear API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants