The Trunk: Monticello-fbs.581.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Monticello-fbs.581.mcz

commits-2
Frank Shearar uploaded a new version of Monticello to project The Trunk:
http://source.squeak.org/trunk/Monticello-fbs.581.mcz

==================== Summary ====================

Name: Monticello-fbs.581
Author: fbs
Time: 18 January 2014, 4:58:44.499 pm
UUID: bd327588-05f4-cf4c-87cd-1f5039cb4b04
Ancestors: Monticello-cmm.580

When browsing the history of a version, you may now select the current version and find out its changes relative to its ancestor.

=============== Diff against Monticello-cmm.580 ===============

Item was changed:
  ----- Method: MCVersionHistoryBrowser>>getMenu: (in category 'morphic ui') -----
  getMenu: aMenu
+ | menuSpecs |
+ menuSpecs := (self selectedInfo ancestors collect: [:parent |
- self selection < 2 ifTrue: [^ aMenu].
- self fillMenu: aMenu fromSpecs:
- {{'view changes to ', ancestry name . #viewChanges}},
- (self selectedInfo ancestors collect: [:parent |
  {'view changes from ', parent name . #viewChanges: . parent}]),
  #(('spawn history' spawnHistory)
  ('search history' searchHistory)).
+ self selection > 1 ifTrue: [
+ menuSpecs := {{'view changes to ', ancestry name . #viewChanges}}, menuSpecs].
+
+ self fillMenu: aMenu fromSpecs: menuSpecs.
  ^ aMenu!


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Monticello-fbs.581.mcz

Chris Muller-3
Could you help me understand what this change is about?  Without
trying to understand the code, I see no difference in the behavior,
except that now it blows up when yellow-clicking when nothing is
selected.

Thanks.

On Sat, Jan 18, 2014 at 10:58 AM,  <[hidden email]> wrote:

> Frank Shearar uploaded a new version of Monticello to project The Trunk:
> http://source.squeak.org/trunk/Monticello-fbs.581.mcz
>
> ==================== Summary ====================
>
> Name: Monticello-fbs.581
> Author: fbs
> Time: 18 January 2014, 4:58:44.499 pm
> UUID: bd327588-05f4-cf4c-87cd-1f5039cb4b04
> Ancestors: Monticello-cmm.580
>
> When browsing the history of a version, you may now select the current version and find out its changes relative to its ancestor.
>
> =============== Diff against Monticello-cmm.580 ===============
>
> Item was changed:
>   ----- Method: MCVersionHistoryBrowser>>getMenu: (in category 'morphic ui') -----
>   getMenu: aMenu
> +       | menuSpecs |
> +       menuSpecs := (self selectedInfo ancestors collect: [:parent |
> -       self selection < 2 ifTrue: [^ aMenu].
> -       self fillMenu: aMenu fromSpecs:
> -               {{'view changes to ', ancestry name . #viewChanges}},
> -               (self selectedInfo ancestors collect: [:parent |
>                         {'view changes from ', parent name . #viewChanges: . parent}]),
>                 #(('spawn history' spawnHistory)
>                 ('search history' searchHistory)).
> +       self selection > 1 ifTrue: [
> +               menuSpecs := {{'view changes to ', ancestry name . #viewChanges}}, menuSpecs].
> +
> +       self fillMenu: aMenu fromSpecs: menuSpecs.
>         ^ aMenu!
>
>

Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Monticello-fbs.581.mcz

Chris Muller-3
Ok, I see.  It's so you can select the working copy and still get a
context menu.  But everything on that menu is available from the first
ancestor (2nd item in the list).  I know, doing that presents the
changes from the other viewpoint, but I'd rather not have the blow
up..

On Tue, Jan 21, 2014 at 3:23 PM, Chris Muller <[hidden email]> wrote:

> Could you help me understand what this change is about?  Without
> trying to understand the code, I see no difference in the behavior,
> except that now it blows up when yellow-clicking when nothing is
> selected.
>
> Thanks.
>
> On Sat, Jan 18, 2014 at 10:58 AM,  <[hidden email]> wrote:
>> Frank Shearar uploaded a new version of Monticello to project The Trunk:
>> http://source.squeak.org/trunk/Monticello-fbs.581.mcz
>>
>> ==================== Summary ====================
>>
>> Name: Monticello-fbs.581
>> Author: fbs
>> Time: 18 January 2014, 4:58:44.499 pm
>> UUID: bd327588-05f4-cf4c-87cd-1f5039cb4b04
>> Ancestors: Monticello-cmm.580
>>
>> When browsing the history of a version, you may now select the current version and find out its changes relative to its ancestor.
>>
>> =============== Diff against Monticello-cmm.580 ===============
>>
>> Item was changed:
>>   ----- Method: MCVersionHistoryBrowser>>getMenu: (in category 'morphic ui') -----
>>   getMenu: aMenu
>> +       | menuSpecs |
>> +       menuSpecs := (self selectedInfo ancestors collect: [:parent |
>> -       self selection < 2 ifTrue: [^ aMenu].
>> -       self fillMenu: aMenu fromSpecs:
>> -               {{'view changes to ', ancestry name . #viewChanges}},
>> -               (self selectedInfo ancestors collect: [:parent |
>>                         {'view changes from ', parent name . #viewChanges: . parent}]),
>>                 #(('spawn history' spawnHistory)
>>                 ('search history' searchHistory)).
>> +       self selection > 1 ifTrue: [
>> +               menuSpecs := {{'view changes to ', ancestry name . #viewChanges}}, menuSpecs].
>> +
>> +       self fillMenu: aMenu fromSpecs: menuSpecs.
>>         ^ aMenu!
>>
>>

Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Monticello-fbs.581.mcz

Frank Shearar-3
It's to fix a serious flaw in the History workflow :) I keep selecting
the top item, wanting to know "how does it differ compared to its
ancestor" and failing. Selecting the _second_ item does _not_ yield
the same information: it yields the _inverse_ change. OK, so I know
you said you know that.

You say "blow up" - what do you mean? Do you see an error?

frank

On 21 January 2014 21:36, Chris Muller <[hidden email]> wrote:

> Ok, I see.  It's so you can select the working copy and still get a
> context menu.  But everything on that menu is available from the first
> ancestor (2nd item in the list).  I know, doing that presents the
> changes from the other viewpoint, but I'd rather not have the blow
> up..
>
> On Tue, Jan 21, 2014 at 3:23 PM, Chris Muller <[hidden email]> wrote:
>> Could you help me understand what this change is about?  Without
>> trying to understand the code, I see no difference in the behavior,
>> except that now it blows up when yellow-clicking when nothing is
>> selected.
>>
>> Thanks.
>>
>> On Sat, Jan 18, 2014 at 10:58 AM,  <[hidden email]> wrote:
>>> Frank Shearar uploaded a new version of Monticello to project The Trunk:
>>> http://source.squeak.org/trunk/Monticello-fbs.581.mcz
>>>
>>> ==================== Summary ====================
>>>
>>> Name: Monticello-fbs.581
>>> Author: fbs
>>> Time: 18 January 2014, 4:58:44.499 pm
>>> UUID: bd327588-05f4-cf4c-87cd-1f5039cb4b04
>>> Ancestors: Monticello-cmm.580
>>>
>>> When browsing the history of a version, you may now select the current version and find out its changes relative to its ancestor.
>>>
>>> =============== Diff against Monticello-cmm.580 ===============
>>>
>>> Item was changed:
>>>   ----- Method: MCVersionHistoryBrowser>>getMenu: (in category 'morphic ui') -----
>>>   getMenu: aMenu
>>> +       | menuSpecs |
>>> +       menuSpecs := (self selectedInfo ancestors collect: [:parent |
>>> -       self selection < 2 ifTrue: [^ aMenu].
>>> -       self fillMenu: aMenu fromSpecs:
>>> -               {{'view changes to ', ancestry name . #viewChanges}},
>>> -               (self selectedInfo ancestors collect: [:parent |
>>>                         {'view changes from ', parent name . #viewChanges: . parent}]),
>>>                 #(('spawn history' spawnHistory)
>>>                 ('search history' searchHistory)).
>>> +       self selection > 1 ifTrue: [
>>> +               menuSpecs := {{'view changes to ', ancestry name . #viewChanges}}, menuSpecs].
>>> +
>>> +       self fillMenu: aMenu fromSpecs: menuSpecs.
>>>         ^ aMenu!
>>>
>>>
>

Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Monticello-fbs.581.mcz

Chris Muller-4
With your change, yellow-click on any item in the history list.  Boom.

How is what you want different than simply selecting the "Changes"
button on the MC browser?


On Tue, Jan 21, 2014 at 4:52 PM, Frank Shearar <[hidden email]> wrote:

> It's to fix a serious flaw in the History workflow :) I keep selecting
> the top item, wanting to know "how does it differ compared to its
> ancestor" and failing. Selecting the _second_ item does _not_ yield
> the same information: it yields the _inverse_ change. OK, so I know
> you said you know that.
>
> You say "blow up" - what do you mean? Do you see an error?
>
> frank
>
> On 21 January 2014 21:36, Chris Muller <[hidden email]> wrote:
>> Ok, I see.  It's so you can select the working copy and still get a
>> context menu.  But everything on that menu is available from the first
>> ancestor (2nd item in the list).  I know, doing that presents the
>> changes from the other viewpoint, but I'd rather not have the blow
>> up..
>>
>> On Tue, Jan 21, 2014 at 3:23 PM, Chris Muller <[hidden email]> wrote:
>>> Could you help me understand what this change is about?  Without
>>> trying to understand the code, I see no difference in the behavior,
>>> except that now it blows up when yellow-clicking when nothing is
>>> selected.
>>>
>>> Thanks.
>>>
>>> On Sat, Jan 18, 2014 at 10:58 AM,  <[hidden email]> wrote:
>>>> Frank Shearar uploaded a new version of Monticello to project The Trunk:
>>>> http://source.squeak.org/trunk/Monticello-fbs.581.mcz
>>>>
>>>> ==================== Summary ====================
>>>>
>>>> Name: Monticello-fbs.581
>>>> Author: fbs
>>>> Time: 18 January 2014, 4:58:44.499 pm
>>>> UUID: bd327588-05f4-cf4c-87cd-1f5039cb4b04
>>>> Ancestors: Monticello-cmm.580
>>>>
>>>> When browsing the history of a version, you may now select the current version and find out its changes relative to its ancestor.
>>>>
>>>> =============== Diff against Monticello-cmm.580 ===============
>>>>
>>>> Item was changed:
>>>>   ----- Method: MCVersionHistoryBrowser>>getMenu: (in category 'morphic ui') -----
>>>>   getMenu: aMenu
>>>> +       | menuSpecs |
>>>> +       menuSpecs := (self selectedInfo ancestors collect: [:parent |
>>>> -       self selection < 2 ifTrue: [^ aMenu].
>>>> -       self fillMenu: aMenu fromSpecs:
>>>> -               {{'view changes to ', ancestry name . #viewChanges}},
>>>> -               (self selectedInfo ancestors collect: [:parent |
>>>>                         {'view changes from ', parent name . #viewChanges: . parent}]),
>>>>                 #(('spawn history' spawnHistory)
>>>>                 ('search history' searchHistory)).
>>>> +       self selection > 1 ifTrue: [
>>>> +               menuSpecs := {{'view changes to ', ancestry name . #viewChanges}}, menuSpecs].
>>>> +
>>>> +       self fillMenu: aMenu fromSpecs: menuSpecs.
>>>>         ^ aMenu!
>>>>
>>>>
>>

Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Monticello-fbs.581.mcz

Chris Muller-3
> How is what you want different than simply selecting the "Changes"
> button on the MC browser?

Answering my own question, "because I might be in the History browser
and that should work."  NP, it should be there..

But this blow up isn't obvious to me and something suggests a timing
issue that might be the sign of a bug exposed, than created.

Putting

      100 milliSeconds asDelay wait.

at the top of MCVersionHistoryBrowser>>#getMenu: avoids blow up.
Something causing the #selectedInfo to not be there immediately -- so
maybe this is related to the pre-selection thingy?  (What is that BTW?
-- I know, something to indicate clicked but before it highlights
while it works on the task -- but I never saw it render unless it's
subtle and I missed it).



and when I try to debug it it works.  looks like it might even be a
timing issue with the selection

>
>
> On Tue, Jan 21, 2014 at 4:52 PM, Frank Shearar <[hidden email]> wrote:
>> It's to fix a serious flaw in the History workflow :) I keep selecting
>> the top item, wanting to know "how does it differ compared to its
>> ancestor" and failing. Selecting the _second_ item does _not_ yield
>> the same information: it yields the _inverse_ change. OK, so I know
>> you said you know that.
>>
>> You say "blow up" - what do you mean? Do you see an error?
>>
>> frank
>>
>> On 21 January 2014 21:36, Chris Muller <[hidden email]> wrote:
>>> Ok, I see.  It's so you can select the working copy and still get a
>>> context menu.  But everything on that menu is available from the first
>>> ancestor (2nd item in the list).  I know, doing that presents the
>>> changes from the other viewpoint, but I'd rather not have the blow
>>> up..
>>>
>>> On Tue, Jan 21, 2014 at 3:23 PM, Chris Muller <[hidden email]> wrote:
>>>> Could you help me understand what this change is about?  Without
>>>> trying to understand the code, I see no difference in the behavior,
>>>> except that now it blows up when yellow-clicking when nothing is
>>>> selected.
>>>>
>>>> Thanks.
>>>>
>>>> On Sat, Jan 18, 2014 at 10:58 AM,  <[hidden email]> wrote:
>>>>> Frank Shearar uploaded a new version of Monticello to project The Trunk:
>>>>> http://source.squeak.org/trunk/Monticello-fbs.581.mcz
>>>>>
>>>>> ==================== Summary ====================
>>>>>
>>>>> Name: Monticello-fbs.581
>>>>> Author: fbs
>>>>> Time: 18 January 2014, 4:58:44.499 pm
>>>>> UUID: bd327588-05f4-cf4c-87cd-1f5039cb4b04
>>>>> Ancestors: Monticello-cmm.580
>>>>>
>>>>> When browsing the history of a version, you may now select the current version and find out its changes relative to its ancestor.
>>>>>
>>>>> =============== Diff against Monticello-cmm.580 ===============
>>>>>
>>>>> Item was changed:
>>>>>   ----- Method: MCVersionHistoryBrowser>>getMenu: (in category 'morphic ui') -----
>>>>>   getMenu: aMenu
>>>>> +       | menuSpecs |
>>>>> +       menuSpecs := (self selectedInfo ancestors collect: [:parent |
>>>>> -       self selection < 2 ifTrue: [^ aMenu].
>>>>> -       self fillMenu: aMenu fromSpecs:
>>>>> -               {{'view changes to ', ancestry name . #viewChanges}},
>>>>> -               (self selectedInfo ancestors collect: [:parent |
>>>>>                         {'view changes from ', parent name . #viewChanges: . parent}]),
>>>>>                 #(('spawn history' spawnHistory)
>>>>>                 ('search history' searchHistory)).
>>>>> +       self selection > 1 ifTrue: [
>>>>> +               menuSpecs := {{'view changes to ', ancestry name . #viewChanges}}, menuSpecs].
>>>>> +
>>>>> +       self fillMenu: aMenu fromSpecs: menuSpecs.
>>>>>         ^ aMenu!
>>>>>
>>>>>
>>>
>

Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Monticello-fbs.581.mcz

timrowledge

On 21-01-2014, at 5:29 PM, Chris Muller <[hidden email]> wrote:

>> How is what you want different than simply selecting the "Changes"
>> button on the MC browser?
>
> Answering my own question, "because I might be in the History browser
> and that should work."  NP, it should be there..
>
> But this blow up isn't obvious to me and something suggests a timing
> issue that might be the sign of a bug exposed, than created.
>
> Putting
>
>      100 milliSeconds asDelay wait.
>
> at the top of MCVersionHistoryBrowser>>#getMenu: avoids blow up.
> Something causing the #selectedInfo to not be there immediately -- so
> maybe this is related to the pre-selection thingy?  

Sounds like the work triggered by selecting the list entry is taking a ‘long time’ (by some definition) and the pre-select is therefore in a state not able to cater for a menu selection. The question likely to need answering is why it takes so long to do the list selection work. So far as I can make out from the code it should be pretty fast.

tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Oxymorons: Living dead



Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Monticello-fbs.581.mcz

charlie robert
+1

On Jan 21, 2014, at 7:57 PM, tim Rowledge <[hidden email]> wrote:


On 21-01-2014, at 5:29 PM, Chris Muller <[hidden email]> wrote:

How is what you want different than simply selecting the "Changes"
button on the MC browser?

Answering my own question, "because I might be in the History browser
and that should work."  NP, it should be there..

But this blow up isn't obvious to me and something suggests a timing
issue that might be the sign of a bug exposed, than created.

Putting

    100 milliSeconds asDelay wait.

at the top of MCVersionHistoryBrowser>>#getMenu: avoids blow up.
Something causing the #selectedInfo to not be there immediately -- so
maybe this is related to the pre-selection thingy?  

Sounds like the work triggered by selecting the list entry is taking a ‘long time’ (by some definition) and the pre-select is therefore in a state not able to cater for a menu selection. The question likely to need answering is why it takes so long to do the list selection work. So far as I can make out from the code it should be pretty fast.

tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Oxymorons: Living dead




- charlie robert






Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Monticello-fbs.581.mcz

Balázs Kósi
Hi,

I don't think it's a timing issue. In the previous version, if nothing was selected, then a yellow click would select the item, but won't bring up the menu. This behaviour can be easily restored by adding back the guard

       self selection < 2 ifTrue: [^ aMenu].

with a slight modification of changing the 2 to 1.

self selection < 2 means "no item is selected" or "the first item is selected". Now that we have a menu for the first item, we still need to guard for the "no item is selected" case.

Cheers, Balazs


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Monticello-fbs.581.mcz

Balázs Kósi-2
In reply to this post by Chris Muller-3

Something causing the #selectedInfo to not be there immediately -- so
maybe this is related to the pre-selection thingy?  (What is that BTW?
-- I know, something to indicate clicked but before it highlights
while it works on the task -- but I never saw it render unless it's
subtle and I missed it).



Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Monticello-fbs.581.mcz

Frank Shearar-3
Balazs is right. I neglected to protect against self selection = 0, like a fool.

It occurs to me that a nice project would be a UI tester: given some UI, find every list widget, and try all the various clicks on it, with and without selecting things first, to try find things the programmer forgot to do. (Why yes, this would require a model that only talked to mocks!)

frank

On 22 Jan 2014, at 8:24, Balázs Kósi <[hidden email]> wrote:


Something causing the #selectedInfo to not be there immediately -- so
maybe this is related to the pre-selection thingy?  (What is that BTW?
-- I know, something to indicate clicked but before it highlights
while it works on the task -- but I never saw it render unless it's
subtle and I missed it).