Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
ransome1 committed Feb 9, 2024
2 parents a1abfea + e98cd7e commit 9f4e613
Show file tree
Hide file tree
Showing 30 changed files with 547 additions and 644 deletions.
2 changes: 1 addition & 1 deletion flatpak/com.github.ransome1.sleek.appdata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<developer_name>Robin Ahle</developer_name>
<content_rating type="oars-1.1"/>
<releases>
<release version="2.0.9-rc.1" date="2024-02-03"/>
<release version="2.0.9" date="2024-02-09"/>
</releases>
<url type="homepage">https://github.com/ransome1/sleek</url>
<url type="contact">https://github.com/ransome1/sleek/issues</url>
Expand Down
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "sleek",
"version": "2.0.9-rc.1",
"version": "2.0.9",
"main": "./src/main/main.tsx",
"scripts": {
"build": "concurrently \"npm run build:main\" \"npm run build:renderer\"",
"build": "concurrently \"yarn run peggy\" \"yarn run build:main\" \"yarn run build:renderer\"",
"build:dll": "cross-env NODE_ENV=development webpack --config ./.erb/configs/webpack.config.renderer.dev.dll.ts",
"build:main": "cross-env NODE_ENV=production webpack --config ./.erb/configs/webpack.config.main.prod.ts",
"build:renderer": "cross-env NODE_ENV=production webpack --config ./.erb/configs/webpack.config.renderer.prod.ts",
Expand Down Expand Up @@ -99,7 +99,7 @@
"@testing-library/jest-dom": "^6.4.1",
"@testing-library/react": "^14.2.1",
"@types/jest": "^29.5.12",
"@types/node": "20.11.16",
"@types/node": "20.11.17",
"@types/react": "^18.2.52",
"@types/react-autosuggest": "^10.1.10",
"@types/react-beautiful-dnd": "^13.1.8",
Expand Down Expand Up @@ -160,7 +160,8 @@
"target": {
"target": "default",
"arch": [
"universal"
"arm64",
"x64"
]
},
"fileAssociations": [
Expand All @@ -181,7 +182,7 @@
"entitlementsInherit": "assets/mas/entitlements.mac.plist",
"gatekeeperAssess": false,
"category": "public.app-category.productivity",
"artifactName": "${productName}-${version}-mac.${ext}",
"artifactName": "${productName}-${version}-mac-${arch}.${ext}",
"darkModeSupport": true,
"notarize": {
"teamId": "8QSR3UZXP8"
Expand Down
2 changes: 1 addition & 1 deletion release/app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sleek",
"version": "2.0.9-rc.1",
"version": "2.0.9",
"description": "todo.txt manager for Linux, Windows and MacOS, free and open-source (FOSS)",
"synopsis": "todo.txt manager for Linux, Windows and MacOS, free and open-source (FOSS)",
"keywords": [
Expand Down
4 changes: 2 additions & 2 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: sleek
base: core20
version: "2.0.9-rc.1"
version: "2.0.9"
summary: todo.txt manager for Linux, free and open-source (FOSS)
description: |
sleek is an open-source (FOSS) todo manager based on the todo.txt syntax. Stripped down to only the most necessary features, and with a clean and simple interface, sleek aims to help you focus on getting things done.
Expand Down Expand Up @@ -41,7 +41,7 @@ parts:
build-environment:
- PATH: "$PATH:$SNAPCRAFT_PART_BUILD/node_modules/.bin"
build-snaps:
- node/16/stable
- node/18/stable
source: .
override-build: |
if [ -n "$http_proxy" ]; then
Expand Down
28 changes: 14 additions & 14 deletions src/__tests__/__mock__/recurrence.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@

2024-02-03 Line 1 rec:1d due:2024-02-04
2024-02-03 Line 1 rec:w due:2024-02-10
2024-02-03 Line 1 rec:2m due:2024-04-03
2024-02-03 Line 1 rec:+1d due:2024-02-05
2024-02-03 Line 1 rec:7w due:2024-03-23
2024-02-03 Line 1 due:2023-07-24 rec:+1b
2024-02-03 taxes are due in one year t:2022-03-30 due:2022-04-30 rec:+1y
2024-02-03 Water plants @home +quick due:2024-02-10 t:2024-01-31 rec:1w
2024-02-03 Line 1 rec:+1d t:2023-09-20
2024-02-03 Line 1 rec:1d pri:A due:2024-02-04
2024-02-03 (A) Do something rec:d t:2024-02-04 @SomeContext
2024-02-03 Do something rec:0d
2024-02-03 Do something rec:0d due:2024-02-03
2024-02-03 Do something rec:0d due:2024-02-03 t:2024-02-03
2024-02-09 Line 1 rec:1d due:2024-02-10
2024-02-09 Line 1 rec:w due:2024-02-16
2024-02-09 Line 1 rec:2m due:2024-04-09
2024-02-09 Line 1 rec:+1d due:2024-02-11
2024-02-09 Line 1 rec:7w due:2024-03-29
2024-02-09 Line 1 due:2023-07-24 rec:+1b
2024-02-09 taxes are due in one year t:2022-03-30 due:2022-04-30 rec:+1y
2024-02-09 Water plants @home +quick due:2024-02-16 t:2024-02-06 rec:1w
2024-02-09 Line 1 rec:+1d t:2023-09-20
2024-02-09 Line 1 rec:1d pri:A due:2024-02-10
2024-02-09 (A) Do something rec:d t:2024-02-10 @SomeContext
2024-02-09 Do something rec:0d
2024-02-09 Do something rec:0d due:2024-02-09
2024-02-09 Do something rec:0d due:2024-02-09 t:2024-02-09
7 changes: 7 additions & 0 deletions src/__tests__/__mock__/todo.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
(C) 2025-12-09 +testProject5 test0 @testContext due:2023-01-02
(B) 2023-12-01 test1 +testProject7 @testContext7 t:2023-12-15
x (C) 2025-12-08 2023-12-01 test2 +testProject1 @testContext due:2023-01-01
(A) 2023-06-24 test3 +testProject6 @testContext6 due:2023-12-03
(C) 2025-12-06 test3 +testProject3 @testContext due:2023-01-03
(C) 2025-12-05 test3 +testProject2 @testContext due:2023-01-05
(C) 2025-12-07 test3 +testProject4 @testContext due:2023-01-04
22 changes: 11 additions & 11 deletions src/__tests__/main/Attributes.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { attributes, updateAttributes } from '../../main/modules/Attributes';

const todoObjects = [
{ id: 1, created: null, priority: 'A', projects: ['Project 1'], contexts: ['Context 1'], due: '2023-01-01', dueString: '2023-01-01', complete: false, completed: null, t: '2024-02-01', tString: '2024-02-01', rec: null, pm: null, body: null, hidden: false, string: '', notify: false, },
{ id: 2, created: '2026-01-01', priority: null, projects: ['Project 2'], contexts: null, due: '2023-02-01', dueString: '2023-02-01', complete: false, completed: null, t: null, tString: null, rec: null, pm: null, body: null, hidden: false, string: '', notify: false, },
{ id: 3, created: null, priority: null, projects: ['Project 1'], contexts: null, due: '2023-03-01', dueString: '2023-03-01', complete: false, completed: null, t: null, tString: null, rec: '2b', pm: null, body: null, hidden: false, string: '', notify: true, },
{ id: 4, created: '2026-01-01', priority: 'C', projects: ['Project 2'], contexts: ['Context 1'], due: '2023-04-01', dueString: '2023-04-01', complete: false, completed: null, t: '2024-02-01', tString: '2024-02-01', rec: null, pm: null, body: null, hidden: false, string: '', notify: false, },
{ id: 1, created: null, priority: 'A', projects: ['Project 1'], contexts: ['Context 1'], due: '2023-01-01', dueString: '2023-01-01', complete: false, completed: null, t: '2024-02-01', tString: '2024-02-01', rec: null, pm: null, body: null, hidden: false, string: '', notify: false, visible: true, },
{ id: 2, created: '2026-01-01', priority: null, projects: ['Project 2'], contexts: null, due: '2023-02-01', dueString: '2023-02-01', complete: false, completed: null, t: null, tString: null, rec: null, pm: null, body: null, hidden: false, string: '', notify: false, visible: true, },
{ id: 3, created: null, priority: null, projects: ['Project 1'], contexts: null, due: '2023-03-01', dueString: '2023-03-01', complete: false, completed: null, t: null, tString: null, rec: '2b', pm: null, body: null, hidden: false, string: '', notify: true, visible: true, },
{ id: 4, created: '2026-01-01', priority: 'C', projects: ['Project 2'], contexts: ['Context 1'], due: '2023-04-01', dueString: '2023-04-01', complete: false, completed: null, t: '2024-02-01', tString: '2024-02-01', rec: null, pm: null, body: null, hidden: false, string: '', notify: false, visible: true, },
];

describe('Set of filters must create a respective set of attributes and its counts', () => {
Expand All @@ -23,14 +23,14 @@ describe('Set of filters must create a respective set of attributes and its coun
];

const expectedAttributes = {
priority: { 'A': { count: 1, notify: false}, 'C': { count: 1, notify: false} },
projects: { 'Project 1': { count: 2, notify: false}, 'Project 2': { count: 2, notify: false} },
contexts: { 'Context 1': { count: 2, notify: false} },
due: { '2023-01-01': { count: 1, notify: false}, '2023-02-01': { count: 1, notify: false}, '2023-03-01': { count: 1, notify: true}, '2023-04-01': { count: 1, notify: false} },
t: { '2024-02-01': { count: 2, notify: false} },
rec: { '2b': { count: 1, notify: false} },
priority: { 'A': { count: 1, notify: false, visible: true}, 'C': { count: 1, notify: false, visible: true} },
projects: { 'Project 1': { count: 2, notify: false, visible: true}, 'Project 2': { count: 2, notify: false, visible: true} },
contexts: { 'Context 1': { count: 2, notify: false, visible: true} },
due: { '2023-01-01': { count: 1, notify: false, visible: true}, '2023-02-01': { count: 1, notify: false, visible: true}, '2023-03-01': { count: 1, notify: true, visible: true}, '2023-04-01': { count: 1, notify: false, visible: true} },
t: { '2024-02-01': { count: 2, notify: false, visible: true} },
rec: { '2b': { count: 1, notify: false, visible: true} },
pm: {},
created: { '2026-01-01': { count: 2, notify: false} },
created: { '2026-01-01': { count: 2, notify: false, visible: true} },
completed: {},
};
await updateAttributes(todoObjects, sorting, false);
Expand Down
4 changes: 4 additions & 0 deletions src/__tests__/main/CreateTodoObjects.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ describe('Create todo objects', () => {
pm: "4",
string: '(B) Test +project @context todo 1 due:2023-12-31 t:2024-03-24 h:1 test @anotherContext pm:4 and a strict rec:+2w',
notify: false,
visible: true,
});
});

Expand All @@ -68,6 +69,7 @@ describe('Create todo objects', () => {
pm: null,
string: 'x 2023-07-23 2023-07-21 Test todo 2',
notify: false,
visible: true,
});
});

Expand All @@ -91,6 +93,7 @@ describe('Create todo objects', () => {
pm: null,
string: 'Test todo 3 due:end of the year',
notify: false,
visible: true,
});
});

