Skip to content

Commit

Permalink
Add release v0.0.5 release article
Browse files Browse the repository at this point in the history
Plus some iprovements here and there
  • Loading branch information
lcfd committed Apr 20, 2024
1 parent 029fb4c commit 5292b4e
Show file tree
Hide file tree
Showing 6 changed files with 200 additions and 17 deletions.
6 changes: 3 additions & 3 deletions .astro/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,9 @@ declare module 'astro:content' {
collection: "devlog";
data: InferEntrySchema<"devlog">
} & { render(): Render[".md"] };
"v0.0.5 is on the way.md": {
id: "v0.0.5 is on the way.md";
slug: "v005-is-on-the-way";
"v0.0.5 launched.md": {
id: "v0.0.5 launched.md";
slug: "v005-launched";
body: string;
collection: "devlog";
data: InferEntrySchema<"devlog">
Expand Down
4 changes: 2 additions & 2 deletions src/components/landing/Hero.astro
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
const advice = "🎉 v.0.0.4 Released!";
const advice_link = "/devlog/v-0-0-4-launched";
const advice = "🎉 v.0.0.5 Released!";
const advice_link = "/devlog/v005-launched";
---

<section>
Expand Down
8 changes: 0 additions & 8 deletions src/content/devlog/v0.0.5 is on the way.md

This file was deleted.

170 changes: 170 additions & 0 deletions src/content/devlog/v0.0.5 launched.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
---
title: v.0.0.5 released
description: Homebrew and other amazing improvements
tags: ["release"]
date: 2024-04-20
---

Hi, Luca here 👋

Trak version 0.0.5 is out!

It's a big release this time too.

This time I've focused on UX and bug fixing.
Three was many little—and not so little—things that wasn't comfortable or curated.
So if v0.0.4 introduced a lot of new concepts, here I've refined them.

The Homebrew install method, the pickers and the `start end` insert moved the bar high regarding the UX of the project.

Talking about the future, v0.0.6 will be smaller.
I want to focus on the `works` feature.
It works, sure, but UI and UI aren't really the best since it was just a sort of version 1.
I already have a good list of enhancements.

I hope that all the changes will help you like they are helping me.
If you have **any** feedback you can write them [here](https://github.com/lcfd/trak/discussions).

Best,<br> [Luca](https://lucafedrizzi.com)

## 🆕 Homebrew 🍺

Finally! 🎉

Now you can install `trak` using `brew install lcfd/trak/trak` with Homebrew.

Thanks a lot [Patrick](https://twitter.com/patrick91) and [Marco](https://github.com/buurro) for the support 💚

## 🆕 A dedicated documentation website

I felt the need of a place where to give more detailed information about the project.
I thought that this website wasn't the best place for that purpose and keep it more as communication and educational channel.

This new website explores the deeps of this tool.
Commands, options and some tip about them.

There will be for sure some overlaps of content, for example with guides and informational articles.
But the docs will be more about to things with `trak` and this website more about the principles and knowledge.
I imagine many links between the two websites in the future.

[Give it a look!](docs.usetrak.com)

## 🆕 Add `--start` and `--end` to create session

The [GitHub pull request](https://github.com/lcfd/trak/issues/38).

I call it the "start end method".
Now you can create a session in a precise way, without doing the math.

`trak create session --start [%Y-%m-%dT%H:%M] --end [%Y-%m-%dT%H:%M]`

Note: Those flags will be incompatible with --hours and --minutes.

This feature has allowed me to insert a lot of past sessions by knowing the day in combination with the start and end time.

By chaining the commands it can be done in a single time:

```bash
trak create session --start 2024-04-20T09:00 --end 2024-04-20T10:20 && \
trak create session --start 2024-04-20T13:10 --end 2024-04-20T14:00 && \
trak create session --start 2024-04-20T20:30 --end 2024-04-20T22:40
```

## ✨ Add suggestions for start if project_id isn't provided

Correlated GitHub pull requests:

- https://github.com/lcfd/trak/issues/5
- https://github.com/lcfd/trak/issues/42

Now you can omit the `project_id` from commands and pick it from a list of suggestions.
I felt it as a need when I started having a good number of projects and remember each ID was problematic.
Also, the IDs were hard to remember since they are codes with arbitrary conventions.

So, why not help my memory?

Here's an example:

```bash
❯ trak report project
? Select a project: (Use arrow keys)
• pokemon
digimon
personal
job-1
all
Answer: pokemon
```

## ✨ Improve the current session search in stop command

Correlated GitHub pull requests:

- https://github.com/lcfd/trak/issues/47
- https://github.com/lcfd/trak/issues/48

After some usage of the tool I figured out that the order of the sessions in the database wasn't a good source of truth.
For example, users may modify the database manually while a session is running.

No trak looks for the sessions without value in the `end` field.
If there are more than one a picker list will be shown.

## 🐛 In report command you can use a wrong project ID

Before this improvement, entering a wrong ID would trigger an error.
Now it will gracefully show a message that shows also all the available IDs.

## 🆕 A faster way to create a session

The [GitHub pull request](https://github.com/lcfd/trak/issues/54).

I felt the need for a **truly** faster way to create sessions.
Mostly when I just finished one, and I need to insert it in trak (and I forgot to use `trak start`).

Now you can use what I call the `subtract method`:

- `trak create session prj-1 -m 45` or
- `trak create session prj-1 -m 45` or
- `trak create session prj-1 -h 2 -m 45 `

I call it this way because it takes your current time and subtract from it the hours and minutes provided.

## 🦣 Removed the command `trak report projects`

The [GitHub pull request](https://github.com/lcfd/trak/issues/59).

The command `trak report projects` is replaced by `trak report project all`.

The `all` option was already in place and I thought that `report projects` was too similar.
I prefer to have a single way to do the thing instead of two that are that similar and under the same umbrella—`report project/s`.

## ✨ Show the duration of the stopped session

The [GitHub pull request](https://github.com/lcfd/trak/issues/49).

Like the title says, now when you stop a session using `trak stop` you'll see also how much lasted the session.

## 🆕 You can archive projects

Correlated GitHub pull requests:

- https://github.com/lcfd/trak/issues/55
- https://github.com/lcfd/trak/issues/62

I've added a new property to projects details, `archived`.
This will have effects mainly on lists, suggestions and probably future features.

It's still new and to test heavily, you'll fine more details in the documentation once ready.

The command is `trak projects archive <project-id>`.

## ✨🐛 Other small fixes and changes

- Better message for "A session is already started", now it shows also the elapsed time like in the status bar
- Better and fixed help texts of commands
- Added Tips here and there
- Change parameter when to date
- Improve the print_missing_timings_error message, triggered when user doesn't provide any timings data
- Remove today property. I concluded that it's just another way to say "now".
- TODO: To expand with a guide that explains the different methods (sub|add|precise)
- Fix bug in add method
25 changes: 23 additions & 2 deletions src/pages/devlog/[...slug].astro
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,29 @@ const { Content } = await post.render();
<BaseLayout>
<Navigation />
<section>
<div
class="mx-auto w-full lg:px-24 max-w-7xl md:px-12 items-center px-8 py-16">
<div class="mx-auto max-w-2xl pt-16 pb-4">
<nav class="flex" aria-label="Breadcrumb">
<ol class="inline-flex items-center space-x-1 md:space-x-2 rtl:space-x-reverse">
<li class="inline-flex items-center">
<a href="/" class="inline-flex items-center text-sm font-medium text-gray-700 hover:text-blue-600">
<svg class="w-3 h-3 me-2.5" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20">
<path d="m19.707 9.293-2-2-7-7a1 1 0 0 0-1.414 0l-7 7-2 2a1 1 0 0 0 1.414 1.414L2 10.414V18a2 2 0 0 0 2 2h3a1 1 0 0 0 1-1v-4a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v4a1 1 0 0 0 1 1h3a2 2 0 0 0 2-2v-7.586l.293.293a1 1 0 0 0 1.414-1.414Z"/>
</svg>
Home
</a>
</li>
<li>
<div class="flex items-center">
<svg class="rtl:rotate-180 w-3 h-3 text-gray-400 mx-1" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 6 10">
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m1 9 4-4-4-4"/>
</svg>
<a href="/devlog" class="ms-1 text-sm font-medium text-gray-700 hover:text-blue-600 md:ms-2">Devlog</a>
</div>
</li>
</ol>
</nav>
</div>
<div class="mx-auto w-full lg:px-24 max-w-7xl md:px-12 items-center px-8 pb-16">
<div class="max-w-2xl mx-auto">
<time
class="text-gray-800 text-md"
Expand Down
4 changes: 2 additions & 2 deletions src/pages/devlog/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ allDevlogPosts.sort((a, b) => b.data.date - a.data.date);
</p>
</div>
<div class="mt-12 space-y-12 divide-y-2">
<div>
<div class="border-t">
{
allDevlogPosts.map((post) => (
<a
class="block border shadow-sm rounded px-3 py-4 hover:bg-sky-50 transition-colors"
class="block border-b px-3 py-4 hover:bg-sky-50 transition-colors"
href={`/devlog/${post.slug}`}>
{post.data.date.toLocaleDateString("it-IT", {
year: "numeric",
Expand Down

0 comments on commit 5292b4e

Please sign in to comment.