controversies-of-science / react-worldviewer-app

(WIP) => { The Controversies of Science App. Currently includes controversy search and a swiping interface for structuring the crowdsourcing of information on controversies. }
https://www.controversiesofscience.com
1 stars 0 forks source link

Fix URL encoding + Every quote and quote series should have a URL home #186

Closed worldviewer closed 7 years ago

worldviewer commented 7 years ago

Although there already is an objectID attached to every quote, this number will change as new quotes are added. The objectID is also longer than it really needs to be for this purpose. So, we need a short index which is additive over time (former values do not change).

We would also seem to need two separate index values: one for the quote series and a second for the item in that series.

Facets would seem to have nothing to do with this, and click-to-copy should ideally also include this URL.

URL-friendly characters:

ALPHA DIGIT "-" / "." / "_" / "~"

Instead of this (URL decoded):

https://www.controversiesofscience.com/?facets=Quotes: relativity

Should be something like this:

https://www.controversiesofscience.com/?facets={category}.{subcategory}

And for this current situation, something like:

https://www.controversiesofscience.com/?quote={series}.{item}

worldviewer commented 7 years ago

This is an excellent resource on this subject.

worldviewer commented 7 years ago

I've fixed the url-encoding problem.

worldviewer commented 7 years ago

~The first step was to make sure that there are no repeated titles. All quotes should have a unique title.~

~I'm going to use this package to perform a hash on the titles (after the - Part {num} has been stripped out).~

~Then, I need to implement this with a ?quote= query parameter.~

worldviewer commented 7 years ago

The quote home functionality is not perfect insofar as it has to reload the app in order to get to it, but everything seems to be otherwise working.