ActionEnabling » History » Version 4

Version 3 (Chris Cannam, 2010-11-23 02:45 PM) → Version 4/8 (Chris Cannam, 2010-11-24 01:15 PM)

h1. When actions should be enabled

h2. Simple cases

* *Open* - always

Apart from Open, everything depends in the first instance on having a valid local work path -- this will be assumed below.

* *Refresh* - always
* *Preview* - whenever a remote URL is set
* *Pull* - whenever a remote URL is set
* *Push* - whenever a remote URL is set

h2. More complicated things

* *Revert* - whenever a file has been modified, added, or removed since commit
* *Commit* - whenever a file has been modified, added, or removed since commit

Some of the remaining functions look like they should behave differently depending h2. Things that depend on whether the Work which tab or History tab is active. However, I think that's probably confusing -- they should behave the same regardless of which active

h3. With Work
tab is selected; that behaviour should be the "most obvious" behaviour where possible; and they should notify you quite clearly of what you are about to do in a confirmation dialog (which should be the same dialog as asks active

h4. Diff

* *No changes since commit* - inactive
* *No modified files selected* - show diff
for your commit message, if appropriate). folder against parent
* *Modified files selected* - show diff for files against parent


Generally speaking, when I've characterised in the past behaviour as varying by tab, that's because I've been imagining having a separate selection in both tabs. But I think that's wrong -- there h4. Update

In principle,
should be no selection in the History tab. If you want active only when current branch has something to use a specific changeset in a function, there should be a right-button menu for that. update to. There are no "beginner" functions In practice that need a specific changeset, only "expert" ones. may be too complicated, so probably just make it active always.

h4. Merge

Review this.

h4. Add, Remove

* *Add* - when at least one untracked file is selected, and no other files are
* *Remove* - when at least one tracked file is selected, and no untracked files are

N.B. the latter implies we need to be able to show unmodified, tracked files.

h3. With History tab active

h4.
Diff

* *No changes since commit* changeset selected* - inactive
* *No modified files *One changeset selected* - show diff for folder against its parent
* *Modified files *Two changesets selected* - show diff for files against parent between them

h3. Update

In principle, should be active only when current branch has something to update to. In practice that may be too complicated, so probably just make it active always.

h3.
h4. Merge

Review this.

h2. Functions currently missing entirely

* *Create branch*
* *Tag*
* *Rename*