Skip to content

Commit a5700f5

Browse files
Merge pull request #13 from mihaiconstantin/feat/time-tracking
Add time tracking functionality. Closes #6, #7, #8, #12, #14.
2 parents 1175fcf + ee7d937 commit a5700f5

File tree

76 files changed

+9233
-2929
lines changed

Some content is hidden

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

76 files changed

+9233
-2929
lines changed

.github/workflows/docs.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Workflow name.
2+
name: docs
3+
4+
# Events.
5+
on:
6+
# Trigger on push to branch.
7+
push:
8+
branches: [main]
9+
# Trigger manually via the GitHub UI.
10+
workflow_dispatch:
11+
12+
# Jobs.
13+
jobs:
14+
docs:
15+
# Virtual machine type.
16+
runs-on: ubuntu-latest
17+
18+
# Job steps.
19+
steps:
20+
# Fetch all commits to get all `.git` info logs.
21+
- name: Checkout repository
22+
uses: actions/checkout@v2
23+
with:
24+
fetch-depth: 0
25+
26+
# Install `Node.js`.
27+
- name: Setup Node.js
28+
uses: actions/setup-node@v1
29+
with:
30+
node-version: '14'
31+
32+
# Cache `node_modules`.
33+
- name: Cache dependencies
34+
uses: actions/cache@v2
35+
id: yarn-cache
36+
with:
37+
path: |
38+
**/node_modules
39+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
40+
restore-keys: |
41+
${{ runner.os }}-yarn-
42+
43+
# Install `Node.js` dependencies if the cache did not hit.
44+
- name: Install dependencies
45+
if: steps.yarn-cache.outputs.cache-hit != 'true'
46+
run: yarn --frozen-lockfile
47+
48+
# Run build script.
49+
- name: Build VuePress site
50+
run: yarn docs:build
51+
52+
# Deploy website.
53+
# https://github.com/crazy-max/ghaction-github-pages.
54+
- name: Deploy to GitHub Pages
55+
uses: crazy-max/ghaction-github-pages@v2
56+
with:
57+
# Deploy to `gh-pages` branch.
58+
target_branch: gh-pages
59+
# Deploy the default output dir of VuePress.
60+
build_dir: docs/.vuepress/dist
61+
env:
62+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
node_modules
22
*.vsix
3-
debug/
3+
debug
44
out
55
dist
6-
.vscode-test/
6+
.vscode-test
77
.DS_Store
8-
assets/video
8+
.temp
9+
.cache
10+
**/temp_*

