iTranslated by AI

The content below is an AI-generated translation. This is an experimental feature, and may contain errors. View original article
🧲

Design Lessons Learned from Making c1/c2 Toggleable

に公開

🧲 How do I deal with the "Feature exists but the environment won't support it" problem?

Why I decided to do this

Honestly, I was a bit concerned from the moment I added the calendar feature.

  • What about users who don't have Outlook installed?
  • Some corporate PCs block COM objects.
  • It's just noise for those who don't use it.

👉 I thought, "Is it really okay to force this on all users?"

So, the conclusion I reached was:

👉 Designed it so that only those who use it can turn it ON.


What I did

The implementation was simple.

  • Added a flag to /config
  • Added a guard before executing c1 / c2
  • Added status display to help

That's all there is to it.

However, there were a few design points here.


✅ The design I adopted

① Keep the configuration flag simple

public bool EnableCalendar { get; set; } = true;

👉 Don't overcomplicate it. One bool is enough.


② Guard at the command entry point

❌ Common approaches

  • Catching exceptions internally and swallowing them
  • Letting it fail after being called

✅ Adopted approach

if (!_config.EnableCalendar)
{
    ShowMessage("Calendar is OFF");
    return;
}

👉 Stopping it at the entry point is the simplest way.


③ Display status in help

c1 Today's schedule (OFF)
c2 Weekly schedule (OFF)

👉 This is surprisingly effective.

  • Knowing the command but having it not work → Stressful
  • Seeing "OFF" from the beginning → Acceptable

Points where I got stuck

The "Should I hide it if it's there?" problem

I was a bit hesitant at first.

  • Should I remove it from help?
  • Should I display it faintly?

In the end, I decided this:

👉 Don't hide it, but show the status.

Reason👇

  • I want them to know it exists.
  • But I want to clearly state why it's unusable.

👉 This balance felt the most natural.


What I realized (Important)

This was surprisingly significant this time.

👉 "Environment-dependent features are not 'features', they are 'options'."

Outlook integration is just a feature from a technical perspective, but in reality, it's split into:

  • Those who can use it
  • Those who cannot

👉 At this point, it's not a "standard feature".


Summary

The conclusion is simple.

👉 If it depends on the environment, putting an ON/OFF toggle is the right answer.

By actually doing it, what changed was:

  • UI awkwardness decreased.
  • The "it just doesn't work" frustration disappeared.

Even just this made things quite comfortable.


Download

GitHub

https://github.com/moritan777/tsk-releases/releases/latest

Download and extract tsk_v111.zip → Run with tsk.exe


Author: mitsukida
Contact: mmitsuki0806@gmail.com

Discussion