zooniverse / shakespeares_world

Full text transcription project for the Folger Shakespeare Library
https://www.shakespearesworld.org
Other
8 stars 5 forks source link

Remove ! from routes and change transcribe routes #374

Closed simoneduca closed 6 years ago

simoneduca commented 6 years ago

Fix #372

I'm not sure if theroutes need to be updated server-side as well, but this takes care of the frontend.

simoneduca commented 6 years ago

It does.

simoneduca commented 6 years ago

https://preview.zooniverse.org/shakespearesworld/#!/

eatyourgreens commented 6 years ago

Can /classify redirect to /transcribe as per #372 or doesn’t Angular allow that?

eatyourgreens commented 6 years ago

Also, this changes the link to #!/classify but the link from the Talk page goes to #/classify (no exclamation mark.)

simoneduca commented 6 years ago

Regarding redirecting I'm not sure, I'll check. The link from the Talk doesn't work because of the missing !. #/classify is hardcoded in PFE, so I assume it would break all other projects if we added a !.

simoneduca commented 6 years ago

I've found the correct way of getting rid of the hash-bang #!. Here's some info about when it was introduced I've tested two ways we could handle this:

  1. $locationProvider.hashPrefix(''); gets rid of just !
  2. $locationProvider.html5Mode(true); gets rid of #!

2 is my favourite as it's easier to share and read. However, PFE links have # hardcoded in, so I'm worried that could break SW nav when redirected there from PFE.

Any thoughts @eatyourgreens?

eatyourgreens commented 6 years ago

For option 2, you’ll also need to configure the server to resolve URLs like https://www.shakespearesworld.org/classify back to https://www.shakespearesworld.org/index.html You can ask on Slack if you need help with that.

simoneduca commented 6 years ago

I went with option 1 https://preview.zooniverse.org/shakespearesworld/#/. Regarding the redirect, I'm not sure how to do it/if it's possible. What would the benefit be? Bookmarked links?

eatyourgreens commented 6 years ago

http://isolani.co.uk/blog/javascript/BreakingTheWebWithHashBangs

simoneduca commented 6 years ago

Nice and useful article, thanks.

eatyourgreens commented 6 years ago

Should I merge this? It looks good to me.

simoneduca commented 6 years ago

Sorry @eatyourgreens, yes please!