Skip to content

Commit f31860e

Browse files
authored
Merge pull request #478 from Quorafind/refactor/plugin-onload
Refactor/plugin onload
2 parents 59a2d42 + 9dedada commit f31860e

96 files changed

Lines changed: 10049 additions & 3348 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
## Description
2+
<!-- Describe your changes -->
3+
4+
## Type of Change
5+
- [ ] Bug fix
6+
- [ ] New feature
7+
- [ ] Documentation update
8+
- [ ] Code refactoring
9+
10+
## Checklist
11+
- [ ] I have read and agree to the [CLA](./CLA.md)
12+
- [ ] My code follows the project's style guidelines
13+
- [ ] I have tested my changes
14+
- [ ] I have updated the documentation
15+
16+
## Related Issues
17+
Closes #(issue number)

.github/workflows/cla.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: "Obsidian Task Genius CLA Assistant"
2+
on:
3+
issue_comment:
4+
types: [created]
5+
pull_request_target:
6+
types: [opened, closed, synchronize]
7+
8+
jobs:
9+
CLAssistant:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: "CLA Assistant"
13+
if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target'
14+
uses: contributor-assistant/github-action@v2.3.0
15+
env:
16+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17+
PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
18+
with:
19+
path-to-signatures: "signatures/cla.json"
20+
path-to-document: "https://github.com/quorafind/obsidian-task-genius/blob/master/CLA.md"
21+
branch: "main"
22+
allowlist: bot*

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ translation-templates
3939
CLAUDE.md
4040
.kiro
4141
.claude
42+
.codex
4243

