Skip to content

Commit

Permalink
Playing around with scrolling mechanism, added tool tip to tray icon
Browse files Browse the repository at this point in the history
  • Loading branch information
ransome1 committed Nov 23, 2023
1 parent 4be288f commit abcf739
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 23 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.3-rc.1" date="2023-11-22"/>
<release version="2.0.3-rc.2" date="2023-11-23"/>
</releases>
<url type="homepage">https://github.com/ransome1/sleek</url>
<url type="contact">https://github.com/ransome1/sleek/issues</url>
Expand Down
2 changes: 1 addition & 1 deletion flatpak/com.github.ransome1.sleek.desktop
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[Desktop Entry]
Version=2.0.3-rc.1
Version=2.0.3-rc.2
Name=sleek
Exec=sleek
Type=Application
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sleek",
"version": "2.0.3-rc.1",
"version": "2.0.3-rc.2",
"main": "./src/main/main.ts",
"scripts": {
"build": "concurrently \"yarn run peggy\" \"yarn run build:main\" \"yarn run build:renderer\"",
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.3-rc.1",
"version": "2.0.3-rc.2",
"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
2 changes: 1 addition & 1 deletion snap/snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: sleek
base: core20
version: "2.0.3-rc.1"
version: "2.0.3-rc.2"
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
16 changes: 8 additions & 8 deletions src/__tests__/__mock__/recurrence.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@

2023-11-22 Line 1 rec:1d due:2023-11-23
2023-11-22 Line 1 rec:w due:2023-11-29
2023-11-22 Line 1 rec:2m due:2024-01-22
2023-11-22 Line 1 rec:+1d due:2023-11-24
2023-11-22 Line 1 rec:7w due:2024-01-10
2023-11-23 Line 1 rec:1d due:2023-11-24
2023-11-23 Line 1 rec:w due:2023-11-30
2023-11-23 Line 1 rec:2m due:2024-01-23
2023-11-23 Line 1 rec:+1d due:2023-11-25
2023-11-23 Line 1 rec:7w due:2024-01-11
2023-07-21 Line 1 due:2023-07-24 rec:+1b
2021-01-01 taxes are due in one year t:2022-03-30 due:2022-04-30 rec:+1y
2023-11-22 Water plants @home +quick due:2023-11-29 t:2023-11-19 rec:1w
2023-11-22 Line 1 rec:+1d t:2023-09-20 due:2023-11-23
(A) 2023-11-22 Line 1 rec:1d pri:A due:2023-11-23
2023-11-23 Water plants @home +quick due:2023-11-30 t:2023-11-20 rec:1w
2023-11-23 Line 1 rec:+1d t:2023-09-20 due:2023-11-24
(A) 2023-11-23 Line 1 rec:1d pri:A due:2023-11-24
16 changes: 9 additions & 7 deletions src/main/modules/Tray.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,15 @@ function createTray() {
const menu = Menu.buildFromTemplate(createMenuTemplate(files));

tray = new Tray(getAssetPath(`icons/tray/${iconName}`));
tray.on('click', () => {
handleCreateWindow();
});
tray.on('right-click', () => {
tray.popUpContextMenu(menu);
});

tray.setToolTip('sleek');
tray
.on('click', () => {
handleCreateWindow();
})
.on('right-click', () => {
tray.popUpContextMenu(menu);
});

return Promise.resolve('Tray created');
} catch (error: any) {
console.error('Error creating tray:', error);
Expand Down
6 changes: 3 additions & 3 deletions src/renderer/DataGrid/Grid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,12 @@ const TodoDataGrid: React.FC<TodoDataGridProps> = memo(({
const scrollPos = list.scrollTop;
const totalHeight = list.scrollHeight;
const clientHeight = list.clientHeight;
if (totalHeight - scrollPos <= clientHeight * 2) {
const remainingRows: TodoObject[] | null = todoObjects?.slice(visibleRowCount, visibleRowCount + 20);
if (totalHeight - scrollPos <= clientHeight * 3) {
const remainingRows: TodoObject[] | null = todoObjects?.slice(visibleRowCount, visibleRowCount + 30);
if (remainingRows?.length === 0) {
setLoadMoreRows(false);
} else {
setVisibleRowCount((prevVisibleRowCount) => prevVisibleRowCount + 20);
setVisibleRowCount((prevVisibleRowCount) => prevVisibleRowCount + 30);
}
}
}
Expand Down

0 comments on commit abcf739

Please sign in to comment.