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

Visualization: details view #3778

Merged
merged 2 commits into from Jun 30, 2019
Merged

Visualization: details view #3778

merged 2 commits into from Jun 30, 2019

Conversation

arikfr
Copy link
Member

@arikfr arikfr commented May 7, 2019

What type of PR is this? (check all applicable)

  • Feature

Description

Details visualization -- shows each row as a table (similar to the expanded view in psql):

image

Paginator only shows if you return more than one row.

Ideally it would use Table's column renderers (or maybe just be a mode of the table visualization), but this can wait until the Table visualization is rewritten with React.

Todo:

  • Add PropTypes.
  • Fix issue with rendering when there is no column information.

Related Tickets & Documents

https://discuss.redash.io/t/single-row-view/311/6?u=arikfr


return (
<div>
<table className="table table-bordered details-viz">
Copy link
Contributor

@ranbena ranbena May 9, 2019

Choose a reason for hiding this comment

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

@arikfr I assume you're not using Ant Table cause it has no "vertical header" feature.
I think I can implement this feature with CSS only - write-mode: lr; which will allow standard table markup.
Lmk if you see value in this attempt.

Copy link
Member Author

Choose a reason for hiding this comment

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

Well, it was this and the fact it felt too much for this use case. But if we can make it work with just CSS, it can go along with my plan of merging this into the table visualization later on.

Not sure it's worth the effort at the moment though.

Copy link
Contributor

Choose a reason for hiding this comment

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

Then let's leave it be. I never used this css method before and it might have unforeseen implications. The best way would be to PR Ant with <Table orientation="vertical" />.

@ranbena
Copy link
Contributor

ranbena commented May 9, 2019

@arikfr perhaps consider allowing to choose different viz themes:

  1. Table

Screen Shot 2019-05-09 at 16 18 43

  1. List

Screen Shot 2019-05-09 at 16 23 23

  1. Card grid

Screen Shot 2019-05-09 at 16 25 48

etc.

@arikfr
Copy link
Member Author

arikfr commented May 12, 2019

I'm not sure when the list one will be useful, but the card grid is interesting when you want to show multiple counters without having the create multiple ones 🤔

@arikfr
Copy link
Member Author

arikfr commented Jun 30, 2019

All green ✅

@arikfr arikfr merged commit 7ceb68a into master Jun 30, 2019
@arikfr arikfr deleted the details-viz branch June 30, 2019 12:34
@arikfr
Copy link
Member Author

arikfr commented Jun 30, 2019

Our first 100% React viz :)

harveyrendell pushed a commit to pushpay/redash that referenced this pull request Nov 14, 2019
* Details visualization

* Add PropTypes and guard against no rows
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants