darcs

Patch 231 Make promptCharFancy easier to extend. (and 3 more)

Title Make promptCharFancy easier to extend. (and 3 more)
Superseder Nosy List galbolle, kowey
Related Issues
Status accepted Assigned To galbolle
Milestone

Created on 2010-05-04.16:37:21 by kowey, last changed 2011-05-10.19:37:12 by darcswatch. Tracked on DarcsWatch.

Files
File name Status Uploaded Type Edit Remove
make-promptcharfancy-easier-to-extend_.dpatch kowey, 2010-05-04.16:37:21 text/x-darcs-patch
make-promptcharfancy-easier-to-extend_.dpatch kowey, 2010-05-05.10:03:24 text/x-darcs-patch
make-promptcharfancy-easier-to-extend_.dpatch kowey, 2010-06-11.18:19:01 text/x-darcs-patch
unnamed kowey, 2010-05-04.16:37:21
unnamed kowey, 2010-05-05.10:03:24
unnamed kowey, 2010-06-11.18:19:01
See mailing list archives for discussion on individual patches.
Messages
msg10924 (view) Author: kowey Date: 2010-05-04.16:37:21
This is a procrastination patch :-(

The main change is to abbreviate the interactive one-character prompts,
so that instead of asking
    Shall I record this change? (1/8)  [ynWesfvplxdaqjk], or ? for help:
  we ask
    Shall I record this change? (1/8)  [yn...], or ? for more options:
  
The goal is to avoid user confusion by increasing the visibility of the most
important choices, but at the same time to preserve the discoverability of the
more advanced features (hence the "...").

4 patches for repository http://darcs.net:

Tue May  4 16:31:54 BST 2010  Eric Kow <kowey@darcs.net>
  * Make promptCharFancy easier to extend.

Tue May  4 17:28:19 BST 2010  Eric Kow <kowey@darcs.net>
  * Resolve issue1713: shorter interactive prompts.
  
  For example, instead of asking
    Shall I record this change? (1/8)  [ynWesfvplxdaqjk], or ? for help:
  we ask
    Shall I record this change? (1/8)  [yn...], or ? for more options:
  
  The goal is to make the most important options visible while making it
  evident that there are more advanced features to be used.

Tue May  4 17:32:16 BST 2010  Eric Kow <kowey@darcs.net>
  * Rename Darcs.Utils.promptCharFancy to promptChar.

Tue May  4 17:34:11 BST 2010  Eric Kow <kowey@darcs.net>
  * Camel case Darcs.SelectChanges.
Attachments
msg10929 (view) Author: kowey Date: 2010-05-05.10:03:24
4 patches for repository http://darcs.net:

Two patches amended in this one:

Wed May  5 10:53:42 BST 2010  Eric Kow <kowey@darcs.net>
  * Resolve issue1713: shorter interactive prompts.
  
  For example, instead of asking
    Shall I record this change? (1/8)  [ynWesfvplxdaqjk], or ? for help:
  we ask
    Shall I record this change? (1/8)  [ynW...], or ? for more options:
  
  The goal is to make the most important options visible while making it
  evident that there are more advanced features to be used.
  
  NB: one principle we try to respect is that the default choice should
  appear in the window of basic choices.

Wed May  5 10:56:40 BST 2010  Eric Kow <kowey@darcs.net>
  * Camel case Darcs.SelectChanges.

I don't understand what happened with the camel case patch.  Maybe I forgot
to include all of the replace patches the first time :-/
Attachments
msg11144 (view) Author: kowey Date: 2010-05-29.13:04:23
Hi Florent, if you wouldn't mind having a look at the amended patch...
msg11367 (view) Author: kowey Date: 2010-06-11.10:29:49
May I chase on this, Florent?  

I should probably work out some way of semi-automating the chasing.  For
example, every week the patch manager should receive a list of patches
where the last activity is over a week.
msg11375 (view) Author: galbolle Date: 2010-06-11.17:37:05
New patches:

[Make promptCharFancy easier to extend.
Eric Kow <kowey@darcs.net>**20100504153154
 Ignore-this: 709ac11d2884f9618cd9c755b9109c97
] hunk ./src/Darcs/SelectChanges.hs 72

Introduction of an auxiliray PromptConfig type, ok.

[Rename Darcs.Utils.promptCharFancy to promptChar.
Eric Kow <kowey@darcs.net>**20100504163216
 Ignore-this: f4c68187e3e4ad5f5a5cb850ce12f269
] replace ./src/Darcs/SelectChanges.hs [A-Za-z_0-9] promptCharFancy
promptChar
replace ./src/Darcs/Utils.hs [A-Za-z_0-9] promptCharFancy promptChar
[Resolve issue1713: shorter interactive prompts.
Eric Kow <kowey@darcs.net>**20100505095342
 Ignore-this: bfa234bf337140af441f59958ff72c7b
 
 For example, instead of asking
   Shall I record this change? (1/8)  [ynWesfvplxdaqjk], or ? for help:
 we ask
   Shall I record this change? (1/8)  [ynW...], or ? for more options:
 
 The goal is to make the most important options visible while making it
 evident that there are more advanced features to be used.
 
 NB: one principle we try to respect is that the default choice should
 appear in the window of basic choices.
] 
[snip uses of promptChar...]

 data PromptConfig = PromptConfig { pPrompt :: String
                                  , pCharacters :: [Char]
+                                 , pWindow  :: Maybe Int  -- ^ only
show the first N characters in prompt
                                  , pDefault :: Maybe Char
                                  , pHelp    :: [Char]
                                  }
hunk ./src/Darcs/Utils.hs 232
 
I'd rather have had the following, which seems more robust:

PromptConfig { pPrompt :: String
                                  , pBasicCharacters :: [Char]
+                                 , pAdvancedCharacters  :: [Char]  -- ^
Options only displayed on hitting ?
                                  , pDefault :: Maybe Char
                                  , pHelp    :: [Char]
                                  }

The rest is ok.

[Camel case Darcs.SelectChanges.
Eric Kow <kowey@darcs.net>**20100505095640
 Ignore-this: 38a462ddafc1ce5e4a898bc9180a1852
]
camel casing, ok

It's up to you whether you amend or I apply.
msg11376 (view) Author: kowey Date: 2010-06-11.18:19:01
This is as before plus one new patch which I implements Florent's suggested
improvements.  I think I'd like at least the first 4 to be applied now that
they've gone through review.

Thanks!

5 patches for repository http://darcs.net:

Tue May  4 16:31:54 BST 2010  Eric Kow <kowey@darcs.net>
  * Make promptCharFancy easier to extend.

Tue May  4 17:32:16 BST 2010  Eric Kow <kowey@darcs.net>
  * Rename Darcs.Utils.promptCharFancy to promptChar.

Wed May  5 10:53:42 BST 2010  Eric Kow <kowey@darcs.net>
  * Resolve issue1713: shorter interactive prompts.
  
  For example, instead of asking
    Shall I record this change? (1/8)  [ynWesfvplxdaqjk], or ? for help:
  we ask
    Shall I record this change? (1/8)  [ynW...], or ? for more options:
  
  The goal is to make the most important options visible while making it
  evident that there are more advanced features to be used.
  
  NB: one principle we try to respect is that the default choice should
  appear in the window of basic choices.

Wed May  5 10:56:40 BST 2010  Eric Kow <kowey@darcs.net>
  * Camel case Darcs.SelectChanges.

Fri Jun 11 19:08:07 BST 2010  Eric Kow <kowey@darcs.net>
  * More robust distinction between basic and advanced chars in prompt.
  As suggested by Florent Becker during review.
Attachments
msg11424 (view) Author: kowey Date: 2010-06-15.09:25:32
On Fri, Jun 11, 2010 at 18:19:01 +0000, Eric Kow wrote:
> This is as before plus one new patch which I implements Florent's suggested
> improvements.  I think I'd like at least the first 4 to be applied now that
> they've gone through review.

May I poke on this one?

> Fri Jun 11 19:08:07 BST 2010  Eric Kow <kowey@darcs.net>
>   * More robust distinction between basic and advanced chars in prompt.
>   As suggested by Florent Becker during review.

Thanks!

PS. To be honest, there's just this childish bit of me that's itching
    to be able to say "hey look! we finally fixed that UI bug you
    pointed out"  :-P
    http://www.serpentine.com/blog/2007/01/11/why-i-dont-like-darcs/

-- 
Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
PGP Key ID: 08AC04F9
msg11572 (view) Author: darcswatch Date: 2010-06-24.11:02:13
This patch bundle (with 5 patches) was just applied to the repository http://darcs.net/.
This message was brought to you by DarcsWatch
http://darcswatch.nomeata.de/repo_http:__darcs.net_.html#bundle-52c5c0574f281f4bab3298bfa30c37339591c6b5
msg11573 (view) Author: darcswatch Date: 2010-06-24.11:02:14
This patch bundle (with 4 patches) was just applied to the repository http://darcs.net/.
This message was brought to you by DarcsWatch
http://darcswatch.nomeata.de/repo_http:__darcs.net_.html#bundle-0b262ea553c8b1cc90ef0f1d042b122a10794eee
msg14154 (view) Author: darcswatch Date: 2011-05-10.19:06:28
This patch bundle (with 4 patches) was just applied to the repository http://darcs.net/reviewed.
This message was brought to you by DarcsWatch
http://darcswatch.nomeata.de/repo_http:__darcs.net_reviewed.html#bundle-0b262ea553c8b1cc90ef0f1d042b122a10794eee
msg14206 (view) Author: darcswatch Date: 2011-05-10.19:37:12
This patch bundle (with 5 patches) was just applied to the repository http://darcs.net/reviewed.
This message was brought to you by DarcsWatch
http://darcswatch.nomeata.de/repo_http:__darcs.net_reviewed.html#bundle-52c5c0574f281f4bab3298bfa30c37339591c6b5
History
Date User Action Args
2010-05-04 16:37:21koweycreate
2010-05-04 16:38:20darcswatchsetdarcswatchurl: http://darcswatch.nomeata.de/repo_http:__darcs.net_.html#bundle-ab36e5c5f833039df7382960885bec624b967ec4
2010-05-05 10:03:24koweysetfiles: + make-promptcharfancy-easier-to-extend_.dpatch, unnamed
messages: + msg10929
2010-05-05 10:04:50darcswatchsetdarcswatchurl: http://darcswatch.nomeata.de/repo_http:__darcs.net_.html#bundle-ab36e5c5f833039df7382960885bec624b967ec4 -> http://darcswatch.nomeata.de/repo_http:__darcs.net_.html#bundle-0b262ea553c8b1cc90ef0f1d042b122a10794eee
2010-05-29 13:04:23koweysetassignedto: galbolle
messages: + msg11144
nosy: + galbolle
2010-06-11 10:29:49koweysetnosy: - darcs-users
messages: + msg11367
2010-06-11 16:54:23galbollesetstatus: needs-review -> review-in-progress
2010-06-11 17:37:05galbollesetstatus: review-in-progress -> followup-requested
messages: + msg11375
2010-06-11 18:19:01koweysetfiles: + make-promptcharfancy-easier-to-extend_.dpatch, unnamed
messages: + msg11376
2010-06-11 18:19:55darcswatchsetdarcswatchurl: http://darcswatch.nomeata.de/repo_http:__darcs.net_.html#bundle-0b262ea553c8b1cc90ef0f1d042b122a10794eee -> http://darcswatch.nomeata.de/repo_http:__darcs.net_.html#bundle-52c5c0574f281f4bab3298bfa30c37339591c6b5
2010-06-15 09:25:32koweysetmessages: + msg11424
2010-06-18 16:53:23koweysetstatus: followup-requested -> needs-review
2010-06-22 11:59:06galbollesetstatus: needs-review -> accepted-pending-tests
2010-06-24 10:53:48galbollesetstatus: accepted-pending-tests -> accepted
2010-06-24 11:02:14darcswatchsetmessages: + msg11572
2010-06-24 11:02:14darcswatchsetmessages: + msg11573
2011-05-10 19:06:15darcswatchsetdarcswatchurl: http://darcswatch.nomeata.de/repo_http:__darcs.net_.html#bundle-52c5c0574f281f4bab3298bfa30c37339591c6b5 -> http://darcswatch.nomeata.de/repo_http:__darcs.net_reviewed.html#bundle-ab36e5c5f833039df7382960885bec624b967ec4
2011-05-10 19:06:28darcswatchsetmessages: + msg14154
2011-05-10 19:37:12darcswatchsetmessages: + msg14206