Skip to content
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

regression introduced in sorting code (pull #187) - narrow note list no longer sorted #204

Closed
ludovicaelbrecht opened this issue Jun 27, 2023 · 3 comments

Comments

@ludovicaelbrecht
Copy link

Expected vs. actual behavior

I use the "narrow note list" and sort notes through View -> Sort notes by -> Date Updated. This has worked perfectly until 2.1.6, and has been broken in every version since 2.1.7.

Steps to reproduce the problem

  1. View -> Narrow Note List
  2. Try to sort the notes using View -> Sort notes by -> Date Updated
  3. The notes aren't sorted differently, they're always sorted alphabetically.

Specifications

Running nixnote2 on Linux (Fedora 38), reproduced this behavior both using the Fedora copr package and by building from source.

I looked at the changes introduced in 2.1.7 (since this is where the problem appears). In 2.1.7, this issue is closed: #156 ("editor fonts and sorting notes").
Which is fixed by this pull request: https://github.com/robert7/nixnote2/pull/187/commits
Which contains this commit: 4fb6706

If I undo this commit (i.e. comment out the sorting code and add "this->setSortingEnabled(false);" again), then recompile, the regression is no longer there for me.

I don't know what the correct fix is, but if I read issue #156 correctly it seems that this commit fixed a sorting issue in "wide note list" mode, but as a side effect breaks sorting in "narrow note list".

Thanks,
Ludovic

@boo-yee
Copy link

boo-yee commented Jun 29, 2023

Hi.
To fix issue 156, I set the notetableview as sortable by calling setSortingEnabled(true), so that we can sort by clicking on the headers, but it caused such a side effect, which is not what I expected. In my case, narrow or wide does not matter, actually sorting from the menu does not work.
If you just need to sort by one attribute(column) in 2.1.7 or later, you could do that by clicking on the notetableview's headers for now. And I'll try to find a way to fix the sorting from the menu later on.

boo-yee added a commit to boo-yee/nixnote2 that referenced this issue Jun 30, 2023
code (pull robert7#187) - narrow note list no longer
sorted robert7#204
@boo-yee
Copy link

boo-yee commented Jul 3, 2023

Fixed by #207.

@ludovicaelbrecht
Copy link
Author

Just built the develop branch, it's fixed indeed. Thanks a lot!

charlescanato pushed a commit to charlescanato/nixnote2 that referenced this issue Nov 21, 2023
code (pull robert7#187) - narrow note list no longer
sorted robert7#204
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants