TerriaJS / terriajs

A library for building rich, web-based geospatial data platforms.
https://terria.io
Apache License 2.0
1.19k stars 364 forks source link

Story v2.0 - Placeholder routes for "new stories" via `/stories/:id` #4692

Closed AnaBelgun closed 2 years ago

AnaBelgun commented 4 years ago

Background: DEA team would like to start using vanity url shortner for broadcasting work on some specific datasets. The first example will be the use of the short url for the Coastlines data, to be published and disseminated to Government and other users in Sep.

There are 2 stages: 1) Once DEA team provides a share link with the story they want, we'll copy the contents of that share link into a cleaner s3 directory - remembering we prefix the first 2 characters into directories - https://github.com/TerriaJS/terriajs-server/blob/f2aa63e95debfdb4885ddacdfa7dffef2dde8d29/lib/controllers/share.js#L103. That way, we can make https://maps.dea.ga.gov.au/#share=s-DEACoastlines resolve to that share link

2) The placeholder feature described in this actual ticket title - once the new routing in https://github.com/TerriaJS/terriajs/pull/4679 is merged, we will add an additional route under /stories/:id, which will form the basis of the new stories feature extensions. But the "placeholder" will simply resolve the :id into a s3 share link under the same key (we do S3 here because realistically that's all we are using at the moment)

1) enable the http://maps.dea.ga.gov.au/**#share=s-DEACoastlines** when DEA team advises the data publication and its url

2) work and release a more elegant shortening of urls which will transform the above url closer to http://maps.dea.ga.gov.au/**DEACoastlines**

hardreddata commented 4 years ago

In the first instance I wonder if you could do this with initialisation files and so http://maps.dea.ga.gov.au/#DEACoastlines would be the link, assuming you put an equivalent DEACoastlines.json in wwwroot/init

Not really my business, but potentially a good compromise for a September time constraint. If they can maintain their own catalogue.

This is how the branch landing pages referred to in https://medium.com/terria/engineering-excellence-with-terria-douglas-partners-9da433753f23 are done

soyarsauce commented 4 years ago

ok so here was my thinking for /stories/DEACoastlines

  • if they were going to publicise some url broadly, we should take this opportunity to do something nice like above
  • having that lets us do /stories/DEACoastlines to the share link today, then down the future that same link can be stories v2
  • and doing the /stories/DEACoastline is like, a 5 min job over the 1min-s3 job

Will update ticket description to clarify we aren't aiming for a url shortener in Terria

@RussellGrew that's actually a good idea! If not for the fact that this will be utilising the story feature and not just a predefined catalog

hardreddata commented 4 years ago

As you may expect we are very happy to take receipt of this new feature. All good. Thanks for the response.

soyarsauce commented 4 years ago

Fantastic 🙂

@RussellGrew FYI points 1 & 2 on the issue description are updated now

meh9 commented 4 years ago

In the first instance I wonder if you could do this with initialisation files and so http://maps.dea.ga.gov.au/#DEACoastlines would be the link, assuming you put an equivalent DEACoastlines.json in wwwroot/init

Hi @RussellGrew - yes you absolutely can, we used to do exactly that for AREMI in the past. If you use initFragmentPaths in config.json then you can have a non-wwwroot/init space where you put your additional init files. We used to keep ours in a static S3 web bucket because it was very easy to add new ones. However, this was before Stories, so not sure if it would work for them or not.

robbibt commented 4 years ago

http://maps.dea.ga.gov.au/#DEACoastlines would be pretty fantastic, we'd love to take up that option if it was possible!

AnaBelgun commented 3 years ago

Blocked by https://github.com/TerriaJS/terriajs/pull/4961

wibily commented 2 years ago

Ana: need a conclusion for this ticket by march

wibily commented 2 years ago

decision in team meeting to create static urls for stories so that customers (starting with DEA) can url shorten them and share them. Decision to not link this to SEO/route reserving. Requires discussion on who is reponsible for generation of fancy share links. Possibilty of delegating this to another service.

wibily commented 2 years ago

Ana: these share links will be created manually and curated and maintained by the Terria team.

tephenavies commented 2 years ago

See draft here: https://github.com/TerriaJS/terriajs/pull/6151

Still deciding on route name (/story/{storyname} or /stories/{storyname}) and whether to immediately drop /story/{storyname} from the URL once the story loads, or whether to keep it (for page refreshes etc.)

AnaBelgun commented 2 years ago

Connected to https://github.com/TerriaJS/TerriaMap/pull/578 too

AnaBelgun commented 2 years ago

both #6151 and https://github.com/TerriaJS/TerriaMap/pull/578 have been merged