Improving dt's UI

Vlad Skvortsov vss at 73rus.com
Sun Jun 22 20:14:24 PDT 2008


David Wolever wrote:
>>> - The 'add' command forces you to pick a version, and there is no way
>>> to set a default (breaking train of thought)
>> Hmm, we just never had such a requirement, but it seems to be trivial to
>> implement. It needs to be configurable though.
> Ok, sounds good.  When I get into work today I'll tinker with it it a 
> bit and see what I can do about a patch.

...so, am I understanding you correctly that you'd like to skip the 
version selection menu altogether if there is only one version in the 
"present" set? What if there are more than one?

I'm talking about the current dt UI (not about that you are proposing 
below).


>>> - There is no clear way to "just add something (comment, header, etc)
>>> to a ticket"
>> Again, just invoke 'dt act' and then use 'e' or 'h' commands
>> respectively. Or, dt act $ISSUE -m "Some comment"; dt act $ISSUE -a
>> change-header:header=value.
> Clearly I need to brush up on my RTFMing skills...
> While that is much easier than I thought it was, I still (at least in 
> theory) don't like the two steps -- it strikes me as a common use-case 
> that should be simpler...

And by "two steps" you mean that you have to invoke dt twice? Actually, 
it's possible to do both actions with a single invocation of dt:

dt act $ISSUE -m "Some comment" -a change-header:header=value


>>> It seems to me like it would be a lot easier to be given $EDITOR with
>>> the appropriate headers for any given action (ie, a `dt close` would
>>> add the "DT-New-Status: closed" header for you), then after $EDITOR
>>> is closed, check that everything is there, prompting (with a default,
>>> so enter can be mashed) for any missing values.
>> Hmm, currently -m or -F options are mandatory if -a is supplied to
>> 'act'. We could make them optional, and if they are omitted, drop into
>> $EDITOR with "preset" headers. Would it work for you?

After a second thought I think it's not a great idea: -a, -m and -F are 
used for non-interactive work, so people used to that (myself included) 
would find it surprising that an editor pops up when they (mistakenly) 
omitted, say, -m.

> That wouldn't be bad, but is there any reason not to just add another 
> command?

I would prefer to keep the number of commands to minimum, especially if 
there are ways to achieve the desired result using the existing ones. By 
the way, if your preference is to have a separate command for each 
logical action, this can be achieved by shell aliases.

As for the "drop me to an editor" functionality you mentioned, let me 
first take a look at your patch to better understand what you are 
looking for.

-- 
Vlad Skvortsov, vss at 73rus.com, http://vss.73rus.com



More information about the Dev mailing list