4344
dist
4445
dist/*
4546

4647
# Documentation site (separate repository)
4748
docs-site
48-

CHANGELOG-BETA.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ All notable changes to beta releases will be documented in this file.
2222

2323
* **setting:** manage workspace setting should jump to workspace setting tab ([f282bff](https://github.com/Quorafind/Obsidian-Task-Progress-Bar/commit/f282bffbf84d2b8fdde21521620342e1f47f6a58))
2424
* **task-mover:** prevent archive markers on non-task lines and preserve folded content ([f20c5eb](https://github.com/Quorafind/Obsidian-Task-Progress-Bar/commit/f20c5ebee3b999fe69a902afee1b0d12e28fcfbe))
25-
* **v2:** hide top navigation for two-column views ([2c24068](https://github.com/Quorafind/Obsidian-Task-Progress-Bar/commit/2c24068c69f314d7ccc63212c243e11abaaa6262))
25+
* **fluent:** hide top navigation for two-column views ([2c24068](https://github.com/Quorafind/Obsidian-Task-Progress-Bar/commit/2c24068c69f314d7ccc63212c243e11abaaa6262))
2626

2727
### Chores
2828

@@ -35,7 +35,7 @@ All notable changes to beta releases will be documented in this file.
3535

3636
* **setting:** manage workspace setting should jump to workspace setting tab ([f282bff](https://github.com/Quorafind/Obsidian-Task-Progress-Bar/commit/f282bffbf84d2b8fdde21521620342e1f47f6a58))
3737
* **task-mover:** prevent archive markers on non-task lines and preserve folded content ([f20c5eb](https://github.com/Quorafind/Obsidian-Task-Progress-Bar/commit/f20c5ebee3b999fe69a902afee1b0d12e28fcfbe))
38-
* **v2:** hide top navigation for two-column views ([2c24068](https://github.com/Quorafind/Obsidian-Task-Progress-Bar/commit/2c24068c69f314d7ccc63212c243e11abaaa6262))
38+
* **fluent:** hide top navigation for two-column views ([2c24068](https://github.com/Quorafind/Obsidian-Task-Progress-Bar/commit/2c24068c69f314d7ccc63212c243e11abaaa6262))
3939

4040
## [9.9.0-beta.4](https://github.com/Quorafind/Obsidian-Task-Genius/compare/9.9.0-beta.3...9.9.0-beta.4) (2025-09-24)
4141

@@ -45,7 +45,7 @@ All notable changes to beta releases will be documented in this file.
4545

4646
### Bug Fixes
4747

48-
* **v2:** resolve filter state management issues ([6c282f9](https://github.com/Quorafind/Obsidian-Task-Genius/commit/6c282f976cdaa0da7361a8599ea6b1f092cf1418))
48+
* **fluent:** resolve filter state management issues ([6c282f9](https://github.com/Quorafind/Obsidian-Task-Genius/commit/6c282f976cdaa0da7361a8599ea6b1f092cf1418))
4949

5050
### Chores
5151

@@ -62,7 +62,7 @@ All notable changes to beta releases will be documented in this file.
6262

6363
### Refactors
6464

65-
* **v2:** rename V2 interface to Fluent and simplify command names ([c096c6c](https://github.com/Quorafind/Obsidian-Task-Genius/commit/c096c6c9527ff0659b991e82f4bbca439e7430d7))
65+
* **fluent:** rename fluent interface to Fluent and simplify command names ([c096c6c](https://github.com/Quorafind/Obsidian-Task-Genius/commit/c096c6c9527ff0659b991e82f4bbca439e7430d7))
6666

6767
## [9.9.0-beta.1](https://github.com/Quorafind/Obsidian-Task-Genius/compare/9.9.0-beta.0...9.9.0-beta.1) (2025-09-24)
6868

CLA.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Contributor License Agreement (CLA) for Task Genius
2+
3+
Important: Please read this carefully before contributing.
4+
5+
By submitting a contribution (pull request, issue, comment, or any other form of contribution) to this project, you agree to the following terms:
6+
7+
### License Grant
8+
9+
1. **Grant of Rights**: You grant Quorafind the perpetual, worldwide, non-exclusive, royalty-free, irrevocable right to use, reproduce, modify, and distribute your contributions under one or more licenses, including but not limited to:
10+
* (a) The Project's Public License: The project's primary public-facing license, which is currently the **Functional Source License 1.1 (FSL 1.1)**, and the subsequent **Apache License 2.0** it is converted to.
11+
* (b) Proprietary Commercial Licenses: Any other proprietary license of Quorafind's choosing. This allows us to offer the software to commercial customers under terms different from the public license if needed in the future.
12+
13+
2. **Original Work**: You confirm that:
14+
* You are the original author of the contribution.
15+
* You have the legal right to grant the above license.
16+
* Your contribution does not violate any third-party rights.
17+
* Your contribution is submitted voluntarily.
18+
19+
3. **No Warranty**: Contributions are provided "as-is" without warranty of any kind.

DEVELOPMENT.md

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
- [Project Architecture](#project-architecture)
99
- [Code Style Guide](#code-style-guide)
1010
- [Testing Strategy](#testing-strategy)
11+
- [CLA](#cla)
1112
- [Getting Help](#getting-help)
1213
- [Questions?](#questions)
1314

@@ -374,6 +375,39 @@ jest.mock('obsidian', () => ({
374375
}));
375376
```
376377
378+
## CLA
379+
380+
Contributor License Agreement (CLA) for Task Genius
381+
382+
Important: Please read this carefully before contributing.
383+
384+
By submitting a contribution (pull request, issue, comment, or any other form of contribution) to this project, you agree to the following terms:
385+
386+
### License Grant
387+
388+
1. **Grant of Rights**: You grant Quorafind the perpetual, worldwide, non-exclusive, royalty-free, irrevocable right to use, reproduce, modify, and distribute your contributions under one or more licenses, including but not limited to:
389+
* (a) The Project's Public License: The project's primary public-facing license, which is currently the **Functional Source License 1.1 (FSL 1.1)**, and the subsequent **Apache License 2.0** it is converted to.
390+
* (b) Proprietary Commercial Licenses: Any other proprietary license of Quorafind's choosing. This allows us to offer the software to commercial customers under terms different from the public license if needed in the future.
391+
392+
2. **Original Work**: You confirm that:
393+
* You are the original author of the contribution.
394+
* You have the legal right to grant the above license.
395+
* Your contribution does not violate any third-party rights.
396+
* Your contribution is submitted voluntarily.
397+
398+
3. **No Warranty**: Contributions are provided "as-is" without warranty of any kind.
399+
400+
### Why We Need This
401+
402+
Our mission is to build the best task management tool for Obsidian and keep it free for everyone. To achieve this sustainably, our project operates under a specific licensing model, and your agreement is essential.
403+
404+
* **Commitment to Free Use:** The compiled, ready-to-use Task Genius plugin is and will remain **free for all users**, including for commercial purposes. We want everyone to benefit from it without a paywall.
405+
* **Protecting the Source Code:** To ensure the project's long-term health and fund its development, we release the **source code** under the Functional Source License 1.1 (FSL 1.1). This prevents others from simply taking our code, rebranding it, and selling it as a competing product.
406+
407+
* **Your Role as a Contributor:** This CLA is the bridge between your contribution and our project. It grants us the legal clarity to incorporate your code into our BSL-licensed project. This single agreement allows us to continue developing, maintaining, and distributing the plugin for the benefit of the entire community.
408+
409+
By signing, you help us protect the project's future while keeping the plugin itself free for all. Thank you for your contribution!
410+
377411
## Getting Help
378412
379413
1. Check existing issues on GitHub
@@ -384,8 +418,6 @@ jest.mock('obsidian', () => ({
384418
- Expected vs actual behavior
385419
- Console logs
386420
387-
---
388-
389421
## Questions?
390422
391423
If you have questions not covered here:

LICENSE

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
Functional Source License, Version 1.1, ALv2 Future License
2+
3+
Abbreviation: FSL-1.1-ALv2
4+
5+
Notice: Copyright 2025 Quorafind
6+
7+
## Terms and Conditions
8+
9+
### Licensor ("We")
10+
11+
The party offering the Software under these Terms and Conditions.
12+
13+
### The Software
14+
15+
The "Software" is each version of the software that we make available under
16+
these Terms and Conditions, as indicated by our inclusion of these Terms and
17+
Conditions with the Software.
18+
19+
### License Grant
20+
21+
Subject to your compliance with this License Grant and the Patents,
22+
Redistribution and Trademark clauses below, we hereby grant you the right to
23+
use, copy, modify, create derivative works, publicly perform, publicly display
24+
and redistribute the Software for any Permitted Purpose identified below.
25+
26+
### Permitted Purpose
27+
28+
A Permitted Purpose is any purpose other than a Competing Use. A Competing Use
29+
means making the Software available to others in a commercial product or
30+
service that:
31+
32+
1. substitutes for the Software;
33+
34+
2. substitutes for any other product or service we offer using the Software
35+
that exists as of the date we make the Software available; or
36+
37+
3. offers the same or substantially similar functionality as the Software.
38+
39+
Permitted Purposes specifically include using the Software:
40+
41+
1. for your internal use and access;
42+
43+
2. for non-commercial education;
44+
45+
3. for non-commercial research; and
46+
47+
4. in connection with professional services that you provide to a licensee
48+
using the Software in accordance with these Terms and Conditions.
49+
50+
### Patents
51+
52+
To the extent your use for a Permitted Purpose would necessarily infringe our
53+
patents, the license grant above includes a license under our patents. If you
54+
make a claim against any party that the Software infringes or contributes to
55+
the infringement of any patent, then your patent license to the Software ends
56+
immediately.
57+
58+
### Redistribution
59+
60+
The Terms and Conditions apply to all copies, modifications and derivatives of
61+
the Software.
62+
63+
If you redistribute any copies, modifications or derivatives of the Software,
64+
you must include a copy of or a link to these Terms and Conditions and not
65+
remove any copyright notices provided in or with the Software.
66+
67+
### Disclaimer
68+
69+
THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR
70+
IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR
71+
PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT.
72+
73+
IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE
74+
SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES,
75+
EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE.
76+
77+
### Trademarks
78+
79+
Except for displaying the License Details and identifying us as the origin of
80+
the Software, you have no right under these Terms and Conditions to use our
81+
trademarks, trade names, service marks or product names.
82+
83+
## Grant of Future License
84+
85+
We hereby irrevocably grant you an additional license to use the Software under
86+
the Apache License, Version 2.0 that is effective on the second anniversary of
87+
the date we make the Software available. On or after that date, you may use the
88+
Software under the Apache License, Version 2.0, in which case the following
89+
will apply:
90+
91+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
92+
this file except in compliance with the License.
93+
94+
You may obtain a copy of the License at
95+
96+
http://www.apache.org/licenses/LICENSE-2.0
97+
98+
Unless required by applicable law or agreed to in writing, software distributed
99+
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
100+
CONDITIONS OF ANY KIND, either express or implied. See the License for the
101+
specific language governing permissions and limitations under the License.

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
**The Ultimate Task Management Plugin for Obsidian**
55

6-
[![Version](https://img.shields.io/badge/version-9.0.0-blue.svg)](https://github.com/Quorafind/Obsidian-Task-Genius)
6+
[![Version](https://img.shields.io/badge/version-8.9.0-blue.svg)](https://github.com/Quorafind/Obsidian-Task-Genius)
77
[![Discord](https://img.shields.io/discord/1382008288706695229?color=7289da&label=Discord&logo=discord&logoColor=white)](https://discord.gg/ARR2rHHX6b)
88

99
[Documentation](https://taskgenius.md)[Installation](#installation)[Discord Community](https://discord.gg/ARR2rHHX6b)
@@ -81,4 +81,10 @@ Task Genius is developed with passion and dedication. If you find it valuable, c
8181
</a>
8282
</div>
8383

84-
Your support enables faster development, better documentation, and priority feature implementation.
84+
Your support enables faster development, better documentation, and priority feature implementation.
85+
86+
## License
87+
88+
[FSL-1.1-ALv2](./LICENSE)
89+
90+
Feel free to use any part in the `src/components`, such as the Inline Markdown Editor or the Kanban component.

src/__mocks__/codemirror-state.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,19 @@ export class EditorState {
232232
};
233233
},
234234
};
235+
236+
// Add transactionExtender mock for tests
237+
static transactionExtender = {
238+
of: (
239+
f: (
240+
tr: Transaction
241+
) => TransactionSpec | readonly TransactionSpec[] | null
242+
) => {
243+
return {
244+
extend: f,
245+
};
246+
},
247+
};
235248
}
236249

237250
export class Annotation<T> {

src/__tests__/QuickCaptureModal.integration.test.ts

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { QuickCaptureModal } from "../components/features/quick-capture/modals/QuickCaptureModal";
2-
import { DEFAULT_TIME_PARSING_CONFIG } from '@/services/time-parsing-service';
2+
import { DEFAULT_TIME_PARSING_CONFIG } from "@/services/time-parsing-service";
33
import { App } from "obsidian";
44

55
// Mock dependencies
@@ -52,17 +52,21 @@ jest.mock("obsidian", () => ({
5252
moment: () => ({ format: jest.fn(() => "2025-01-04") }),
5353
EditorSuggest: class {
5454
constructor() {}
55-
getSuggestions() { return []; }
55+
getSuggestions() {
56+
return [];
57+
}
5658
renderSuggestion() {}
5759
selectSuggestion() {}
58-
onTrigger() { return null; }
60+
onTrigger() {
61+
return null;
62+
}
5963
close() {}
6064
},
6165
}));
6266

6367
// Mock moment module
6468
jest.mock("moment", () => {
65-
const moment = function(input?: any) {
69+
const moment = function (input?: any) {
6670
return {
6771
format: () => "2024-01-01",
6872
diff: () => 0,
@@ -87,7 +91,15 @@ jest.mock("moment", () => {
8791
moment.locale = jest.fn(() => "en");
8892
moment.utc = () => ({ format: () => "00:00:00" });
8993
moment.duration = () => ({ asMilliseconds: () => 0 });
90-
moment.weekdaysShort = () => ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
94+
moment.weekdaysShort = () => [
95+
"Sun",
96+
"Mon",
97+
"Tue",
98+
"Wed",
99+
"Thu",
100+
"Fri",
101+
"Sat",
102+
];
91103
moment.weekdaysMin = () => ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"];
92104
return moment;
93105
});
@@ -166,7 +178,7 @@ describe("QuickCaptureModal Time Parsing Integration", () => {
166178
test("should initialize with plugin settings", () => {
167179
expect(modal.timeParsingService).toBeDefined();
168180
expect(modal.timeParsingService.getConfig()).toEqual(
169-
mockPlugin.settings.timeParsing
181+
mockPlugin.settings.timeParsing,
170182
);
171183
});
172184

@@ -183,11 +195,11 @@ describe("QuickCaptureModal Time Parsing Integration", () => {
183195
mockApp,
184196
pluginWithoutTimeParsing,
185197
undefined,
186-
true
198+
true,
187199
);
188200
expect(modalWithoutConfig.timeParsingService).toBeDefined();
189201
expect(modalWithoutConfig.timeParsingService.getConfig()).toEqual(
190-
DEFAULT_TIME_PARSING_CONFIG
202+
DEFAULT_TIME_PARSING_CONFIG,
191203
);
192204
});
193205
});

0 commit comments

Comments
 (0)