Fluid Infusion

The wrapping of selection and reordering items via keyboard should be configurable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.2
  • Fix Version/s: 1.3
  • Component/s: Reorderer
  • Labels:
    None

Description

The wrapping of selection and reordering items via keyboard should be configurable

Some users, for example those using AT's, may not want reorderer to wrap around. Currently if you move an item down it will wrap to the top after reaching the end. This may make it difficult for some users to know what the boundaries are.
  1. 20100105_wrappingSwitch.patch
    07/Jan/10 11:28 AM
    5 kB
    Armin Krauss
  2. FLUID-3391.patch
    21/Oct/10 5:07 PM
    7 kB
    Golam Chowdhury
  3. FLUID-3391.v10.patch
    02/Nov/10 4:08 PM
    52 kB
    Golam Chowdhury
  4. FLUID-3391.v11.patch
    04/Nov/10 6:07 PM
    56 kB
    Golam Chowdhury
  5. FLUID-3391.v12.patch
    05/Nov/10 11:33 AM
    52 kB
    Golam Chowdhury
  6. FLUID-3391.v2.patch
    22/Oct/10 11:30 AM
    9 kB
    Golam Chowdhury
  7. FLUID-3391.v3.patch
    22/Oct/10 12:14 PM
    9 kB
    Golam Chowdhury
  8. FLUID-3391.v4.patch
    27/Oct/10 11:31 AM
    56 kB
    Golam Chowdhury
  9. FLUID-3391.v5.patch
    28/Oct/10 6:09 PM
    49 kB
    Golam Chowdhury
  10. FLUID-3391.v6.patch
    29/Oct/10 3:22 PM
    48 kB
    Golam Chowdhury
  11. FLUID-3391.v7.patch
    01/Nov/10 3:07 PM
    54 kB
    Golam Chowdhury
  12. FLUID-3391.v8.patch
    01/Nov/10 4:36 PM
    52 kB
    Golam Chowdhury
  13. FLUID-3391.v9.patch
    01/Nov/10 5:37 PM
    52 kB
    Golam Chowdhury

Activity

Hide
Armin Krauss added a comment -
I added the ability to switch of wrapping for the List reorderer during initialization.

Next steps after acceptance are to expose the functionality via a function to toggle it on/off
and integrate it into the example.

After this the wrapping switch should be introduced for other reorderers
Show
Armin Krauss added a comment - I added the ability to switch of wrapping for the List reorderer during initialization. Next steps after acceptance are to expose the functionality via a function to toggle it on/off and integrate it into the example. After this the wrapping switch should be introduced for other reorderers
Hide
Colin Clark added a comment -
This will be a critical fix for future versions of Decapod, as well as being a great a11y improvement. I've assigned it to Jonathan to help coordinate it with Decapod.
Show
Colin Clark added a comment - This will be a critical fix for future versions of Decapod, as well as being a great a11y improvement. I've assigned it to Jonathan to help coordinate it with Decapod.
Hide
Justin Obara added a comment -
a11y issue
Show
Justin Obara added a comment - a11y issue
Hide
Justin Obara added a comment -
Link to conversations from the fluid-work mailing list
http://old.nabble.com/Wrapping-around-in-ListReorderer-to26634522.html#a26750933
Show
Justin Obara added a comment - Link to conversations from the fluid-work mailing list http://old.nabble.com/Wrapping-around-in-ListReorderer-to26634522.html#a26750933
Hide
Justin Obara added a comment -
"Bug Parade Infusion 1.3"
Show
Justin Obara added a comment - "Bug Parade Infusion 1.3"
Hide
Golam Chowdhury added a comment -
FLUID-3391: FLUID-3391.patch gives the user the ability to turn on and off elements wrapping via keyboard.
Show
Golam Chowdhury added a comment - FLUID-3391: FLUID-3391.patch gives the user the ability to turn on and off elements wrapping via keyboard.
Hide
Golam Chowdhury added a comment -
FLUID-3391: FLUID-3391.v2.patch made some code changes. Also it includes everything from FLUID-3391.patch.
Show
Golam Chowdhury added a comment - FLUID-3391: FLUID-3391.v2.patch made some code changes. Also it includes everything from FLUID-3391.patch.
Hide
Golam Chowdhury added a comment -
FLUID-3391.v3.patch made some code changes. Includes everything from previous patches.
Show
Golam Chowdhury added a comment - FLUID-3391.v3.patch made some code changes. Includes everything from previous patches.
Hide
Antranig Basman added a comment -
Hi Golam - this patch is pretty good and addresses the more difficult part of the problem, which is modifying the geometric strategies to account for wrap locking. However, in our original implementation it was revealed that a lot of subtle bugs can result from trying to use a Geometric strategy in the "covariant" direction of the Reorderer, that is, the direction specified as the dominant orientation in the top-level configuration. So what needs to be done is to create a "disableWrap" version of the logical strategy to be used in this case - so, for example, on this section of the patch for Reorderer.js

