Uploaded image for project: 'MusicBrainz Server'
  1. MusicBrainz Server
  2. MBS-12979

Refactor report lists to filter out null items on the server

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • None
    • Reports, Templates
    • None

      Before our report list components used react-table, we used to display a placeholder row like "this entity no longer exists" if it was removed since the report was generated. Once we started using react-table, we decided to just filter these rows out altogether, but this filtering is done by the template: https://github.com/metabrainz/musicbrainz-server/blob/master/root/report/components/ArtistList.js#L35

      This means we have to set the report items' entity property Flow types to nullable, which makes writing the column definitions slightly more cumbersome due to us having to check for null. I don't see any reason we can't just filter these undef items out on the server, and change the types back to non-null in the template accordingly.

            Unassigned Unassigned
            bitmap Michael Wiencek
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                Version Package