New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ordering listing elements #677
Open
jum-s
wants to merge
11
commits into
main
Choose a base branch
from
ordering-listing-elements
base: main
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
maxlath
force-pushed
the
propagate-listing-elements-redirections
branch
from
August 29, 2023 10:10
ca9add4
to
2967604
Compare
jum-s
force-pushed
the
ordering-listing-elements
branch
from
October 6, 2023 08:11
6ee0044
to
fdc5b68
Compare
jum-s
force-pushed
the
ordering-listing-elements
branch
from
March 20, 2024 15:30
fdc5b68
to
8e5ba73
Compare
jum-s
changed the base branch from
propagate-listing-elements-redirections
to
main
March 20, 2024 15:31
jum-s
force-pushed
the
ordering-listing-elements
branch
from
March 25, 2024 10:04
8e5ba73
to
e46af93
Compare
jum-s
force-pushed
the
ordering-listing-elements
branch
from
April 11, 2024 08:34
e46af93
to
bf374ce
Compare
In order to test the script to fill elements without
|
jum-s
force-pushed
the
ordering-listing-elements
branch
from
April 22, 2024 13:22
bf374ce
to
2746c43
Compare
see [possible implementations](https://softwareengineering.stackexchange.com/questions/195308/storing-a-re-orderable-list-in-a-database) Choice was made to have the simpliest implementation for the moment: position integer.
with a safer way to assign ordinal, not relying on loop (which is based on array length) but on existing ordinal, to better handle legacy element without ordinal
- with a temporary script to create ordinals on existing elements - allow to update ordinals, by accepting paginated elements subset for performance and client friendlyness - should test that removing element then reordering is ok
only element's byListings view existed before. This commit splits up server code between byListing and byListings queries. The code shoud be more efficient as it does not sort by ordinal after couch view, leaving the sorting to couchdb This couch views split allowed some neat refactoring on the way
jum-s
force-pushed
the
ordering-listing-elements
branch
from
May 18, 2024 07:14
6119af7
to
4cfbe0a
Compare
allows only to update `comment` attribute
the temporary function 'updateElementDoc' is not reordering oridnals yet, waiting for next commit to implement lexicographic ordering
…graphical ordinal
easing client requirements by assigning a lexicographical order only in Element model (as close as possible to the db) this may need some debouncing system to not conflict update couchdb. but i cant see any implementation that would be debouncing-free
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Allowing users to reorder elements in a list.
Adds a
ordinal
field toelements
documentsmost important commit: 40a8d56
ordinal
naming improves grepability asposition
is already used byuser.position = [lat, lon]
0
to avoid some off-by-one mess, but at the cost of returning falsy value (aka0
)