homotopy-io / homotopy-webclient

https://homotopy.io
26 stars 5 forks source link

When cloning a project, the clone should appear immediately underneath #98

Open jamievicary opened 5 years ago

jamievicary commented 5 years ago

At the moment the clone appears at some arbitrary position lower down the list, which is confusing if the user isn't sure what's happened.

alexarice commented 4 years ago

I think this can be done while loading the project list from firestore using http://react-redux-firebase.com/docs/queries.html#orderbychild The default is to order by the date they were added to the store, I propose adding an ordering key to the metadata, perhaps of the form:

{
date: ...,
cloneNumber: ...,
}

and order these lexicographically by date first and clone number second. When cloning a project this ordering key could take the date from the project it is cloning and increment the cloning number by 1

alexarice commented 4 years ago

I'm not sure if you can specify a custom ordering so it may have to be put into a string of the form "date#clonenumber" or similar