djencks commented on pull request #3879:
URL: https://github.com/apache/camel/pull/3879#issuecomment-638282969
- I left out an important sorting case, when group1 <> group2 but both are
present. This results in the sub-list being unsorted.
- Please change the group for the `AWS 2` sublist rather than the docTitle
for the parent.
- Use === and !== rather than == and !=
- Use const rather than let or var for constants
- line 166 is unnecessary and wrong (if present, it would need the
symmetrical other case with the titles in the other order).
- The ternary operator looks best when there are spaces surrounding both the
? and : (at least that's what I'm used to).
- I think the sorting code, which is rather complicated and hard to
understand, will be easier to read if we compute all the things we'll be
comparing at the top rather than over and over again, something like:
```
if (file1 === file2) return 0
var t
const group1 = (t = groupFrom(file1)) && t.toUpperCase()
const group2 = (t = groupFrom(file2)) && t.toUpperCase()
...//same for title1, title2
```
Locally, I'm seeing an additional generated change to AWS x-ray. Since this
is an "other" component I don't think it needs a group. I'm not sure why you
wouldn't see this.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]