Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-15665

Tab order in summary view unstable

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.4.9, 4.5
    • Fix Version/s: 4.6
    • Component/s: Core CiviCRM
    • Labels:
      None
    • Documentation Required?:
      None

      Description

      The order of the tabs in the summary view is determined by their weight. However, if the weight is the same, the second of the compared tabs is preferred.

      This works fine as long as the tab list is not modified. But if you extend the tabs this might lead to a different comparison call (e.g. cmpFunc(tabB, tabA) instead of the former cmpFunc(tabA, tabB)), resulting in a different order of the default tabs after activating an extension.

      In our case, activating our extension swapped the position of the activities and contributions tabs, which turn out to have the same weight.

      We suggest to refine the compare function and use an extra criteria in case of equal weights. This way, we could avoid these unexpected changes in the tab order. This should generally affect all things sorted by weight.

      I am aware that strictly speaking the order is not defined in the case of equal weights, but I think we can all agree that unrelated tabs shouldn't randomly change order when adding/removing others.

        Attachments

          Activity

            People

            • Assignee:
              colemanw Coleman Watts
              Reporter:
              b.systopia Björn Endres
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: