Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Submit feedback
    • Contribute to GitLab
  • Sign in
haskell-gargantext
haskell-gargantext
  • Project
    • Project
    • Details
    • Activity
    • Releases
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 160
    • Issues 160
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 8
    • Merge Requests 8
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • gargantext
  • haskell-gargantexthaskell-gargantext
  • Merge Requests
  • !274

Merged
Opened Apr 08, 2024 by Alfredo Di Napoli@AlfredoDiNapoli
  • Report abuse
Report abuse

Natural sorting for the Ngrams element

Fixes #331 (closed) (as far as the backend goes, I think the issue with the frontend remains, see below).

This MR changes the sorting inside searchTableNgrams from the lexicographical sorting to an (approximation) of natural sorting using the DUCET unicode collator, i.e. a list that spells out how to sort unicode symbols (and this list is a unicode standard, so to speak).

This allows the backend to return terms which contains unicode letters (like accents) sorted correctly.

I have added tests in the backend to ensure things work as intended, but I think this is still not working in the frontend, see this GIF:

sorting_frontend

As you can see, there are two issues (cc @fmaniere ):

  1. It seems like every time I click on the column to change the order of sorting, two requests are fired to the backend (some duplicated Javascript event listener maybe?);
  2. While the backend return the data in the correct order, it seems like this is not respected by the frontend.

Check out, review, and merge locally

Step 1. Fetch and check out the branch for this merge request

git fetch origin
git checkout -b adinapoli/issue-331 origin/adinapoli/issue-331

Step 2. Review the changes locally

Step 3. Merge the branch and fix any conflicts that come up

git fetch origin
git checkout origin/dev
git merge --no-ff adinapoli/issue-331

Step 4. Push the result of the merge to GitLab

git push origin dev

Note that pushing to GitLab requires write access to this repository.

Tip: You can also checkout merge requests locally by following these guidelines.

  • Discussion 0
  • Commits 2
  • Pipelines 2
  • Changes 8
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
1
Labels
Ready to merge
Assign labels
  • View project labels
Reference: gargantext/haskell-gargantext!274

Revert this merge request

This will create a new commit in order to revert the existing changes.

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.

Cherry-pick this merge request

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.