Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Feature request - 'natural' treatment of null strings in default orderBy comparator #15294

Closed

Description

@arw-travela

Feature request in response to #15293:

As of 1.3.7, orderBy on a collection of strings that includes null strings will sort those items with null strings as if they were the string 'null', so will place them in the middle of a sorted list. The "natural" sorting of null elements in a list is to put them at the end of the list (or front, when reverse-sorting). Note that this was the behavior pre-1.3.7.

Activity

  1. added this to the 1.7.0 milestone on Oct 19, 2016
  2. gkalpak commented on Oct 19, 2016

    @gkalpak
    Member

    To be clear this does not only affect lists of strings, but any values. Basically, null is treated in the exact same way as the string 'null' (as far orderBy is concerned).

    It seems reasonable to treat it in a special way. Note that undefined is already put at the end of the list, because it's type 'undefined' happens to start with a u 😃 I think it makes sense to explicitly put null/undefined at the end of a sorted list.

    Notes:

    1. This will affect the default, built-in comparator for orderBy, as well as custom comparators.
    2. The changes need to be clearly documented in the orderBy docs (which discusses the internal sorting algorithm).
  3. gitcoinbot commented on Oct 1, 2017

    @gitcoinbot

    This issue now has a funding of 0.02 ETH (6.02 USDT) attached to it. To view or claim this funding, click here.

  4. frederikprijck commented on Oct 1, 2017

    @frederikprijck
    Contributor

    I'm working on this one, will create a PR asap.

  5. dntxos commented on Oct 2, 2017

    @dntxos

    awesome @frederikprijck ... I liked this feature request and i was wanting to try gitcoin... ;-)

  6. owocki commented on Dec 4, 2017

    @owocki

    hey from gitcoin.co folks -- @frederikprijck did you ever turn this around? if not, let us know so we can source someone new. if so @dntxos maybe time to pay out?

  7. frederikprijck commented on Dec 17, 2017

    @frederikprijck
    Contributor

    Hey @owocki / @dntxos ,

    Sorry for taking so long, but the PR is up and awaiting reviewing. It looks like the gitcoin url is expired tho. I guess that makes me unable to claim it, right ? Any chance it can be refreshed ?

  8. owocki commented on Dec 18, 2017

    @owocki

    @dntxos you are the bounty submitter. are you still waying to pay out this bounty? cc @frederikprijck

  9. dntxos commented on Dec 18, 2017

    @dntxos
  10. owocki commented on Dec 18, 2017

    @owocki

    @frederikprijck you are good to go. the bounty submitter can still pay out the bounty after the 'official' expiration

  11. frederikprijck commented on Jan 10, 2018

    @frederikprijck
    Contributor

    @owocki The PR is there (for a while now), so awaiting merging! :)


    Poking @gkalpak for obvious reasons. 💩

  12. frederikprijck commented on Jan 25, 2018

    @frederikprijck
    Contributor

    Wohoow, it's merged! 🎊

  13. dntxos commented on Jan 25, 2018

    @dntxos

    I dont know how can i change the 'expired' status of my gitcoin bounty. I think @owocki can help with this.
    Anyway, tks @frederikprijck ... I was excited about the gitcoin idea and wanted to try... Its Awesome

  14. owocki commented on Jan 25, 2018

    @owocki

    hey @dntxos the bounty submitter can still pay out the bounty after the 'official' expiration. so you can still accept the bounty even if it's expired :)

    Just go to https://gitcoin.co/funding/details?url=https://github.com/angular/angular.js/issues/15294 and go through the accept flow.

  15. dntxos commented on Jan 25, 2018

    @dntxos

    Where???

    image

  16. dntxos commented on Jan 25, 2018

    @dntxos

    @owocki this link just show me a 'clawback' option

  17. owocki commented on Jan 25, 2018

    @owocki

    Hi @dntxos sorry for the confusion.

    i didnt realize this when i left my comment earlier but.... the gitcoin team had to migrate all of the bounties from an old smart contract to a new smart contract a few months ago. there are more details here https://medium.com/gitcoin/critical-security-vulnerability-patched-2017-11-10-9472db340692 ; but the TLDR is that the new bounty doesnt exist on the new smart contract.. and that's why you're not seeing the link.

    i'm very sorry for the inconvenience. im willing to payout the bounty to @frederikprijck myself to make it up to you.

    @frederikprijck ill leave you a tip now.

  18. gitcoinbot commented on Jan 25, 2018

    @gitcoinbot

    ⚡️ A tip worth 0.025 ETH ($26.34) has been granted to @frederikprijck for this issue from Kevin. ⚡️

    The sender had the following public comments:

    this is for the bounty (see comment above)

    Nice work @frederikprijck, check your email for further instructions.

  19. frederikprijck commented on Jan 25, 2018

    @frederikprijck
    Contributor

    @owocki Thanks, amazing platform btw!

    @dntxos Thanks aswell :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions