-
-
Notifications
You must be signed in to change notification settings - Fork 76
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
Results data table #193
Results data table #193
Conversation
…data-trust into results-data-table synch branch with main
Visit the preview URL for this PR (updated for commit acharliekelly/police-data-trust@e3e9ede): https://police-data-trust-dev--pr193-results-data-table-ockolx2t.web.app (expires Fri, 22 Oct 2021 06:56:55 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 89ee28768ddf114979e2cf8eddd3746214cf93af |
The snapshots appear to be failing because of the generated |
Hey @acharliekelly where can I view your changes in the firebase preview? Or do I need to use storybook? |
@alexjball the table components are in the search page, and the profile page's Saved Results and Saved Searches |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So does this make shared-components/data-table obsolete?
I pushed a change to fix the snapshot test, had to mock Math.random which is awful. Tried using this but i got a different warning
} | ||
export default function InfoTooltip({ type }: InfoTooltipProps) { | ||
export default function InfoTooltip({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can set background
in css to white to cover over the map
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
The DataTable component is technically obsolete, in that it's not currently being used; but only temporarily - I just copied @dylanesque's code into the composition components that use tables. It would be much DRYer to reuse one shared component for all the tables, but I was trying to get them all to work first, and can refactor them later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wait what is wrong with the current data table?
This PR has a couple of issues that require input and/or assistance. It's supposed to fix #188, updating the Results table on the Search page. It also updates the Saved Results and Saved Searches tables, even though no one knows what the second one is for and it will probably be dropped from MVP. All the tables have been using react-table, but with fake data written in, so there was no way to use API data. With this PR, the tables now... continue to use fake data, but it might be easier to change now?
The main thing I haven't figured out is the table header. I don't have filtering working yet, and there are a bunch of style problems. I made tooltips for the columns with extra info, but I can't figure out the transparency - you can see the map right through them. Also, there's problems with column width, especially if you sort the columns - the sort arrows make the width jump around madly.
But now you can deploy it and see my mock data! (It's generated fake incident data, merged with a dataset of the 2019 Grammy winners, because random fake data gets boring quickly.)
(Also, I should really put the mock data wherever mocks are supposed to go, so they don't clutter the build.)