@@ -675,7 +684,7 @@
 
         that.getRelativePosition =
            fluid.reorderer.relativeInfoGetter(options.orientation,
- fluid.reorderer.LOGICAL_STRATEGY, fluid.reorderer.SHUFFLE_GEOMETRIC_STRATEGY,
+ dropManager.disableWrap ? fluid.reorderer.SHUFFLE_GEOMETRIC_STRATEGY : fluid.reorderer.LOGICAL_STRATEGY , fluid.reorderer.SHUFFLE_GEOMETRIC_STRATEGY,
                  dropManager, dom);

you subsitute a goemetric strategy for the logical strategy in the case of disableWrap which will cause problems.

So, what the implementation requires is a modification of the getRelativeElement function (currently on line 455 of GeometricManager.js) to have signature

        function getRelativeElement(element, direction, elements, disableWrap) {

Although I said on our phone chat that we might want to create new versions of all the strategies, I am thinking now this is probably rather silly. What there should be instead is a modification of all of the signatures of the existing strategies - so that we now have

that.logicalFrom = function (element, direction, includeLocked, disableWrap)
that.lockedWrapFrom = function (element, direction, includeLocked, disableWrap)
etc.

since actually EVERY strategy we have currently can be varied in this way.

I couldn't see from your patch how it set about disabling wrapping for the ListReorderer - the "disableWrap" argument is present as configuration, and handed down to the dropManager - but as it stands now, the logicalFrom strategy would still perform wrapping? Which configurations of the Reorderer did you test your patch with?

Also, I don't believe we want this new behaviour to become the default - we can't change the behaviour of all reorderers for all existing users.

Also I want to query the subtask I see on this issue "Turning wrapping on/off via a function call after initialization" - what is motivating this task?
Show
Antranig Basman added a comment - Hi Golam - this patch is pretty good and addresses the more difficult part of the problem, which is modifying the geometric strategies to account for wrap locking. However, in our original implementation it was revealed that a lot of subtle bugs can result from trying to use a Geometric strategy in the "covariant" direction of the Reorderer, that is, the direction specified as the dominant orientation in the top-level configuration. So what needs to be done is to create a "disableWrap" version of the logical strategy to be used in this case - so, for example, on this section of the patch for Reorderer.js @@ -675,7 +684,7 @@            that.getRelativePosition =             fluid.reorderer.relativeInfoGetter(options.orientation, - fluid.reorderer.LOGICAL_STRATEGY, fluid.reorderer.SHUFFLE_GEOMETRIC_STRATEGY, + dropManager.disableWrap ? fluid.reorderer.SHUFFLE_GEOMETRIC_STRATEGY : fluid.reorderer.LOGICAL_STRATEGY , fluid.reorderer.SHUFFLE_GEOMETRIC_STRATEGY,                   dropManager, dom); you subsitute a goemetric strategy for the logical strategy in the case of disableWrap which will cause problems. So, what the implementation requires is a modification of the getRelativeElement function (currently on line 455 of GeometricManager.js) to have signature         function getRelativeElement(element, direction, elements, disableWrap) { Although I said on our phone chat that we might want to create new versions of all the strategies, I am thinking now this is probably rather silly. What there should be instead is a modification of all of the signatures of the existing strategies - so that we now have that.logicalFrom = function (element, direction, includeLocked, disableWrap) that.lockedWrapFrom = function (element, direction, includeLocked, disableWrap) etc. since actually EVERY strategy we have currently can be varied in this way. I couldn't see from your patch how it set about disabling wrapping for the ListReorderer - the "disableWrap" argument is present as configuration, and handed down to the dropManager - but as it stands now, the logicalFrom strategy would still perform wrapping? Which configurations of the Reorderer did you test your patch with? Also, I don't believe we want this new behaviour to become the default - we can't change the behaviour of all reorderers for all existing users. Also I want to query the subtask I see on this issue "Turning wrapping on/off via a function call after initialization" - what is motivating this task?
Hide
Golam Chowdhury added a comment -
FLUID-3391: FLUID-3391.v4.patch contains all the changes from v1-v3 patches and necessary test cases. Note: still in process of refactoring some of the test cases
Show
Golam Chowdhury added a comment - FLUID-3391: FLUID-3391.v4.patch contains all the changes from v1-v3 patches and necessary test cases. Note: still in process of refactoring some of the test cases
Hide
Golam Chowdhury added a comment -
FLUID-3391.v5.patch which contains everything from previous versions including test cases which was re-factored.
Show
Golam Chowdhury added a comment - FLUID-3391.v5.patch which contains everything from previous versions including test cases which was re-factored.
Hide
Golam Chowdhury added a comment -
FLUID-3391.v6.patch which contains everything from previous versions including test cases which was re-factored.
Show
Golam Chowdhury added a comment - FLUID-3391.v6.patch which contains everything from previous versions including test cases which was re-factored.
Hide
Golam Chowdhury added a comment -
FLUID-3391.v7.patch which contains everything from previous versions and re-factor of codes.
Show
Golam Chowdhury added a comment - FLUID-3391.v7.patch which contains everything from previous versions and re-factor of codes.
Hide
Golam Chowdhury added a comment -
FLUID-3391.v8.patch contains all changes from previous versions.
Show
Golam Chowdhury added a comment - FLUID-3391.v8.patch contains all changes from previous versions.
Hide
Golam Chowdhury added a comment -
FLUID-3391.v9.patch contains everything from previous versions.
Show
Golam Chowdhury added a comment - FLUID-3391.v9.patch contains everything from previous versions.
Hide
Golam Chowdhury added a comment -
FLUID-3391.v10.patch contains everything from previous versions and re-factored codes.
Show
Golam Chowdhury added a comment - FLUID-3391.v10.patch contains everything from previous versions and re-factored codes.
Hide
Antranig Basman added a comment -
Hi golam - my suggestion for patch "10" is that it should be possible to make a better consolidation of the three "step" test functions than "commonAction". These functions overall all take the same arguments, and the points of variability are
i) the different markup selected for "focusItem" which could be supplied as a function handle, ii) the different argument to bindReorderer, and iii) the difference in the precise method of simulating the keypress - which I'm not actually sure why this varies - why does moduleLayout use compositeKey and the other two use arg.key (ctrlKeyEvent) - would it be possible to consolidate these also?

