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

Desktop: Sort Order Buttons and Per-Notebook Sort Order #5437

Merged
merged 18 commits into from
Nov 11, 2021

Conversation

ken1kob
Copy link
Contributor

@ken1kob ken1kob commented Sep 8, 2021

The features discussed at the below are implemented. The detailed features and their animation examples are described at the first post of the topic.

@laurent22
Copy link
Owner

Thanks for the pull request. Since the thread if many pages long, could you provide a summary of what's been implemented please?

@ken1kob
Copy link
Contributor Author

ken1kob commented Sep 8, 2021

could you provide a summary of what's been implemented please?

Very short summary is here. The following three features are implemented.

  1. Sort Order Buttons
    • Two buttons, "Switch sort order field" and "Reverse sort order", are added at the top of NoteListPanel.
  2. Per-Field Reversal
    • Normal/Reverse order is kept for each sort order field (updated time, created time, title or cutom order).
  3. Per-Notebook Sort Order
    • Some notebooks can have their own sort orders (field + reverse) for their notes.

For more details, it is enough to read "Detailed Features" in the 1st post.

@laurent22
Copy link
Owner

Thanks for the information. Is the post on the forum up to date? I'm asking these questions because at first glance the code looks fine, so what would need to be discussed is what's implemented, and it starts with a detailed spec (which you seem to have already provided but just want to make sure it's up to date).

@laurent22
Copy link
Owner

Also you have several linter errors: https://github.com/laurent22/joplin/pull/5437/checks?check_run_id=3544976159#step:8:600

It seems many developers are having this problem lately. Is the pre-commit hook not working for you? When committing do you see something like this?

image

@ken1kob
Copy link
Contributor Author

ken1kob commented Sep 8, 2021

Thanks for the information. Is the post on the forum up to date?

Yes. In the topic, there are some discussions including new coding (such as adding a context menu). But, at the end, the initial feature details become the final ones.

@ken1kob
Copy link
Contributor Author

ken1kob commented Sep 8, 2021

Also you have several linter errors: https://github.com/laurent22/joplin/pull/5437/checks?check_run_id=3544976159#step:8:600

Sorry. They are fixed in the commit a while ago.

It seems many developers are having this problem lately. Is the pre-commit hook not working for you? When committing do you see something like this?

Husky does not seem to work even though it is successfully installed. (My env is Win10 + powershell/cygwin. )

> git commit -m "test" .
Can't find Husky, skipping pre-commit hook
You can reinstall it using 'npm install husky --save-dev' or delete this hook

Usually, I manually run eslint by npm run linter-ci .. In this time, I forgot to put the last period, and running npm run linter-ci reports nothing.

@tessus tessus added the desktop All desktop platforms label Sep 8, 2021
@ken1kob
Copy link
Contributor Author

ken1kob commented Sep 9, 2021

But, at the end, the initial feature details become the final ones.

Though the features are not changed, icons are changed as shown at the post.

Copy link
Owner

@laurent22 laurent22 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've add a first look at it. The implementation is good overall, it's great in particular that you've packaged your feature as commands as it makes the whole thing very flexible. I appreciate too the detailed spec and rational in the forum, as this important part is often missing in pull requests.

Beside the comments I left, I would have the following remarks:

  • Once a folder has had custom sort settings, is it possible to revert to the default? i.e. to reset the custom state and start using the default again?

  • Currently it's already possible to manually order the notes (via the notes.order field), and that order is then synced to all devices including mobile. As I understand your feature will not be synced and I wonder if it should? It might be tricky but I think people will setup their notebooks as they like, then switch to a different device, and nothing will be synced, so they'll have to do that setup again.

  • Once the feature is stable, we'll need to have some test units for it.

export const runtime = (): CommandRuntime => {
loadOwnSortOrders();
loadSharedSortOrder();
eventManager.appStateOn('notesParentType', onNotebookSelectionMayChange);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In code, we use the term "folder", not "notebook", so please change to onFolderSelectionMayChange

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

finished. c723ebe

loadOwnSortOrders();
loadSharedSortOrder();
eventManager.appStateOn('notesParentType', onNotebookSelectionMayChange);
eventManager.appStateOn('selectedFolderId', onNotebookSelectionMayChange);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

onFolderSelectionMayChange

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

finished. c723ebe


execute: async (context: CommandContext, notebookId?: string, own?: boolean) => {
let targetId = notebookId;
const selectedId = getSelectedNotebookId(context.state);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getSelectedFolderId

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

finished. c723ebe

if (previousNotebookId === selectedId) return;
const field = getCurrentField();
const reverse = getCurrentReverse();
const previousNotebookHasOwnSortOrder = hasOwnSortOrder(previousNotebookId);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

previousFolderHasOwnSortOrder

There are a few others so please go through the code and rename to "folder" every time. It's something I'm trying to keep consistent even though there's an inconsistency between UI (notebook) and backend (folder).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

finished. c723ebe

Comment on lines 126 to 140
function getCurrentField(): string {
return Setting.value(SETTING_FIELD);
}

function getCurrentReverse(): boolean {
return Setting.value(SETTING_REVERSE);
}

function perFieldReversalEnabled(): boolean {
return Setting.value(SETTING_PER_FIELD_REVERSAL_ENABLED);
}

function perNotebookSortOrderEnabled(): boolean {
return Setting.value(SETTING_PER_NOTEBOOK_SORT_ORDER_ENABLED);
}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need this layer of indirection. In general, the code should just get the setting directly, without going through a function (unless of course the function does additional processing, but that's not happening in this case). Although I realise you lose typing in this case, but then we should probably change Setting.value to a Setting.value<T>

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

finished. 4cdba95

packages/lib/BaseApplication.ts Show resolved Hide resolved
@ken1kob
Copy link
Contributor Author

ken1kob commented Sep 18, 2021

  • Once a folder has had custom sort settings, is it possible to revert to the default? i.e. to reset the custom state and start using the default again?

Yes. It can be toggled by the context menu in the Side Bar (toggling) and perNotebookFolderSortOrder command. Besides, the current state is shown as a check mark in the Side Bar's context menu.

  • Currently it's already possible to manually order the notes (via the notes.order field), and that order is then synced to all devices including mobile. As I understand your feature will not be synced and I wonder if it should? It might be tricky but I think people will setup their notebooks as they like, then switch to a different device, and nothing will be synced, so they'll have to do that setup again.

Yes. I think it should be synced. But, since implementing the feature of synchronizing them has some impact, it would be postponed until people wants it. As a temporary workaround, some of settings are stored in a file (not a db) for advanced users to be ported manually.

  • Once the feature is stable, we'll need to have some test units for it.

I see. Both GUI and non-GUI? If you pick up some existing tests, I'll follow their manner.

Copy link
Owner

@laurent22 laurent22 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had another look at it and added a few more comments. The one thing I can't find, and I've looked several times, is where you actually sort the notes? I'm sure it's there but somehow can't see it. Could you point me to the relevant lines please?

packages/lib/BaseApplication.ts Show resolved Hide resolved
const SUFFIX_REVERSE = '$reverse';

function getSelectedNotebookId(state?: State): string {
const s = state ? state : app().store().getState();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally we should never call getState() directly - instead you should only pass the state to the function.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

finished. 5d0b0e3


function sortOrderButtonsVisible() {
let visible = Setting.value('notes.sortOrder.buttonsVisible');
if (app().store().getState().notesParentType === 'Search') visible = false;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getState() should be removed - instead the variables you need should be passed to the component using Redux.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

finished. e9dcc3b

}

function sortOrderButtonsVisible() {
let visible = Setting.value('notes.sortOrder.buttonsVisible');
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also don't call Setting.value() from components, because if the value is changed the component should be re-rendered, but it won't be when using Setting.value. Instead pass the values you need to the props using Redux connect, and the state - state.settings['notes.sortOrder.buttonsVisible']

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a come-lately committer, I felt reluctant to touch React component's state and props when not needed. If you don't mind, it would be really better.

By the way, since NoteListControl changes when any 'sort.noteOrderXXX' setting changes, the code in this commit works properly as expected.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

finished. e9dcc3b

}

function sortOrderFieldIcon() {
const field = Setting.value(SETTING_FIELD);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not calling Setting.value

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

finished. e9dcc3b

Comment on lines 5 to 9
export const NOTES_SORT_ORDER_SWITCH = 'notesSortOrderSwitch';
export const SETTING_FIELD = 'notes.sortOrder.field';
export const SETTING_REVERSE = 'notes.sortOrder.reverse';
export const SETTING_PER_FIELD_REVERSAL_ENABLED = 'notes.perFieldReversalEnabled';
export const SETTING_PER_FIELD_REVERSE = 'notes.perFieldReverse';
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't use constants for setting name as it's another layer of indirection, just use the string directly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

finished. 4cdba95

import { _ } from '@joplin/lib/locale';
import { NOTES_SORT_ORDER_SWITCH, SETTING_REVERSE } from './notesSortOrderSwitch';

export const NOTES_SORT_ORDER_TOGGLE_REVERSE = 'notesSortOrderToggleReverse';
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also no constant please.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

finished. 4cdba95

};
};

function onNotebookSelectionMayChange() {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not be here - there has to be some existing code that does something when folder selection change, so please move it over there. That way, you also won't need to include the app package in the comment (creates a dependency loop).

Copy link
Contributor Author

@ken1kob ken1kob Sep 20, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First, the dependency on 'app' could be removed from this command without any redesign. 5d0b0e3

Before we proceed further, I want to clarify your intentions.

This should not be here - there has to be some existing code that does something when folder selection change, so please move it over there.

Which is your suggestion intend, only removing dependency on app or that such a functionality should be moved toward the core?

If the former, everything is done.

If the latter, I have some questions. The first is where is it moved to? Around lib/reducer.ts, or around app-desktop/app.reducer.ts, or in some React component (maybe, NoteListXXX)? I'm not sure the features play a role in the core rather than app-desktop.

Another question is how to capture changes of states/settings. First, modifying lib/reducer.ts is definite and effective, but it will worsen a certain degree of the maintainability, because changing codes of folerSelectionId and notesParentType are scattered. In another side, I don't have a good solution to modify app-desktop/app.reducer.ts. Finally, componentDidUpdated(), useEffect() and appStateOn() are handy to implement the feature.

if (dirty) {
Setting.setValue(SHARED_SORT_ORDER, { ...sharedSortOrder });
}
}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In fact, most of these functions should be moved to a utils package. Could you move them under maybe /services/perFolderSortOrder/utils.ts? Unless you can find a better place.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Migrating to more appropriate venues is very fine.

One suggestion is that most part of perFolderSortOrder.ts and notesSortOrderSwitch.ts are moved to the followings respectively.

  • app-desktop/services/perFolderSortOrderUtils.ts
  • app-desktop/services/notesSortOrderUtils.ts

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer if those related functions are grouped so either in separate files but in a new folder, or both in the same file.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. Final locations are:

  • app-desktop/services/sortOrder/notesSortOrderUtils.ts
  • app-desktop/services/sortOrder/PerFolderSortOrderService.ts

finished. 36e00f8

@ken1kob
Copy link
Contributor Author

ken1kob commented Sep 19, 2021

The one thing I can't find, and I've looked several times, is where you actually sort the notes? I'm sure it's there but somehow can't see it. Could you point me to the relevant lines please?

  • Answer 1)

    • NoteListComponent's props has noteSortOrder: state.settings['notes.sortOrder.field'].
  • Answer 2)

    • The change of 'notes.sortOrderXXX' settings always invoke BaseApplication.refreshNotes()
      if (this.hasGui() && ((action.type == 'SETTING_UPDATE_ONE' && action.key.indexOf('notes.sortOrder') === 0) || action.type == 'SETTING_UPDATE_ALL')) {
      refreshNotes = true;
      }

The change of notes.sortOrder.field is captured by the both. But, the change of notes.sortOrder.reverse is captured by the latter only.

@ken1kob ken1kob requested a review from laurent22 September 21, 2021 06:48
};

export const declaration: CommandDeclaration = {
name: 'notesSortOrderSwitch',
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By the way commands are normally named as verbNoun and we use the word "toggle" usually. So it should be name "toggleNoteSortOrder" for consistency.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. I have no objection to verbNoun style and other naming conventions. Speaking my preferences, "toggle" would be limited to switching between two states, since its behavior is very self-explanatory. For three or more states, I prefer other verbs, switch, select, change, or cycle.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Finished. 36e00f8
Command names are changed as below.

  • notesSortOrderSwitch -> toggleNotesSortOrderField
  • notesSortOrderToggleReverse -> toggleNotesSortOrderReverse
  • perFolderSortOrderSwitch -> togglePerFolderSortOrder


export const declaration: CommandDeclaration = {
name: 'notesSortOrderSwitch',
label: () => _('Switch sort order'),
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Toggle sort order

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Finished. 36e00f8

import { _ } from '@joplin/lib/locale';

export const declaration: CommandDeclaration = {
name: 'notesSortOrderToggleReverse',
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

toggleNoteSortOrderReverse

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Finished. 36e00f8


export const declaration: CommandDeclaration = {
name: 'notesSortOrderToggleReverse',
label: () => Setting.settingMetadata('notes.sortOrder.reverse').label(),
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's sensible, but we shouldn't actually access Settings from the declaration. They are probably initialised by then we there's no guarantee. So you'll just need to copy and paste the string.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Finished. 36e00f8

}

export const declaration: CommandDeclaration = {
name: 'perFolderSortOrder',
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

togglePerFolderSortOrder

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Finished. 36e00f8


export const declaration: CommandDeclaration = {
name: 'perFolderSortOrder',
label: () => _('Toggle own sort order'),
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Toggle per-notebook sort order"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Finished. 36e00f8

@laurent22
Copy link
Owner

The change of notes.sortOrder.field is captured by the both. But, the change of notes.sortOrder.reverse is captured by the latter only.

Thanks for the explanation, that makes sense. I'm a bit concerned with this change as I intend to update the note list at some point, but it seems your changes are well isolated and shouldn't make refactoring more complex.

- renames commands and their labels:
	- notesSortOrderSwitch ->  toggleNotesSortOrderField
    - notesSortOrderToggleReverse -> toggleNotesSortOrderReverse
    - perFolderSortOrderSwitch -> togglePerFolderSortOrder
- moves the most of the commands' body to higher-layer services to clean-up module dependencies.
	- app-desktop/services/sortOrder/notesSortOrderUtils.ts
	- app-desktop/services/sortOrder/PerFolderSortOrderService.ts
- PerFolderSortOrderService is initialized in app.ts/start().
@ken1kob ken1kob requested a review from laurent22 October 1, 2021 14:22
Comment on lines 11 to 13
private static folderState = { notesParentType: '', selectedFolderId: '' };
private static perFolderSortOrders: { [key: string]: any } = null;
private static sharedSortOrder: { [key: string]: any } = {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please define interfaces for these.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

finished. 00bc482

order: false,
};

static initialize() {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All methods should be explicitely marked as either "public" or "private". I see you've marked the private ones already and I guess you intend the others to be public by default, but I prefer if it's explicit (in fact you probably got a few warnings about this with eslint).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

finished. 00bc482

return folderId && this.perFolderSortOrders && this.perFolderSortOrders.hasOwnProperty(folderId + SUFFIX_FIELD);
}

static get(folderId: string) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please define the output type

}
const targetOwn = this.isSet(targetId);
let newOwn;
if (typeof own == 'undefined') {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

strict equality

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

finished. 00bc482

const SUFFIX_FIELD = '$field';
const SUFFIX_REVERSE = '$reverse';

export default class PerFolderSortOrderService {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for refactoring this into a class. Now that it's separate I guess it should be easier to unit test it too.

@laurent22
Copy link
Owner

laurent22 commented Oct 16, 2021

I don't know if it was due to my recent changes to the style, but the sort button is actually too tall:

image

Also the "A" button shoudl be the same size as the "New note" button on the right. The "arrow" part should have the same padding as the other buttons. So it means that the whole button will be wider.

Also I wonder if there should be an option to hide or show this button? I feel it's getting a bit cluttered in this area. But don't implement anything yet, perhaps ask on the forum what users think?

@ken1kob
Copy link
Contributor Author

ken1kob commented Oct 16, 2021

I don't know if it was due to my recent changes to the style, but the sort button is actually too tall:

Yes. It's affected by the recent change. I'll adapt them to v2.5.

It'll become as below.

image

Also I wonder if there should be an option to hide or show this button? I feel it's getting a bit cluttered in this area. But don't implement anything yet, perhaps ask on the forum what users think?

It's already implemented as in Detailed Features.

sort-order-options

@laurent22
Copy link
Owner

Yes. It's affected by the recent change. I'll adapt them to v2.5.

Yes thank you, it looks good like this. I think you can use size={ButtonSize.Small} to make it the right height.

It's already implemented as in Detailed Features.

Somehow I checked in the Appearance section but not the other ones. In fact I wonder if the Note section is right for this, since it's more about the notebooks? Perhaps create a new "Notebook" section for it?

Also could you please add a description for each field (in the Setting "description" field)?

Do we need the "Enable per-field sort order reversal" option actually? This is a very useful feature you've added there, and I think it could simply be on by default. In general there's no logical reason to always prefer reversal or always normal order - it depends, as you noted, on the field. So that's why I think your option could always be on by default.

@ken1kob
Copy link
Contributor Author

ken1kob commented Oct 16, 2021

Somehow I checked in the Appearance section but not the other ones. In fact I wonder if the Note section is right for this, since it's more about the notebooks? Perhaps create a new "Notebook" section for it?

Yes. I think Appearance is more appropriate for sort buttons, and Notebook is more suitable for the per-folder feature.
At first, I was very conservative and refrained from creating a new section just for this PR.

Also could you please add a description for each field (in the Setting "description" field)?

I see.

Do we need the "Enable per-field sort order reversal" option actually? This is a very useful feature you've added there, and I think it could simply be on by default.

I think so. I'll hide it from the option menu in the next commit.

- The size of Sort Order buttons is adjusted to fit to v2.5.
- Refactor PerFolderSortOrderService.ts
- Option of Sort Order buttons is move to Appearance section.
- Some descriptions about sort order settings are added.
@ken1kob
Copy link
Contributor Author

ken1kob commented Oct 17, 2021

Yes. It's affected by the recent change. I'll adapt them to v2.5.

Yes thank you, it looks good like this. I think you can use size={ButtonSize.Small} to make it the right height.

Yes. I think Appearance is more appropriate for sort buttons, and Notebook is more suitable for the per-folder feature.

Also could you please add a description for each field (in the Setting "description" field)?

I think so. I'll hide it from the option menu in the next commit.

finished. 00bc482

@ken1kob ken1kob requested a review from laurent22 October 17, 2021 02:54
Copy link
Owner

@laurent22 laurent22 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update @ken1kob.

Could you also get my commit there please?1ac8265
It is to fix the button size as it was growing and shrinking depending on the icon.

Also besides the comments I left below, could you add test units for PerFolderSortOrderSerice and notesSortOrderUtils please? You just need to test the public methods (which should indirectly test the private ones). If you need some help for this let me know, but you can check any of the ".test.ts" files to see how to set it up.

Comment on lines 796 to 797
label: () => _('Enable per-field sort order reversal'),
description: () => _('If true, normal or reverse is kept for each sort order field for notes.'),
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the setting is no longer public, the description should be removed (to avoid unecessary translations).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Finished. 54de991

value: true,
type: SettingItemType.Bool,
storage: SettingStorage.File,
section: 'notebook',
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shoudl be called "folder" (Always "folder" in code, always "notebook" in user strings).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Finished. 54de991

packages/lib/models/Setting.ts Show resolved Hide resolved
@@ -1954,6 +2015,7 @@ class Setting extends BaseModel {
if (name === 'sync') return _('Synchronisation');
if (name === 'appearance') return _('Appearance');
if (name === 'note') return _('Note');
if (name === 'notebook') return _('Notebook');
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"folder"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Finished. 54de991


export const declaration: CommandDeclaration = {
name: 'togglePerFolderSortOrder',
label: () => _('Toggle per-folder sort order'),
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"per-notebook".

But also, when the per-notebook option is not enabled on the notebook, this is actually like a global setting that applies not, per-notebook, but to all notebooks, is that correct?

I don't think we can convey all that info in this tooltip, so simply "Toggle sort order" would be sufficient (it's implied it's for the notebook).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But also, when the per-notebook option is not enabled on the notebook, this is actually like a global setting that applies not, per-notebook, but to all notebooks, is that correct?

When notes.perFolderSortOrderEnabled is false, this command has no effect, and it is as expected.

I don't think we can convey all that info in this tooltip, so simply "Toggle sort order" would be sufficient (it's implied it's for the notebook).

Since this feature is not very common, I'm afraid that too brevity introduces misunderstanding such as 'toggle sort order field (title/update time/create time/custom)'. I agree that "Toggle per-notebook sort order" is too long. How about "Toggle own sort order"?

@ken1kob
Copy link
Contributor Author

ken1kob commented Nov 1, 2021

Could you also get my commit there please? 1ac8265
It is to fix the button size as it was growing and shrinking depending on the icon.

Finished.

Also besides the comments I left below, could you add test units for PerFolderSortOrderSerice and notesSortOrderUtils please?

Finished. 903e000

@ken1kob ken1kob requested a review from laurent22 November 2, 2021 06:08
@laurent22
Copy link
Owner

Thanks @ken1kob but you've accidentally included unrelated commits in your latest change, so please remove these.

@laurent22
Copy link
Owner

laurent22 commented Nov 2, 2021

So the latest remaining issue is this one I guess: #5437 (comment) (putting it here so that's it not lost in the commits)

@ken1kob
Copy link
Contributor Author

ken1kob commented Nov 2, 2021

Thanks @ken1kob but you've accidentally included unrelated commits in your latest change, so please remove these.

Oops..., sorry. Fixed.

So the latest remaining issue is this one I guess: #5437 (comment) (putting it here so that's it not lost in the commits)

Yes. What's your favorite?

  • "Toggle sort order"
  • "Toggle per-notebook sort order"
  • "Toggle own sort order"

@laurent22
Copy link
Owner

To sum up, if I understand correctly, now the global option "perFolderSortOrderEnabled" does nothing since it's always enabled and cannot be disabled. Instead, users can opt-in if they want the per-notebook behaviour or not. If they don't opt-in, it uses the global settings. Is that correct?

I think just "Toggle sort order" is fine because it's hard to convey exactly what the button does in the tooltip. "Toggle own sort order" would not even be accurate if the "per-notebook" setting is not enabled for the notebook anyway, would it? It would actually be "Toggle global sort order", which means we'd need two different tooltips depending on the notebook state, but I don't think the command system currently supports this.

@ken1kob
Copy link
Contributor Author

ken1kob commented Nov 3, 2021

To sum up, if I understand correctly, now the global option "perFolderSortOrderEnabled" does nothing since it's always enabled and cannot be disabled.

Yes. Since I'm not sure that this new UI feature is accepted by everyone at this time, I would like to keep perFolderSortOrderEnabled setting for a while, even if it is enabled and has no UI to disable it. Advanced users can still enable/disable it through directly editing settings.json.
But, I'm not sticking to it.

Instead, users can opt-in if they want the per-notebook behaviour or not. If they don't opt-in, it uses the global settings. Is that correct?

Yes. I'll summarize here. For each context menu of a notebook in SideBar,

Setting perFolderSortOrderEnabled Context menu item ("Toggle per-notebook sort order") Used sort order
true enabled the notebook's own sort order
true disabled global (=shared) sort order
false N/A (not displayed) global (=shared) sort order

I think just "Toggle sort order" is fine because it's hard to convey exactly what the button does in the tooltip. "Toggle own sort order" would not even be accurate if the "per-notebook" setting is not enabled for the notebook anyway, would it? It would actually be "Toggle global sort order", which means we'd need two different tooltips depending on the notebook state, but I don't think the command system currently supports this.

Perhaps there is a misunderstanding. The context menu item is not for specifying sort order field and reverse, but for specifying only whether it uses its own sort order or global one. If perFolderSortOrderEnabled is false, the specification is meaningless, and thus, the context menu item is not displayed in the context menu.

In any case, I have no strong opinion among the three naming options and will accept your choice.

@laurent22
Copy link
Owner

Perhaps there is a misunderstanding. The context menu item is not for specifying sort order field and reverse, but for specifying only whether it uses its own sort order or global one.

Yes indeed I misunderstood - for some reason I thought it was the button tooltip, but since it's for the context menu item it's different. So you're right, "Toggle own sort order" would make sense for this. If you could just update this I think it's ready and we can add the feature for 2.6.

@ken1kob
Copy link
Contributor Author

ken1kob commented Nov 9, 2021

If you could just update this I think it's ready and we can add the feature for 2.6.

Finished.

@laurent22
Copy link
Owner

Brilliant, it's all good then. Many thanks for adding this very useful feature @ken1kob!

@laurent22 laurent22 merged commit f495db1 into laurent22:dev Nov 11, 2021
adarsh-sgh added a commit to adarsh-sgh/joplin that referenced this pull request Nov 12, 2021
commit 5cd4537
Author: Laurent Cozic <[email protected]>
Date:   Thu Nov 11 17:29:13 2021 +0000

    Server: Rename "ReadOnly" mode to "ReadAndClear" to avoid any confusion

commit ec8b9b8
Author: Kenichi Kobayashi <[email protected]>
Date:   Fri Nov 12 02:28:32 2021 +0900

    Desktop: Fixes laurent22#5694: Sync-scroll support for HTML notes (laurent22#5695)

commit 4bfb4db
Author: Laurent Cozic <[email protected]>
Date:   Thu Nov 11 16:36:43 2021 +0000

    Server: Fixed S3 connection string record in db

commit 4fc3bcb
Author: Laurent Cozic <[email protected]>
Date:   Thu Nov 11 16:32:34 2021 +0000

    Server: Fixed S3 storage connection and improved connectiob checks

commit 01826d9
Author: Laurent Cozic <[email protected]>
Date:   Thu Nov 11 16:31:37 2021 +0000

    ignore files

commit 73137cf
Author: Laurent Cozic <[email protected]>
Date:   Thu Nov 11 16:12:46 2021 +0000

    Server: Hide credentials from the log

commit b58ea0f
Author: Helmut K. C. Tessarek <[email protected]>
Date:   Thu Nov 11 10:50:15 2021 -0500

    Desktop: Add shortcut for bulleted list (laurent22#5698)

    Ref: https://discourse.joplinapp.org/t/shortcut-for-lists/21646

commit d7e0877
Author: Kenichi Kobayashi <[email protected]>
Date:   Fri Nov 12 00:43:32 2021 +0900

    Desktop: Resolves laurent22#4827, Resolves laurent22#5652: Fixed and improve laggy scroll in text editor (laurent22#5606)

commit f495db1
Author: Kenichi Kobayashi <[email protected]>
Date:   Fri Nov 12 00:33:37 2021 +0900

    Desktop: Sort Order Buttons and Per-Notebook Sort Order (laurent22#5437)

commit e4d5e9c
Author: Kenichi Kobayashi <[email protected]>
Date:   Fri Nov 12 00:31:20 2021 +0900

    Desktop: Fixes laurent22#5582: Currently opened note is not updated after sync (5582) (laurent22#5711)

commit 72f336a
Author: Laurent Cozic <[email protected]>
Date:   Thu Nov 11 15:24:21 2021 +0000

    Server v2.6.8

commit dfa5f8b
Author: Laurent Cozic <[email protected]>
Date:   Thu Nov 11 15:21:27 2021 +0000

    Server: Fixed S3 configuration

commit 3cdbd6d
Author: Laurent Cozic <[email protected]>
Date:   Thu Nov 11 14:44:06 2021 +0000

    Server v2.6.7

commit c6dec0a
Author: Laurent Cozic <[email protected]>
Date:   Thu Nov 11 14:40:23 2021 +0000

    Server: Added command to test a storage connection

commit 4879edc
Author: Laurent Cozic <[email protected]>
Date:   Thu Nov 11 14:06:27 2021 +0000

    Server v2.6.6

commit 005f720
Author: Laurent Cozic <[email protected]>
Date:   Thu Nov 11 13:59:05 2021 +0000

    Server: Added command to migrate content to different storage

commit 725c79d
Author: Laurent Cozic <[email protected]>
Date:   Wed Nov 10 15:40:32 2021 +0000

    Desktop: Fixed button to upgrade a master key

commit 0de6e9e
Author: Laurent Cozic <[email protected]>
Date:   Wed Nov 10 14:47:26 2021 +0000

    All: Fixed issue that could cause application to needlessly lock the sync target

commit 7c3785e
Author: Laurent Cozic <[email protected]>
Date:   Wed Nov 10 12:51:41 2021 +0000

    Doc: Update privacy policy

commit 5c2a0ed
Author: Laurent Cozic <[email protected]>
Date:   Wed Nov 10 12:20:43 2021 +0000

    Doc: Update privacy policy

commit fc64c82
Author: Laurent Cozic <[email protected]>
Date:   Wed Nov 10 12:08:10 2021 +0000

    Server v2.6.5

commit 08f420c
Merge: d76646a cc23a8b
Author: Laurent Cozic <[email protected]>
Date:   Wed Nov 10 12:07:32 2021 +0000

    Merge branch 'dev' into release-2.6

commit cc23a8b
Author: Laurent Cozic <[email protected]>
Date:   Tue Nov 9 16:12:29 2021 +0000

    Server v2.6.4

commit 9ffa29f
Author: Laurent Cozic <[email protected]>
Date:   Wed Nov 10 12:03:45 2021 +0000

    Chore: Add tests for storage driver loading

commit 7431da9
Author: Laurent Cozic <[email protected]>
Date:   Wed Nov 10 11:48:06 2021 +0000

    Server: Lazy-load storage drivers

commit 4deeed0
Author: Laurent Cozic <[email protected]>
Date:   Tue Nov 9 18:33:28 2021 +0000

    Desktop, Mobile: Fixes laurent22#5687: Fixed issue with parts of HTML notes not being displayed in some cases

commit f8d9601
Author: Laurent Cozic <[email protected]>
Date:   Tue Nov 9 17:49:05 2021 +0000

    Tools: Restored HTML to ENEX tests that had been deleted in a refactoring

commit 89179c2
Author: Laurent Cozic <[email protected]>
Date:   Tue Nov 9 16:42:50 2021 +0000

    Desktop, Cli: Add support for more style of highlighted texts when importing ENEX files

commit d76646a
Author: Laurent Cozic <[email protected]>
Date:   Tue Nov 9 16:12:29 2021 +0000

    Server v2.6.4

commit 485c0d0
Author: Laurent <[email protected]>
Date:   Tue Nov 9 16:05:42 2021 +0000

    Server: Allow storing item content in database, filesystem or S3 (depending on config) (laurent22#5602)

commit 6b31609
Author: agerardin <[email protected]>
Date:   Tue Nov 9 10:50:50 2021 -0500

    Plugins: Allow posting messages from plugin to webview (laurent22#5569)

commit 200ba85
Author: Kenichi Kobayashi <[email protected]>
Date:   Wed Nov 10 00:47:25 2021 +0900

    Deskop: Fixes flickering when switching notes while the Note Search Bar is visible (laurent22#5548)

commit 7b3ad32
Author: Laurent Cozic <[email protected]>
Date:   Tue Nov 9 15:28:38 2021 +0000

    Update translations

commit 3745cd7
Author: Laurent Cozic <[email protected]>
Date:   Tue Nov 9 15:26:45 2021 +0000

    Tools: Do not process context when running build-translation tool

commit 920f2d9
Author: Laurent Cozic <[email protected]>
Date:   Tue Nov 9 13:49:20 2021 +0000

    Revert "Update translations"

    This reverts commit f800ca0.

    Reverting for now due to some translations being incorrectly marked as
    fuzzy.

commit f800ca0
Author: Laurent Cozic <[email protected]>
Date:   Tue Nov 9 13:16:09 2021 +0000

    Update translations

commit 33be306
Author: Laurent Cozic <[email protected]>
Date:   Tue Nov 9 13:14:41 2021 +0000

    Tools: Fixed missing translations when running build-translation tool

commit 3782255
Author: Laurent Cozic <[email protected]>
Date:   Tue Nov 9 12:20:07 2021 +0000

    Tools: Fixed build-translation script to handle .ts and .tsx files directly

commit 0ab2352
Author: Laurent <[email protected]>
Date:   Mon Nov 8 17:10:33 2021 +0000

    Tools: Detect missing translation strings on CI (laurent22#5688)

commit 7525661
Author: Laurent Cozic <[email protected]>
Date:   Mon Nov 8 15:38:44 2021 +0000

    Security: Ensure Markdown links that contain single quotes are correctly escaped

commit b328094
Author: Helmut K. C. Tessarek <[email protected]>
Date:   Mon Nov 8 10:30:18 2021 -0500

    update en_US.po

commit 4f0f1af
Author: Helmut K. C. Tessarek <[email protected]>
Date:   Mon Nov 8 10:22:08 2021 -0500

    Update translations

commit 021ce14
Author: Laurent Cozic <[email protected]>
Date:   Mon Nov 8 15:21:20 2021 +0000

    Server v2.6.3

commit c4017e5
Author: Laurent Cozic <[email protected]>
Date:   Mon Nov 8 10:00:11 2021 +0000

    Fixed a few strings

commit ec2c174
Author: Laurent Cozic <[email protected]>
Date:   Sun Nov 7 17:36:48 2021 +0000

    Tools: Fixed package version numbers

commit 3e5ad0a
Author: Laurent Cozic <[email protected]>
Date:   Sun Nov 7 16:41:39 2021 +0000

    Desktop, Cli: Fixes laurent22#5653: Long resource filenames were being incorrectly cut

commit 05e390d
Author: Laurent Cozic <[email protected]>
Date:   Sun Nov 7 15:41:04 2021 +0000

    Tools: Fixed build-translation script

commit 31ce0f4
Author: Laurent Cozic <[email protected]>
Date:   Sun Nov 7 11:55:34 2021 +0000

    Tools: Show more info in IOS release script

commit d19551b
Author: Laurent Cozic <[email protected]>
Date:   Sun Nov 7 11:55:11 2021 +0000

    Chore: Set correct iOS version ID

commit dacd697
Author: Laurent Cozic <[email protected]>
Date:   Sun Nov 7 11:53:39 2021 +0000

    iOS: Fixes laurent22#5671: Fixed iOS 12 crash that prevents the app from starting

commit 70d5c7a
Author: Laurent Cozic <[email protected]>
Date:   Fri Nov 5 12:17:05 2021 +0000

    Server: Set resource content size when viewing published note

commit 42caab6
Author: Daniel Bretoi <[email protected]>
Date:   Sat Nov 6 21:32:18 2021 -0700

    Doc: CLI: update to include local filesystem sync (laurent22#5684)

    * terminal doc update to include local filesystem sync

    * fix typo

commit 01b63ad
Author: NiceYoyo <[email protected]>
Date:   Sun Nov 7 05:30:04 2021 +0100

    All: Translation: Update de_DE.po (laurent22#5682)

    * Update de_DE.po

    * Update de_DE.po

commit ae4013d
Author: felipeviggiano <[email protected]>
Date:   Sun Nov 7 01:29:38 2021 -0300

    All: Translation: Update pt_BR.po (laurent22#5680)

    * Updates on pt_BR.po file

    * Updates on pt_BR.po file

commit 298e85f
Author: Laurent Cozic <[email protected]>
Date:   Thu Nov 4 16:43:34 2021 +0000

    iOS: Set min supported iOS version to 13.0

commit 9e1cb9d
Author: Laurent Cozic <[email protected]>
Date:   Thu Nov 4 12:49:51 2021 +0000

    Server: Immediately ask user to set password after Stripe checkout

commit 373c041
Author: Laurent Cozic <[email protected]>
Date:   Wed Nov 3 17:39:30 2021 +0000

    Doc: Fixed H3 header size

commit af19865
Author: Laurent <[email protected]>
Date:   Wed Nov 3 16:24:40 2021 +0000

    All, Server: Add support for sharing notes when E2EE is enabled (laurent22#5529)

commit a0d2304
Author: Laurent Cozic <[email protected]>
Date:   Wed Nov 3 15:20:17 2021 +0000

    Migration can be null

commit 7ad73df
Author: Laurent Cozic <[email protected]>
Date:   Wed Nov 3 15:18:20 2021 +0000

    Server: Display latest migration name after auto-migration

commit ce5c5d6
Author: Laurent Cozic <[email protected]>
Date:   Wed Nov 3 14:00:16 2021 +0000

    Server: Disable mailer service if no-reply email is not set

commit 8c6d78e
Merge: a65c424 e6d3396
Author: Laurent Cozic <[email protected]>
Date:   Wed Nov 3 12:55:28 2021 +0000

    Merge branch 'dev' into release-2.6

commit a65c424
Author: Laurent Cozic <[email protected]>
Date:   Wed Nov 3 12:55:01 2021 +0000

    Server v2.6.2

commit e6d3396
Author: Laurent Cozic <[email protected]>
Date:   Wed Nov 3 12:54:08 2021 +0000

    lock files

commit 190550f
Author: Laurent Cozic <[email protected]>
Date:   Wed Nov 3 12:53:25 2021 +0000

    Tools: Fixed server tests

commit 030b18d
Author: Laurent Cozic <[email protected]>
Date:   Wed Nov 3 12:27:39 2021 +0000

    Desktop release v2.6.1

commit f1bfcfd
Author: Laurent Cozic <[email protected]>
Date:   Wed Nov 3 12:27:28 2021 +0000

    Server v2.6.1

commit 47a31c4
Author: Laurent <[email protected]>
Date:   Wed Nov 3 12:26:26 2021 +0000

    All, Server: Add support for faster built-in sync locks (laurent22#5662)

commit 630a400
Author: Kenichi Kobayashi <[email protected]>
Date:   Wed Nov 3 21:10:46 2021 +0900

    Desktop: Resolves laurent22#2242: Implements Sync-Scroll for Markdown Editor and Viewer (laurent22#5512)

commit 725abbc
Author: Laurent Cozic <[email protected]>
Date:   Wed Nov 3 11:44:43 2021 +0000

    Update website

commit 84ec845
Author: Laurent Cozic <[email protected]>
Date:   Wed Nov 3 11:34:14 2021 +0000

    CLI v2.6.1

commit 5892a06
Author: Laurent Cozic <[email protected]>
Date:   Wed Nov 3 11:18:03 2021 +0000

    Releasing sub-packages

commit cb26ab4
Author: Laurent Cozic <[email protected]>
Date:   Wed Nov 3 11:15:51 2021 +0000

    Tools: Trying to fix Lerna publishing with automation token

commit 74fcd47
Author: Laurent Cozic <[email protected]>
Date:   Wed Nov 3 11:10:06 2021 +0000

    Releasing sub-packages

commit c7406f3
Author: Laurent Cozic <[email protected]>
Date:   Tue Nov 2 20:56:26 2021 +0000

    Android 2.6.1

commit d22a29e
Author: Laurent Cozic <[email protected]>
Date:   Tue Nov 2 15:25:42 2021 +0000

    ios-v12.5.1

commit bcd568a
Author: Laurent Cozic <[email protected]>
Date:   Tue Nov 2 20:07:13 2021 +0000

    Setup new release 2.6

commit 66e79cc
Author: Laurent Cozic <[email protected]>
Date:   Tue Nov 2 16:33:53 2021 +0000

    Mobile: Upgraded React Native from 0.64 to 0.66

commit 08ee2b2
Merge: b5d792c 57b8aa1
Author: Laurent Cozic <[email protected]>
Date:   Tue Nov 2 14:47:19 2021 +0000

    Merge branch 'release-2.5' into dev

commit 57b8aa1
Author: Laurent Cozic <[email protected]>
Date:   Tue Nov 2 14:46:52 2021 +0000

    Server v2.5.10

commit b5d792c
Author: Laurent Cozic <[email protected]>
Date:   Tue Nov 2 12:51:59 2021 +0000

    Server: Improved env variable handling to make it self documenting and enforce type checking

commit 3704413
Author: Laurent Cozic <[email protected]>
Date:   Mon Nov 1 19:20:36 2021 +0000

    Server: Improved logging and rendering of low level middleware errors

commit c491741
Author: Laurent Cozic <[email protected]>
Date:   Mon Nov 1 07:57:10 2021 +0000

    Doc: Added forum assets

commit b80242d
Author: Laurent Cozic <[email protected]>
Date:   Mon Nov 1 07:41:36 2021 +0000

    Desktop release v2.5.10

commit 59ea52f
Merge: 3813b10 1eda835
Author: Laurent Cozic <[email protected]>
Date:   Mon Nov 1 07:41:18 2021 +0000

    Merge branch 'dev' into release-2.5

commit 1eda835
Author: Laurent Cozic <[email protected]>
Date:   Mon Nov 1 00:52:32 2021 +0000

    Desktop release v2.5.9

commit 6012783
Author: Laurent Cozic <[email protected]>
Date:   Mon Nov 1 07:38:06 2021 +0000

    Desktop: Fixed crash on certain Linux distributions when importing or exporting a file

    Ref: https://discourse.joplinapp.org/t/20702/37

commit 3813b10
Author: Laurent Cozic <[email protected]>
Date:   Mon Nov 1 00:52:32 2021 +0000

    Desktop release v2.5.9

commit c5569ef
Author: Laurent Cozic <[email protected]>
Date:   Sun Oct 31 18:33:06 2021 +0000

    All: Fixed potential infinite loop when Joplin Server session is invalid

commit 401f1b1
Author: Laurent Cozic <[email protected]>
Date:   Sun Oct 31 18:31:40 2021 +0000

    Tools: Fixed tests when using Joplin Server as sync target

commit 99ea4b7
Author: Laurent Cozic <[email protected]>
Date:   Sun Oct 31 18:29:47 2021 +0000

    Server: Fixed issue that could cause server to return empty items in some rare cases

commit 22d472d
Author: Laurent Cozic <[email protected]>
Date:   Sun Oct 31 17:36:54 2021 +0000

    Tools: Added testing command to create many items in parallel

commit ab86812
Author: Laurent Cozic <[email protected]>
Date:   Sun Oct 31 11:39:12 2021 +0000

    Update website

commit b678d20
Author: Laurent Cozic <[email protected]>
Date:   Sun Oct 31 11:25:07 2021 +0000

    Android 2.5.5

commit 1f96eb7
Author: Laurent Cozic <[email protected]>
Date:   Sun Oct 31 10:38:11 2021 +0000

    Lock files

commit e453cd3
Author: Laurent Cozic <[email protected]>
Date:   Sun Oct 31 10:35:26 2021 +0000

    Tools: Build app before releasing Android app

commit 232128c
Author: Laurent Cozic <[email protected]>
Date:   Sun Oct 31 10:29:15 2021 +0000

    Android 2.5.4

commit dbdb82d
Author: Laurent Cozic <[email protected]>
Date:   Sun Oct 31 10:05:33 2021 +0000

    Desktop release v2.5.8

commit 14ddf40
Author: Laurent Cozic <[email protected]>
Date:   Sun Oct 31 10:03:37 2021 +0000

    Fixed French translation

commit 4128be9
Author: Laurent Cozic <[email protected]>
Date:   Sun Oct 31 09:32:08 2021 +0000

    Mobile: Capitalise first word of sentence in beta editor

commit 8de9032
Author: Brett Bender <[email protected]>
Date:   Sat Oct 30 10:00:01 2021 -0700

    Deskop: Fixed shortcut to focus the note body (laurent22#5597)

commit 0b01b5b
Author: Laurent Cozic <[email protected]>
Date:   Sat Oct 30 17:51:19 2021 +0100

    Desktop, Mobile: Resolves laurent22#5593: Enable safe mode for Markdown editor too

commit aa3cbbd
Author: Laurent Cozic <[email protected]>
Date:   Sat Oct 30 17:47:16 2021 +0100

    Desktop, Mobile: Fixes laurent22#5593: Do not render very large code blocks to prevent app from freezing

commit 2d1a6da
Author: Laurent Cozic <[email protected]>
Date:   Sat Oct 30 15:20:26 2021 +0100

    Revert "Desktop: Upgrade to Electron 15.1.3"

    No longer necessary because it was to try to fix this bug, but it
    doesn't fix it:

    https://discourse.joplinapp.org/t/20702/32

    This reverts commit 9704b29.

commit 365e152
Author: Laurent Cozic <[email protected]>
Date:   Sat Oct 30 11:51:40 2021 +0100

    Mobile: Add padding around beta text editor

commit 6393996
Author: Andreas Deininger <[email protected]>
Date:   Sat Oct 30 11:45:02 2021 +0200

    Doc: Fixing typos (laurent22#5644)

commit f7a18ba
Author: Laurent Cozic <[email protected]>
Date:   Sat Oct 30 10:37:56 2021 +0100

    Server: Add unique constraint on name and owner ID of items table

    In theory, the server enforces uniquness because when doing a PUT
    operation it either creates the items if it doesn't exist, or overwrite
    it. However, there's race condition that makes it possible for multiple
    items with the same name being created per user. So we add this
    constraint to ensure that any additional query would fail (which can be
    recovered by repeating the request).

commit bb06e56
Author: Laurent Cozic <[email protected]>
Date:   Fri Oct 29 18:47:11 2021 +0100

    Added better-sqlite database driver, although we cannot use it for now

commit 4e1f315
Author: Laurent Cozic <[email protected]>
Date:   Fri Oct 29 12:12:30 2021 +0100

    Desktop release v2.5.7

commit 9704b29
Author: Laurent Cozic <[email protected]>
Date:   Fri Oct 29 12:11:25 2021 +0100

    Desktop: Upgrade to Electron 15.1.3

commit 2133193
Author: Laurent Cozic <[email protected]>
Date:   Thu Oct 28 23:09:16 2021 +0100

    Android 2.5.3

commit 7d70dea
Author: Laurent Cozic <[email protected]>
Date:   Thu Oct 28 22:27:47 2021 +0100

    Desktop release v2.5.6

commit e247be1
Author: Laurent Cozic <[email protected]>
Date:   Thu Oct 28 22:25:27 2021 +0100

    Desktop: Fixed default migration logic

commit 9704e75
Author: Laurent Cozic <[email protected]>
Date:   Thu Oct 28 21:23:40 2021 +0100

    Android 2.5.2

commit e4403d4
Author: Laurent Cozic <[email protected]>
Date:   Thu Oct 28 20:56:40 2021 +0100

    Desktop release v2.5.5

commit 251400c
Author: Laurent Cozic <[email protected]>
Date:   Thu Oct 28 20:44:25 2021 +0100

    Server v2.5.9

commit 6c6e2a6
Merge: 3359ea3 4a2af32
Author: Laurent Cozic <[email protected]>
Date:   Thu Oct 28 20:43:14 2021 +0100

    Merge branch 'dev' into release-2.5

commit 4a2af32
Author: Laurent Cozic <[email protected]>
Date:   Thu Oct 28 20:41:46 2021 +0100

    Server: Remove session expiration for now

commit 9d88324
Author: milotype <[email protected]>
Date:   Thu Oct 28 18:23:52 2021 +0200

    All: Translation: Update hr_HR.po (laurent22#5640)

    … this time with Poedit ;-)

commit e0a12c7
Author: Daeraxa <[email protected]>
Date:   Thu Oct 28 17:20:44 2021 +0100

    Doc: Add section about restoreNoteRevision command to FAQ for note restoration (laurent22#5638)

    * docs: add section about restoreNoteRevision command to restore accidentally deleted notes

    * docs:add link to wiki post

commit 3359ea3
Author: Laurent Cozic <[email protected]>
Date:   Thu Oct 28 17:07:44 2021 +0100

    Server v2.5.8

commit 2cbcfa5
Author: Laurent Cozic <[email protected]>
Date:   Thu Oct 28 17:06:16 2021 +0100

    Slow down migration

commit 0a7fdac
Author: Laurent Cozic <[email protected]>
Date:   Wed Oct 27 19:40:32 2021 +0100

    Server v2.5.7

commit a753429
Author: Laurent Cozic <[email protected]>
Date:   Wed Oct 27 19:38:45 2021 +0100

    Server: Fixed items.owner_id migration

commit dca13b3
Author: Laurent Cozic <[email protected]>
Date:   Wed Oct 27 19:29:54 2021 +0100

    Server: Moved CLI commands to separate files

commit 5c1cef8
Author: Nicholas Axel <[email protected]>
Date:   Thu Oct 28 01:15:38 2021 +0700

    All: Translation: Update id_ID.po (laurent22#5625)

    * Updated Indonesian

    Fixed some translations
    Added some missing translations

    * Add files via upload

    * Add files via upload

    * Add files via upload

commit 9ba90b5
Author: Laurent Cozic <[email protected]>
Date:   Wed Oct 27 16:39:45 2021 +0100

    Server: Fixed Stripe portal page redirection

commit f1c4d35
Author: Laurent Cozic <[email protected]>
Date:   Wed Oct 27 16:31:19 2021 +0100

    Server: Fixed owner_id migration for SQLite

commit b0e3e1b
Author: Laurent Cozic <[email protected]>
Date:   Wed Oct 27 16:21:21 2021 +0100

    Server v2.5.6

commit b655f27
Author: Laurent Cozic <[email protected]>
Date:   Wed Oct 27 16:18:42 2021 +0100

    Server: Added item owner ID, and allow disabling db auto-migrations

commit 0ada1df
Author: Laurent Cozic <[email protected]>
Date:   Tue Oct 26 12:34:22 2021 +0100

    Server: Expire sessions after 12 hours

commit 134bc91
Author: theCollectiv <[email protected]>
Date:   Tue Oct 26 13:01:12 2021 +0200

    Doc: Mention that drag and drop can be used to create a link to a note (laurent22#5629)

commit 33249ca
Author: Laurent Cozic <[email protected]>
Date:   Mon Oct 25 19:46:45 2021 +0100

    All: Improved handling of expired sessions when using Joplin Server

commit ace1118
Author: Laurent Cozic <[email protected]>
Date:   Mon Oct 25 17:49:38 2021 +0100

    All: Improved handling of expired sessions when using Joplin Server

commit b497177
Author: Laurent Cozic <[email protected]>
Date:   Mon Oct 25 17:36:40 2021 +0100

    Server: Delete all sessions when a password is changed or reset

commit 82227b2
Author: Laurent Cozic <[email protected]>
Date:   Mon Oct 25 16:49:21 2021 +0100

    Doc: Improved caching of asset URLs

commit 2d85363
Author: Laurent Cozic <[email protected]>
Date:   Mon Oct 25 16:24:14 2021 +0100

    Update website

commit 6714b37
Author: Laurent Cozic <[email protected]>
Date:   Mon Oct 25 16:22:16 2021 +0100

    Doc: Added Hosting.de sponsor

commit 1a90ad3
Author: Piotr Kowalski <[email protected]>
Date:   Mon Oct 25 13:31:01 2021 +0200

    Server: Fixed display of latest migration in startup log (laurent22#5627)

commit 17cf9b3
Author: Laurent Cozic <[email protected]>
Date:   Sun Oct 24 19:13:56 2021 +0100

    Tools: Improved desktop app runForTesting script

commit 22e5c3a
Author: Laurent Cozic <[email protected]>
Date:   Sun Oct 24 19:12:25 2021 +0100

    Desktop: Fixed Goto Anything scrolling for long lists

commit 72c1235
Author: Laurent Cozic <[email protected]>
Date:   Sun Oct 24 14:00:44 2021 +0100

    All: Improved Joplin Server configuration check to better handle disabled accounts

commit 2db886a
Author: Roman Musin <[email protected]>
Date:   Sun Oct 24 13:02:37 2021 +0100

    Doc: Update node version in BUILD.md (laurent22#5616)

    * Update node version in BUILD.md

    Apparently node 16.0.0 may not work, see laurent22#5608

    * Update BUILD.md

    * Change node 16.11 -> node 14

commit 2f09f88
Author: Laurent Cozic <[email protected]>
Date:   Sun Oct 24 12:22:49 2021 +0100

    Server: Run oversized account task more frequently

commit bc5a853
Author: Laurent Cozic <[email protected]>
Date:   Sun Oct 24 12:17:59 2021 +0100

    Server: Improved task service log entries

commit 643bddf
Author: Laurent Cozic <[email protected]>
Date:   Sun Oct 24 11:37:16 2021 +0100

    Added comments

commit d4a0322
Author: Laurent Cozic <[email protected]>
Date:   Sat Oct 23 21:58:53 2021 +0100

    Server v2.5.5

commit 82f7052
Author: Laurent Cozic <[email protected]>
Date:   Sat Oct 23 21:57:45 2021 +0100

    Tools: Fixing server Docker image build

commit cbbaad9
Author: Laurent Cozic <[email protected]>
Date:   Sat Oct 23 20:10:04 2021 +0100

    Server v2.5.4

commit 4659d57
Author: Laurent Cozic <[email protected]>
Date:   Sat Oct 23 20:08:56 2021 +0100

    Tools: Fixing server Docker image build

commit 46a4ed0
Author: Laurent Cozic <[email protected]>
Date:   Sat Oct 23 18:23:45 2021 +0100

    Server v2.5.3

commit 56454f4
Author: Laurent Cozic <[email protected]>
Date:   Sat Oct 23 18:06:14 2021 +0100

    Doc: Updated Font Awesome and added link to Mastodon feed

commit 169b585
Author: Laurent Cozic <[email protected]>
Date:   Sat Oct 23 17:51:44 2021 +0100

    Server: Added tool to delete old changes

commit a75eba1
Author: WestfalenYeti <[email protected]>
Date:   Fri Oct 22 16:21:39 2021 +0200

    Linux: Fixes laurent22#5568: Adds 'sort' to pre-release version list (laurent22#5588)

    Added a 'sort by version number' to the handling of the version list when prerelease parameter ist set.
    (Assumes the latest pre-release version has a highest version number)

commit 375214a
Author: sleepntsheep <[email protected]>
Date:   Fri Oct 22 00:56:40 2021 +0700

    All: Translation: Update th_TH.po (laurent22#5609)

    Co-authored-by: sleepntsheep <[email protected]>

commit 2a004dd
Author: Helmut K. C. Tessarek <[email protected]>
Date:   Wed Oct 20 11:56:03 2021 -0400

    All: Translation: Update da_DK.po (thanks ERYpTION)

commit 843e407
Author: Laurent Cozic <[email protected]>
Date:   Tue Oct 19 17:51:15 2021 +0100

    Doc: Added complete logo in different formats

commit 04b8204
Author: Laurent Cozic <[email protected]>
Date:   Tue Oct 19 12:53:11 2021 +0100

    android-2.5.1

commit 0188824
Merge: 6eced7e 72db8e4
Author: Laurent Cozic <[email protected]>
Date:   Tue Oct 19 11:13:38 2021 +0100

    Merge branch 'dev' into release-2.5

commit 72db8e4
Author: Laurent Cozic <[email protected]>
Date:   Mon Oct 18 12:37:25 2021 +0100

    All: Added mechanism to migrate default settings to new values

commit 7d62df8
Author: Laurent Cozic <[email protected]>
Date:   Sun Oct 17 19:08:34 2021 +0100

    Desktop: Improved master password state handling in Encryption screen

commit 6eced7e
Author: Laurent Cozic <[email protected]>
Date:   Sun Oct 17 18:52:35 2021 +0100

    Desktop release v2.5.4

commit 8d09ed3
Author: Laurent Cozic <[email protected]>
Date:   Sun Oct 17 18:50:56 2021 +0100

    Fixed package path

commit b891915
Author: Laurent Cozic <[email protected]>
Date:   Sun Oct 17 17:45:10 2021 +0100

    Desktop release v2.5.3

commit 1406d97
Author: Laurent Cozic <[email protected]>
Date:   Sun Oct 17 17:20:59 2021 +0100

    Mobile: Fixes laurent22#5585: Fixed logic of setting master password in Encryption screen

commit a5560a6
Author: Laurent Cozic <[email protected]>
Date:   Sun Oct 17 16:13:12 2021 +0100

    Fixed mobile package

commit 21a7149
Author: Laurent Cozic <[email protected]>
Date:   Sun Oct 17 14:54:48 2021 +0100

    Fixed mobile build

commit 176d328
Author: Laurent Cozic <[email protected]>
Date:   Sun Oct 17 14:50:35 2021 +0100

    ignore files

commit 6bcd801
Author: Laurent Cozic <[email protected]>
Date:   Sat Oct 16 12:19:19 2021 +0100

    Fixed interface

commit 5e6e1bf
Author: Kingsley Yung <[email protected]>
Date:   Sat Oct 16 19:19:53 2021 +0800

    Cli: Fixes laurent22#5341: Ignore newline between quotes while spliting batch (laurent22#5540)

commit 1d46d9f
Author: Kenichi Kobayashi <[email protected]>
Date:   Sat Oct 16 19:44:02 2021 +0900

    Desktop: Resolves laurent22#4827: Laggy scrolling in Markdown viewer (laurent22#5496)

commit 6879481
Author: Roman Musin <[email protected]>
Date:   Sat Oct 16 10:07:41 2021 +0100

     Desktop: Resolves laurent22#5168: Add support for callback URLs (laurent22#5416)

commit 4322acc
Author: Filip Stanis <[email protected]>
Date:   Sat Oct 16 10:04:53 2021 +0100

    Doc: Update link to React Native docs (laurent22#5570)

commit 2acd55e
Author: Caleb John <[email protected]>
Date:   Sat Oct 16 01:59:37 2021 -0700

    Desktop, Cli: Resolves laurent22#5224: Add Markdown + Front Matter exporter/importer (laurent22#5465)
@laurent22
Copy link
Owner

Now that I'm trying the feature I realise you were right about the toolbar button tooltip. Having something like "Toggle sort order: Creation date" for example would help to know what each icon means.

@ken1kob
Copy link
Contributor Author

ken1kob commented Dec 13, 2021

@laurent22
Copy link
Owner

Yes that would be great if you could do that. Maybe in a new pull request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
desktop All desktop platforms
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants