pimutils / pimutils/khal

ikhal: New alarm fields should default to empty

Open
#1,091 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

cat:ikhal type: enhancement
Dominant language
Python
Stars
3.1k
Forks
233
Avg merge
1h 44m
Merged PRs (30d)
1

Description

In ikhal, when adding a new alarm in a new event ("n" -> alarms -> add), the fields are pre-populated with zeros, which means I always need to erase it to enter a single digit number, since switching to the field and just typing "1" will turn it into 10 instead. This always felt incredibly weird for me. I guess that the problem is that the field lacks "pre-selection" normally enabled on default fields that would cause the exiting text to be replaced by default.

I believe a better option would be to leave all fields blank, and eventually fill them with zeros (if needed?) when the form is saved.

Overall even the date/time fields behave similarly weird. I'd almost expect overwrite behavior on those. Maybe we can switch to the thin cursor to make it more obvious?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue in ikhal with a new event using "n" → alarms → add, then locate the alarm form entry point and inspect how its fields are initialized. Done means newly added alarm fields start blank and can accept a single digit without first erasing a zero; confirm the behavior when saving the form.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.