Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MBS-10365 (V): Convert entity lists to react-table #1414

Merged
merged 4 commits into from Mar 20, 2020

Conversation

reosarevok
Copy link
Member

On top of #1413

MBS-10365

  • Artist
  • Event
  • Recording
  • Release
  • Release group

Artist (the only one left) is a bit more annoying since the component is currently being shared between search results and normal lists. We might want to split that one for now, until we can figure out how to easily do search results with react-table.

@reosarevok reosarevok added the React PRs directly related with React conversion label Mar 9, 2020
@reosarevok reosarevok added this to the Maman requin milestone Mar 9, 2020
Copy link
Contributor

@yvanzo yvanzo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works nicely. Just commented about tracking changes in second commit. See other PR for first commit.

root/utility/tableColumns.js Outdated Show resolved Hide resolved
@yvanzo
Copy link
Contributor

yvanzo commented Mar 20, 2020

You might want to cherry-pick yvanzo@2fd4a18 that patches defineCountColumn added in #1413.

This allows passing custom props to headers, so we can actually
pass aria-label (and style) to the header for merge removals.
* `accessor` is mandatory in options for column with value,
  e.g., it can be used to sort non-paginated tables later on.
* `Cell` defaults to returning `String(accessor(row))`.

See https://github.com/tannerlinsley/react-table/blob/v7.0.0/docs/api/useTable.md#column-options
Copy link
Contributor

@yvanzo yvanzo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@reosarevok reosarevok merged commit be9cf3e into metabrainz:master Mar 20, 2020
@reosarevok reosarevok deleted the MBS-10365-pt-5 branch March 20, 2020 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
React PRs directly related with React conversion
Projects
None yet
3 participants