fedwiki / wiki-client

Federated wiki client-side javascript as a npm module.
Other
117 stars 38 forks source link

update url on fork from history #288

Closed WardCunningham closed 2 years ago

WardCunningham commented 2 years ago

First step in lineup reconciliation when forking from history. Here we update the url to remove the _rev suffix from the page that is now the current version.

WardCunningham commented 2 years ago

Fork from history on the right hand page turns the left hand page to a ghost.

image

(Original suggestion by David Bovill)

paul90 commented 2 years ago

Spotted a little problem in the test for turning pages ghost, site is not an attribute but held in data - so this becomes $(p).data('site').

As we are only interested in turning any other copies of the forked page that are from the origin wiki, where the site field is either empty, null, view, origin, local, or recycler, so we just need to test if !$(p).data('site') is one of those. No need to compare with $page.data('site') as if we are forking from another site, at this stage that will still be the other wiki site's name.

paul90 commented 2 years ago

Published as + wiki-client@0.23.5