From 9f0def64f3a84c668866217ed4c64b5666f515fa Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Thu, 9 Dec 2021 10:22:32 +0100 Subject: [PATCH 1/5] Desktop release v2.6.3 --- packages/app-desktop/package-lock.json | 4 ++-- packages/app-desktop/package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/app-desktop/package-lock.json b/packages/app-desktop/package-lock.json index c468b1d95..f793e7eb7 100644 --- a/packages/app-desktop/package-lock.json +++ b/packages/app-desktop/package-lock.json @@ -1,12 +1,12 @@ { "name": "@joplin/app-desktop", - "version": "2.6.2", + "version": "2.6.3", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@joplin/app-desktop", - "version": "2.6.2", + "version": "2.6.3", "license": "MIT", "dependencies": { "@electron/remote": "^2.0.1", diff --git a/packages/app-desktop/package.json b/packages/app-desktop/package.json index c69e45106..247bbb77d 100644 --- a/packages/app-desktop/package.json +++ b/packages/app-desktop/package.json @@ -1,6 +1,6 @@ { "name": "@joplin/app-desktop", - "version": "2.6.2", + "version": "2.6.3", "description": "Joplin for Desktop", "main": "main.js", "private": true, From 4b6210802b3e1cc5611d311d2f7313713c5bdf10 Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Thu, 9 Dec 2021 20:18:04 +0100 Subject: [PATCH 2/5] Tools: Trying to go back to windows-2016 to fix CI build --- .github/workflows/github-actions-main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-actions-main.yml b/.github/workflows/github-actions-main.yml index 00f24c35f..759a06b43 100644 --- a/.github/workflows/github-actions-main.yml +++ b/.github/workflows/github-actions-main.yml @@ -5,7 +5,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [macos-latest, ubuntu-latest, windows-latest] + os: [macos-latest, ubuntu-latest, windows-2016] steps: # Silence apt-get update errors (for example when a module doesn't From 9767b659c2100f262bb6b95fdd5199e71022066c Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Thu, 9 Dec 2021 20:18:17 +0100 Subject: [PATCH 3/5] Desktop release v2.6.4 --- packages/app-desktop/package-lock.json | 4 ++-- packages/app-desktop/package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/app-desktop/package-lock.json b/packages/app-desktop/package-lock.json index f793e7eb7..91810ff99 100644 --- a/packages/app-desktop/package-lock.json +++ b/packages/app-desktop/package-lock.json @@ -1,12 +1,12 @@ { "name": "@joplin/app-desktop", - "version": "2.6.3", + "version": "2.6.4", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@joplin/app-desktop", - "version": "2.6.3", + "version": "2.6.4", "license": "MIT", "dependencies": { "@electron/remote": "^2.0.1", diff --git a/packages/app-desktop/package.json b/packages/app-desktop/package.json index 247bbb77d..d2d110be8 100644 --- a/packages/app-desktop/package.json +++ b/packages/app-desktop/package.json @@ -1,6 +1,6 @@ { "name": "@joplin/app-desktop", - "version": "2.6.3", + "version": "2.6.4", "description": "Joplin for Desktop", "main": "main.js", "private": true, From 78c5877c65f5e4ee7ddf41939bb4f1f2c86d76ef Mon Sep 17 00:00:00 2001 From: Daeraxa <58074586+Daeraxa@users.noreply.github.com> Date: Fri, 10 Dec 2021 18:34:55 +0000 Subject: [PATCH 4/5] Docs: Added richtext editor improvement ideas (#5848) --- readme/gsoc2022/ideas.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/readme/gsoc2022/ideas.md b/readme/gsoc2022/ideas.md index 4bfde14f7..86b17714c 100644 --- a/readme/gsoc2022/ideas.md +++ b/readme/gsoc2022/ideas.md @@ -70,6 +70,17 @@ Difficulty Level: High Skills Required: TypeScript, JavaScript, React Native, React Hooks. You'll also need to learn about CodeMirror 6 if you're not already familiar with it. +## 6. Improve integration of the richtext/WYSIWYG editor + +Joplin offers a richtext/WYSIWYG typing experience alongside the Markdown editor but there are a number of areas that could do with improvement when it comes to integration with Joplin as a whole. + +Areas for consideration include increasing compatibility with Joplin-wide keybindings (many are currently static), limiting features of the editor not compatible with markdown formatting, reducing the impact of data changes caused by swapping between editors. +Also read the document about limitations of the editor: [https://joplinapp.org/rich_text_editor/](https://joplinapp.org/rich_text_editor/) + +Difficulty level: High + +Skills Required: Typescript, Javascript, CSS, HTML, Markdown rendering. You will also need to learn about TinyMCE if you're not already familiar with it. + # More info - Make sure you read the [Joplin Google Summer of Code Introduction](https://joplinapp.org/gsoc2022/index/) From e0e93c436bd12b50ceb7f06ec67d63d425d95030 Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Mon, 13 Dec 2021 10:32:22 +0100 Subject: [PATCH 5/5] All: Fixed "Invalid lock client type" error when migrating sync target --- packages/app-cli/app/command-sync.ts | 3 ++- packages/lib/Synchronizer.ts | 16 +++++----------- .../lib/services/synchronizer/LockHandler.ts | 8 ++++++++ .../synchronizer/gui/useSyncTargetUpgrade.ts | 3 ++- 4 files changed, 17 insertions(+), 13 deletions(-) diff --git a/packages/app-cli/app/command-sync.ts b/packages/app-cli/app/command-sync.ts index b146f9e8e..894f39599 100644 --- a/packages/app-cli/app/command-sync.ts +++ b/packages/app-cli/app/command-sync.ts @@ -5,6 +5,7 @@ import MigrationHandler from '@joplin/lib/services/synchronizer/MigrationHandler import ResourceFetcher from '@joplin/lib/services/ResourceFetcher'; import Synchronizer from '@joplin/lib/Synchronizer'; import { masterKeysWithoutPassword } from '@joplin/lib/services/e2ee/utils'; +import { appTypeToLockType } from '@joplin/lib/services/synchronizer/LockHandler'; const { BaseCommand } = require('./base-command.js'); const { app } = require('./app.js'); const { OneDriveApiNodeUtils } = require('@joplin/lib/onedrive-api-node-utils.js'); @@ -188,7 +189,7 @@ class Command extends BaseCommand { sync.api(), reg.db(), sync.lockHandler(), - Setting.value('appType'), + appTypeToLockType(Setting.value('appType')), Setting.value('clientId') ); diff --git a/packages/lib/Synchronizer.ts b/packages/lib/Synchronizer.ts index a70184c2c..12ee9170a 100644 --- a/packages/lib/Synchronizer.ts +++ b/packages/lib/Synchronizer.ts @@ -1,5 +1,5 @@ import Logger from './Logger'; -import LockHandler, { hasActiveLock, LockClientType, LockType } from './services/synchronizer/LockHandler'; +import LockHandler, { appTypeToLockType, hasActiveLock, LockClientType, LockType } from './services/synchronizer/LockHandler'; import Setting, { AppType } from './models/Setting'; import shim from './shim'; import MigrationHandler from './services/synchronizer/MigrationHandler'; @@ -53,7 +53,7 @@ export default class Synchronizer { private db_: JoplinDatabase; private api_: FileApi; - private appType_: string; + private appType_: AppType; private logger_: Logger = new Logger(); private state_: string = 'idle'; private cancelling_: boolean = false; @@ -77,7 +77,7 @@ export default class Synchronizer { public dispatch: Function; - public constructor(db: JoplinDatabase, api: FileApi, appType: string) { + public constructor(db: JoplinDatabase, api: FileApi, appType: AppType) { this.db_ = db; this.api_ = api; this.appType_ = appType; @@ -123,13 +123,7 @@ export default class Synchronizer { private lockClientType(): LockClientType { if (this.lockClientType_) return this.lockClientType_; - - if (this.appType_ === AppType.Desktop) this.lockClientType_ = LockClientType.Desktop; - if (this.appType_ === AppType.Mobile) this.lockClientType_ = LockClientType.Mobile; - if (this.appType_ === AppType.Cli) this.lockClientType_ = LockClientType.Cli; - - if (!this.lockClientType_) throw new Error(`Invalid client type: ${this.appType_}`); - + this.lockClientType_ = appTypeToLockType(this.appType_); return this.lockClientType_; } @@ -141,7 +135,7 @@ export default class Synchronizer { maxResourceSize() { if (this.maxResourceSize_ !== null) return this.maxResourceSize_; - return this.appType_ === 'mobile' ? 100 * 1000 * 1000 : Infinity; + return this.appType_ === AppType.Mobile ? 100 * 1000 * 1000 : Infinity; } public setShareService(v: ShareService) { diff --git a/packages/lib/services/synchronizer/LockHandler.ts b/packages/lib/services/synchronizer/LockHandler.ts index d0b720465..018dbd3dd 100644 --- a/packages/lib/services/synchronizer/LockHandler.ts +++ b/packages/lib/services/synchronizer/LockHandler.ts @@ -3,6 +3,7 @@ import shim from '../../shim'; import JoplinError from '../../JoplinError'; import time from '../../time'; import { FileApi } from '../../file-api'; +import { AppType } from '../../models/Setting'; const { fileExtension, filename } = require('../../path-utils'); export enum LockType { @@ -46,6 +47,13 @@ export function lockNameToObject(name: string, updatedTime: number = null): Lock return lock; } +export function appTypeToLockType(appType: AppType): LockClientType { + if (appType === AppType.Desktop) return LockClientType.Desktop; + if (appType === AppType.Mobile) return LockClientType.Mobile; + if (appType === AppType.Cli) return LockClientType.Cli; + throw new Error(`Invalid app type: ${appType}`); +} + export function hasActiveLock(locks: Lock[], currentDate: Date, lockTtl: number, lockType: LockType, clientType: LockClientType = null, clientId: string = null) { const lock = activeLock(locks, currentDate, lockTtl, lockType, clientType, clientId); return !!lock; diff --git a/packages/lib/services/synchronizer/gui/useSyncTargetUpgrade.ts b/packages/lib/services/synchronizer/gui/useSyncTargetUpgrade.ts index fad943630..581a57ffb 100644 --- a/packages/lib/services/synchronizer/gui/useSyncTargetUpgrade.ts +++ b/packages/lib/services/synchronizer/gui/useSyncTargetUpgrade.ts @@ -2,6 +2,7 @@ import shim from '../../../shim'; import MigrationHandler from '../MigrationHandler'; import Setting from '../../../models/Setting'; import { reg } from '../../../registry'; +import { appTypeToLockType } from '../LockHandler'; const { useEffect, useState } = shim.react(); export interface SyncTargetUpgradeResult { @@ -28,7 +29,7 @@ export default function useSyncTargetUpgrade(): SyncTargetUpgradeResult { synchronizer.api(), reg.db(), synchronizer.lockHandler(), - Setting.value('appType'), + appTypeToLockType(Setting.value('appType')), Setting.value('clientId') );