Expand All @@ -114,6 +117,7 @@ describe('Create todo objects', () => {
pm: null,
string: 'Test todo 4 t:first day of next year',
notify: false,
visible: true,
});
});
});
10 changes: 5 additions & 5 deletions src/__tests__/main/Filters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import { applyFilters } from '../../main/modules/Filters/Filters';

describe('Should filter todos based on passed filters', () => {
const todoObjects = [
{ id: 1, body: 'Test', created: null, complete: false, completed: null, priority: null, contexts: null, projects: ['Project 1'], due: '2023-01-01', dueString: '2023-01-01', t: null, tString: null, rec: null, hidden: false, pm: null, string: '' },
{ id: 2, body: 'Test', created: null, complete: true, completed: null, priority: null, contexts: null, projects: ['Project 2'], due: '2023-02-01', dueString: '2023-02-01', t: null, tString: null, rec: null, hidden: false, pm: null, string: '' },
{ id: 3, body: 'Test', created: null, complete: false, completed: null, priority: null, contexts: null, projects: ['Project 1'], due: '2023-03-01', dueString: '2023-03-01', t: null, tString: null, rec: null, hidden: false, pm: null, string: '' },
{ id: 1, body: 'Test', created: null, complete: false, completed: null, priority: null, contexts: null, projects: ['Project 1'], due: '2023-01-01', dueString: '2023-01-01', t: null, tString: null, rec: null, hidden: false, pm: null, visible: true, string: '' },
{ id: 2, body: 'Test', created: null, complete: true, completed: null, priority: null, contexts: null, projects: ['Project 2'], due: '2023-02-01', dueString: '2023-02-01', t: null, tString: null, rec: null, hidden: false, pm: null, visible: true, string: '' },
{ id: 3, body: 'Test', created: null, complete: false, completed: null, priority: null, contexts: null, projects: ['Project 1'], due: '2023-03-01', dueString: '2023-03-01', t: null, tString: null, rec: null, hidden: false, pm: null, visible: true, string: '' },
];

test('should return all todo objects if no filters are provided', () => {
Expand All @@ -18,8 +18,8 @@ describe('Should filter todos based on passed filters', () => {
projects: [ { value: 'Project 1', exclude: false } ]
}
const expected = [
{ id: 1, body: 'Test', created: null, complete: false, completed: null, priority: null, contexts: null, projects: ['Project 1'], due: '2023-01-01', dueString: '2023-01-01', t: null, tString: null, rec: null, hidden: false, pm: null, string: '' },
{ id: 3, body: 'Test', created: null, complete: false, completed: null, priority: null, contexts: null, projects: ['Project 1'], due: '2023-03-01', dueString: '2023-03-01', t: null, tString: null, rec: null, hidden: false, pm: null, string: '' },
{ id: 1, body: 'Test', created: null, complete: false, completed: null, priority: null, contexts: null, projects: ['Project 1'], due: '2023-01-01', dueString: '2023-01-01', t: null, tString: null, rec: null, hidden: false, pm: null, visible: true, string: '' },
{ id: 3, body: 'Test', created: null, complete: false, completed: null, priority: null, contexts: null, projects: ['Project 1'], due: '2023-03-01', dueString: '2023-03-01', t: null, tString: null, rec: null, hidden: false, pm: null, visible: true, string: '' },
];
const result = applyFilters(todoObjects, filters);
expect(result).toEqual(expected);
Expand Down
Loading

0 comments on commit 9f4e613

Please sign in to comment.