MapComplete icon indicating copy to clipboard operation
MapComplete copied to clipboard

Warn if url = website

Open Discostu36 opened this issue 3 years ago • 3 comments

The editor should warn if I add an url= to an object that already has the same URL in website= tag. See this changeset for example

Discostu36 avatar Apr 18 '21 20:04 Discostu36

This is an interesting case.

First of all, this editor/viewer aims to be extremely simple (think a tech-illiterate person). Giving warnings about 'urls and websites' will be confusing for them.

Furthermore, the wikipage for URL seems to indicate that using website instead of URL should be preferred.

I had a quick look to artworks with a URL in Belgium, and it seems that they are not that frequent, so they aren't an issue that often. Maye an experienced user can do some data cleaning?

I'm not sure how to proceed, although I see a few options:

  1. Setting a website key will erase the URL-key
  2. When setting the website, the URL is given as an option to fill in. If this option is picked (and only then), the url-key is cleared
  3. If the URL is defined (an no website is defined), presenting the URL as the website. When changing this URL, the website tag is filled out however (together options 1 or 2)
  4. Ignoring this with this editor as this kind of automatic data cleanup is out of scope here

Any thoughts?

pietervdvn avatar Apr 18 '21 21:04 pietervdvn

I think this is more than one problem:

  1. The app is asking "On which website is more information about this artwork?". But tag website is to be "used to provide the full URL to the official website for the related features" (according to wiki). So the app should use the url key for this question or the question should be rephrased to ask for the official website
  2. For the problem of duplicate URLs I guess the simplest solution would be to not ask this question if website or url key is present

Discostu36 avatar May 05 '21 09:05 Discostu36

Hi,

Would you be comfortable with making the changes in the theme configuration directly and opening a PR?

You can have a mapping, which shows the website (if website is set) but asks the URL - something like this (but then in valid JSON):

{
 render: "More information can be found on {url}",
 mappings: [
  { "if" : "website~*",
     then: "More information can be found on {website}", 
     hideInAnswer: true /* Do not offer this as option to pick as answer */
  } 
],
 question: "where can more info be found?",
 freeform: {
    key: "url", 
    type: "url",
     addExtraTags: ["website="] /* Clears the website */ }
   }

BTW: I'm trying to get more people to get to know the configuration, hence why I'm asking you to help out ;)

pietervdvn avatar May 05 '21 12:05 pietervdvn