Ticket #521 (closed Defect: fixed)

Opened 7 years ago

Last modified 7 years ago

webclient: list-items not sorted alphabetically in page panel

Reported by: Malte Owned by: jri
Priority: Major Milestone:
Component: DeepaMehta Standard Distribution Version: 4.1.2
Keywords: Cc:
Complexity: 1 Area: GUI / Usability
Module: deepamehta-webclient

Description

Currently, e.g. a list of associated Topics does not read as alphabetically sorted because the sort function in JavaScript? does not compare strings using toLowerCase(), so currently the term "audio" is listed after "Zoltan".

Change History

comment:1 Changed 7 years ago by jri

  • Status changed from new to accepted

comment:2 Changed 7 years ago by Jörg Richter

  • Status changed from accepted to closed
  • Resolution set to fixed

Webclient: case-insensitive topic sorting (#521).

The "what's related" topic listing in the detail panel is sorted case-insensitively.
Thanks, Malte, for reporting!

Close #521.

comment:3 Changed 7 years ago by Jörg Richter

Webclient: case-insensitive topic sorting (#521).

The "what's related" topic listing in the detail panel is sorted case-insensitively.
Thanks, Malte, for reporting!

Close #521.

comment:4 Changed 7 years ago by jri

  • Status changed from closed to reopened
  • Resolution fixed deleted

Sorting does not always work. Sometimes a client-side error occurs and breaks the page panel rendering:

TypeError: 'undefined' is not a function (evaluating 'topic_1.value.toLowerCase()')
rest_client.js:257

I guess this happens with non-text child topics.

To force the error try revealing the DeepaMehta workspace (by selecting it from the Workspace menu).

comment:5 Changed 7 years ago by Malte

Correct, I could reproduce that.
We could do cast the to be compared values to become a String in before comparison, like this:

var a_value = "" + topic_1.value
// and then compare that
a_value.toLowerCase()

Sorry, there might be better solutions but I don't got one at hand for this right now.

comment:6 Changed 7 years ago by Jörg Richter

  • Status changed from reopened to closed
  • Resolution set to fixed

Webclient fix: sorting non-string values (#521).

Topic listings in the detail panel display properly also when non-string topic values are involved.

Note: for pagmatic reasons numeric values are sorted alphanumerically.

Close #521.

Note: See TracTickets for help on using tickets.