A suitable signature might be
fluid.testUtils.reorderer.stepReorderer(container, options) where options contains
 {
   reordererFn
   reordererOptions
   direction
   expectOrderFn
   expectedOrderArrays
   focusElementFn
   
   you can then use fluid.invokeGlobalFunction(options.reordererFn, [container, options.reordererOptions]) to construct the reorderer etc.
then options.expectOrderFn(that, expectedOrderArrays[etc.]
Show
Antranig Basman added a comment - Hi golam - my suggestion for patch "10" is that it should be possible to make a better consolidation of the three "step" test functions than "commonAction". These functions overall all take the same arguments, and the points of variability are i) the different markup selected for "focusItem" which could be supplied as a function handle, ii) the different argument to bindReorderer, and iii) the difference in the precise method of simulating the keypress - which I'm not actually sure why this varies - why does moduleLayout use compositeKey and the other two use arg.key (ctrlKeyEvent) - would it be possible to consolidate these also? A suitable signature might be fluid.testUtils.reorderer.stepReorderer(container, options) where options contains  {    reordererFn    reordererOptions    direction    expectOrderFn    expectedOrderArrays    focusElementFn        you can then use fluid.invokeGlobalFunction(options.reordererFn, [container, options.reordererOptions]) to construct the reorderer etc. then options.expectOrderFn(that, expectedOrderArrays[etc.]
Hide
Golam Chowdhury added a comment -
FLUID-3391.v11.patch contains everything from previous patches and some re-factored codes.
Show
Golam Chowdhury added a comment - FLUID-3391.v11.patch contains everything from previous patches and some re-factored codes.
Hide
Antranig Basman added a comment -
Hi there Golam - v11 of the patch looks good. Just to tidy up i) since just one function call now exists to "commonAction" it should simply be folded into the main body of the caller, especially since it has no particularly well-defined function of its own, ii) please ensure that all tabs are converted to spaces in the patch (see if someone can help you out with Eclipse/Aptana settings) and then we can get the patch committed - thanks for all your hard work on this, Antranig.
Show
Antranig Basman added a comment - Hi there Golam - v11 of the patch looks good. Just to tidy up i) since just one function call now exists to "commonAction" it should simply be folded into the main body of the caller, especially since it has no particularly well-defined function of its own, ii) please ensure that all tabs are converted to spaces in the patch (see if someone can help you out with Eclipse/Aptana settings) and then we can get the patch committed - thanks for all your hard work on this, Antranig.
Hide
Golam Chowdhury added a comment -
FLUID-3391.v12.patch contains everything from previous patches and some code cleanup with JSLint.
Show
Golam Chowdhury added a comment - FLUID-3391.v12.patch contains everything from previous patches and some code cleanup with JSLint.
Hide
Antranig Basman added a comment -
Committed at revision 10190
Show
Antranig Basman added a comment - Committed at revision 10190

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved:

Time Tracking

Estimated:
2m
Original Estimate - 2m
Remaining:
2m
Remaining Estimate - 2m
Logged:
Not Specified
Time Spent - Not Specified