Skip to content

Commit

Permalink
Merge pull request #13 from mihaiconstantin/feat/time-tracking
Browse files Browse the repository at this point in the history
Add time tracking functionality. Closes #6, #7, #8, #12, #14.
  • Loading branch information
mihaiconstantin authored Jul 7, 2022
2 parents 1175fcf + ee7d937 commit a5700f5
Show file tree
Hide file tree
Showing 76 changed files with 9,233 additions and 2,929 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Workflow name.
name: docs

# Events.
on:
# Trigger on push to branch.
push:
branches: [main]
# Trigger manually via the GitHub UI.
workflow_dispatch:

# Jobs.
jobs:
docs:
# Virtual machine type.
runs-on: ubuntu-latest

# Job steps.
steps:
# Fetch all commits to get all `.git` info logs.
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 0

# Install `Node.js`.
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: '14'

# Cache `node_modules`.
- name: Cache dependencies
uses: actions/cache@v2
id: yarn-cache
with:
path: |
**/node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
# Install `Node.js` dependencies if the cache did not hit.
- name: Install dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn --frozen-lockfile

# Run build script.
- name: Build VuePress site
run: yarn docs:build

# Deploy website.
# https://github.com/crazy-max/ghaction-github-pages.
- name: Deploy to GitHub Pages
uses: crazy-max/ghaction-github-pages@v2
with:
# Deploy to `gh-pages` branch.
target_branch: gh-pages
# Deploy the default output dir of VuePress.
build_dir: docs/.vuepress/dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8 changes: 5 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
node_modules
*.vsix
debug/
debug
out
dist
.vscode-test/
.vscode-test
.DS_Store
assets/video
.temp
.cache
**/temp_*
31 changes: 22 additions & 9 deletions .vscodeignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,25 @@
.vscode/**
.vscode-test/**
src/**
# Configuration files.
.github/
.vscode/
.gitignore
.yarnrc
vsc-extension-quickstart.md
**/tsconfig.json
**/.eslintrc.json
**/*.map
tsconfig.json
.eslintrc.json
package-json.lock
webpack.config.js
CNAME

# Source files.
node_modules/**
src/
**/*.ts
assets/video/

# Documentation files.
docs/

# Debug files.
debug/

# Development files.
.vscode-test/
out/
**/*.map
79 changes: 79 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,84 @@
# Changelog

## [2.4.0] - 2022.07.07

### Added
- Add `.github` workflow for building documentation website.
- Add extension documentation via `VuePress` at
[bujo.mihaiconstantin.com](https://bujo.mihaiconstantin.com). Closes
[#14](https://github.com/mihaiconstantin/bujo/issues/14).
- Add functionality to **schedule `BuJo` entries** to time tracking tables via
the `BuJo: Schedule Entry` command. Closes
[#8](https://github.com/mihaiconstantin/bujo/issues/8).
- Add functionality for **time tracking** for `BuJo` entries via the `BuJo:
Record Time` command. Closes
[#6](https://github.com/mihaiconstantin/bujo/issues/6).
- Add functionality to *calculate the total time spent on a task* for `BuJo`
entries scheduled to the time tracking table via the command `BuJo: Calculate
Entry Time`. Closes [#7](https://github.com/mihaiconstantin/bujo/issues/7).
- Add default keybindings scheduling and time tracking commands:
- `alt+shift+p` to run command `BuJo: Schedule Entry`
- `alt+shift+t` to run command `BuJo: Record Time`
- `alt+shift+s` to run command `BuJo: Calculate Entry Time`
- Add user settings for customizing the scheduling and time tracking behavior:
- `bujo.scheduler.plannerPrefix` to specify the prefix to use when
selecting the daily planner file via the input box (e.g.,
**`prefix`**`.2022.03.20`)
- `bujo.scheduler.taskName` to specify what to use as task name for the
time tracking table when scheduling a `BuJo` entry that contains a wiki link
with an alias (e.g., `[[A random task|project.example.a-random-task]]`:
- `alias` sets the name of the task in the table to wiki link alias (e.g.,
`A random task`)
- `filename` sets the name of the task to the actual wiki link (e.g.,
`[[project.example.a-random-task]]`)
- `bujo.scheduler.symbolForScheduledEntry` to specify the symbol to set for a
`BuJo` entry scheduled to the time track table (i.e., by default, the symbol
is updated from `[ ]` to `[>]`)
- Add `genUUID` and `genUUIDInsecure` helper functions to generate
Dendron-compatible blockquote IDs for scheduling `BuJo` entries to the time
tracking table.
- Add essential documentation in `README.md` for new changes. Closes
[#12](https://github.com/mihaiconstantin/bujo/issues/12).

### Changed
- Switched from `esbuild` to `webpack` for bundling extension source files.
- Simplify `README.md` file to point to the new documentation. Closes
[#12](https://github.com/mihaiconstantin/bujo/issues/12).
- Refactor `Entry` class into multiple classes, each corresponding to a type of
functionality:
- `Scheduler` class for handling scheduling operation
- `Symbol` class for handling entry symbol updates
- `Tracker` and `Interval` classes for handling time tracking and time totals
- Move most of the regular expressions to the `Pattern` class and add
demonstration links to `regex101.com` to improve debugging of `regex`.
- Create `operations` module that contains functions and wrappers to use in the
context of the command palette, e.g.:

```typescript
// Import the module.
import * as operations from "./operations";

// The module currently contains `symbol`, `scheduler` and `tracker` commands.
// ...
vscode.commands.registerCommand('bujo.scheduler.scheduleEntry', operations.scheduler.scheduleEntry)
// ...
```

- Create `helpers` module for small functions used in various places.
- Update the functions within the operations module to use new classes.
- **Rename several commands to maintain consistency with the `operations`
module:**
- from `bujo.setMigratedForward` to `bujo.symbol.setMigratedForward`
- from `bujo.setMigratedBackward` to `bujo.symbol.setMigratedBackward`
- from `bujo.setCompleted` to `bujo.symbol.setCompleted`
- from `bujo.setOpen` to `bujo.symbol.setOpened`
- from `bujo.setInProgress` to `bujo.symbol.setStarted`
- from `bujo.setDropped` to `bujo.symbol.setDropped`
- from `bujo.setSymbol` to `bujo.symbol.setSymbol`
- from `bujo.scheduleToTimeTrackingTable` to `bujo.scheduler.scheduleEntry`
- from `bujo.recordTime` to `bujo.tracker.recordTime`
- from `bujo.calculateTime` to `bujo.tracker.calculateEntryTime`

## [2.1.0] - 2022.04.24
### Added
- Add syntax highlighting support for multiple entries on the same line
Expand Down
Loading

0 comments on commit a5700f5

Please sign in to comment.