.vscodeignore

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,25 @@
1-
.vscode/**
2-
.vscode-test/**
3-
src/**
1+
# Configuration files.
2+
.github/
3+
.vscode/
44
.gitignore
5-
.yarnrc
6-
vsc-extension-quickstart.md
7-
**/tsconfig.json
8-
**/.eslintrc.json
9-
**/*.map
5+
tsconfig.json
6+
.eslintrc.json
7+
package-json.lock
8+
webpack.config.js
9+
CNAME
10+
11+
# Source files.
12+
node_modules/**
13+
src/
1014
**/*.ts
11-
assets/video/
15+
16+
# Documentation files.
17+
docs/
18+
19+
# Debug files.
1220
debug/
21+
22+
# Development files.
23+
.vscode-test/
24+
out/
25+
**/*.map

CHANGELOG.md

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,84 @@
11
# Changelog
22

3+
## [2.4.0] - 2022.07.07
4+
5+
### Added
6+
- Add `.github` workflow for building documentation website.
7+
- Add extension documentation via `VuePress` at
8+
[bujo.mihaiconstantin.com](https://bujo.mihaiconstantin.com). Closes
9+
[#14](https://github.com/mihaiconstantin/bujo/issues/14).
10+
- Add functionality to **schedule `BuJo` entries** to time tracking tables via
11+
the `BuJo: Schedule Entry` command. Closes
12+
[#8](https://github.com/mihaiconstantin/bujo/issues/8).
13+
- Add functionality for **time tracking** for `BuJo` entries via the `BuJo:
14+
Record Time` command. Closes
15+
[#6](https://github.com/mihaiconstantin/bujo/issues/6).
16+
- Add functionality to *calculate the total time spent on a task* for `BuJo`
17+
entries scheduled to the time tracking table via the command `BuJo: Calculate
18+
Entry Time`. Closes [#7](https://github.com/mihaiconstantin/bujo/issues/7).
19+
- Add default keybindings scheduling and time tracking commands:
20+
- `alt+shift+p` to run command `BuJo: Schedule Entry`
21+
- `alt+shift+t` to run command `BuJo: Record Time`
22+
- `alt+shift+s` to run command `BuJo: Calculate Entry Time`
23+
- Add user settings for customizing the scheduling and time tracking behavior:
24+
- `bujo.scheduler.plannerPrefix` to specify the prefix to use when
25+
selecting the daily planner file via the input box (e.g.,
26+
**`prefix`**`.2022.03.20`)
27+
- `bujo.scheduler.taskName` to specify what to use as task name for the
28+
time tracking table when scheduling a `BuJo` entry that contains a wiki link
29+
with an alias (e.g., `[[A random task|project.example.a-random-task]]`:
30+
- `alias` sets the name of the task in the table to wiki link alias (e.g.,
31+
`A random task`)
32+
- `filename` sets the name of the task to the actual wiki link (e.g.,
33+
`[[project.example.a-random-task]]`)
34+
- `bujo.scheduler.symbolForScheduledEntry` to specify the symbol to set for a
35+
`BuJo` entry scheduled to the time track table (i.e., by default, the symbol
36+
is updated from `[ ]` to `[>]`)
37+
- Add `genUUID` and `genUUIDInsecure` helper functions to generate
38+
Dendron-compatible blockquote IDs for scheduling `BuJo` entries to the time
39+
tracking table.
40+
- Add essential documentation in `README.md` for new changes. Closes
41+
[#12](https://github.com/mihaiconstantin/bujo/issues/12).
42+
43+
### Changed
44+
- Switched from `esbuild` to `webpack` for bundling extension source files.
45+
- Simplify `README.md` file to point to the new documentation. Closes
46+
[#12](https://github.com/mihaiconstantin/bujo/issues/12).
47+
- Refactor `Entry` class into multiple classes, each corresponding to a type of
48+
functionality:
49+
- `Scheduler` class for handling scheduling operation
50+
- `Symbol` class for handling entry symbol updates
51+
- `Tracker` and `Interval` classes for handling time tracking and time totals
52+
- Move most of the regular expressions to the `Pattern` class and add
53+
demonstration links to `regex101.com` to improve debugging of `regex`.
54+
- Create `operations` module that contains functions and wrappers to use in the
55+
context of the command palette, e.g.:
56+
57+
```typescript
58+
// Import the module.
59+
import * as operations from "./operations";
60+
61+
// The module currently contains `symbol`, `scheduler` and `tracker` commands.
62+
// ...
63+
vscode.commands.registerCommand('bujo.scheduler.scheduleEntry', operations.scheduler.scheduleEntry)
64+
// ...
65+
```
66+
67+
- Create `helpers` module for small functions used in various places.
68+
- Update the functions within the operations module to use new classes.
69+
- **Rename several commands to maintain consistency with the `operations`
70+
module:**
71+
- from `bujo.setMigratedForward` to `bujo.symbol.setMigratedForward`
72+
- from `bujo.setMigratedBackward` to `bujo.symbol.setMigratedBackward`
73+
- from `bujo.setCompleted` to `bujo.symbol.setCompleted`
74+
- from `bujo.setOpen` to `bujo.symbol.setOpened`
75+
- from `bujo.setInProgress` to `bujo.symbol.setStarted`
76+
- from `bujo.setDropped` to `bujo.symbol.setDropped`
77+
- from `bujo.setSymbol` to `bujo.symbol.setSymbol`
78+
- from `bujo.scheduleToTimeTrackingTable` to `bujo.scheduler.scheduleEntry`
79+
- from `bujo.recordTime` to `bujo.tracker.recordTime`
80+
- from `bujo.calculateTime` to `bujo.tracker.calculateEntryTime`
81+
382
## [2.1.0] - 2022.04.24
483
### Added
584
- Add syntax highlighting support for multiple entries on the same line

0 commit comments

Comments
 (0)