-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Lens] Hide column in table #88680
[Lens] Hide column in table #88680
Conversation
Thanks for the review everyone. I think all of the reported problems were caused by this pretty basic mistake:
The edit action didn't actually toggle the hidden flag... It should be fixed now
I see the reasoning, but I don't think we should do this, because it unnecessarily restricts the user (e.g. if they only want to have a single visible column and switch from col1 to col2, now they first have to make col2 visible, then hide col1 because the switch will be disabled if they would do it the other way around). I think it makes sense to disable settings if they can't be applied to the visualization or would cause some harm, but that doesn't apply in this case IMHO. |
I saw this behavior before, AFAIK it's a bug of the EUI data grid. I will check with the most recent update whether it still persists. Edit: Tested this and it's still happening. I will investigate this separately, but I'm not sure whether we can fix it from the Kibana side. |
db88277
to
db3ab50
Compare
@dej611 @wylieconlon I added an indicator for the dimension trigger and moved the flag into the dimension editor. With the indicator I think a separate popover is not really justified and the consistency of where functionalities are shown is more important. |
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.
The "hidden" icon is not shown for Metrics
:
I may also suggest to use the same eyeClosed
icon for the column dropdown menu for consistency.
I am not fully convinced about the ability to hide all columns and show a blank canvas: perhaps at least one column has to be shown? Not a blocker, but it would be nice to have it sorted.
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.
Tested again in FF and the new UI seems to have no issues with syncing. LGTM!
@elasticmachine merge upstream |
Thanks, fixed
I don't really see when it would be relevant, but I don't have a strong opinion on it either - added the logic to disable the last visible column switch. |
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.
While the panel toggle component is disabled for the last column:
You can still have a blank table passing thru the column dropdown Hide
:
As said, it's not a blocker, either way is fine as long as it's consistent.
Also the Reset width
action in the column dropdown is always enabled. If clicked nothing happens.
Edit: nvm, I guess the dropdown arrow icon is too close to the border and my click has been captured as "resize" action rather than "open" action on the icon. I've tried few times and if I click on the right side of the icon that issue does not happen 👍
@dej611 Fixed that as well and also added the same icon as you mentioned above. |
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.
All tested on Chrome and FF. 👍
💚 Build SucceededMetrics [docs]Module Count
Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: |
* master: (244 commits) [maps] Top hits per entity--change to title to use recent, minor edits (elastic#89254) [DOCS] Update installation details (elastic#90354) RFC for automatically generated typescript API documentation for every plugins public services, types, and functionality (elastic#86704) Elastic Maps Server config is `host` not `hostname` (elastic#90234) Use doc link services in index pattern management (elastic#89937) [Fleet] Managed Agent Policy (elastic#88688) [Workplace Search] Fix Source Settings bug (elastic#90242) [Enterprise Search] Refactor MockRouter test helper to not store payload (elastic#90206) Use doc link service in more Stack Monitoring pages (elastic#89050) [App Search] Relevance Tuning logic - actions and selectors only, no listeners (elastic#89313) Remove UI filters from UI (elastic#89793) Use newfeed.service config for all newsfeeds (elastic#90252) skip flaky suite (elastic#85086) Add readme to geo containment alert covering test alert setup (elastic#89625) [APM] Enabling yesterday option when 24 hours is selected (elastic#90017) Test user for maps tests under import geoJSON tests (elastic#86015) [Lens] Hide column in table (elastic#88680) [Security Solution][Detections] Reduce detection engine reliance on _source (elastic#89371) [Discover] Minor cleanup (elastic#90260) [Search Session][Management] Rename "cancel" button and delete "Reload" button (elastic#90015) ...
Fixes #85140
This PR allows to hide a column in lens data table. There's an action in the cell popover as well as a switch in the dimension editor:
This PR also restructures the data table shape a little on all levels to make it easier to work with (especially considering the fact we will add many more settings to individual columns)
New state and expression shape
The old state looked like this:
As we are going to add many more config settings to specific columns, this PR changes the state to this easier to manager shape:
This is also reflected on the expression layer, the new layout looks like this:
Functional tests
I slightly restructured functional tests by starting a separate "table" test file, moving some things over from the very crowded "smokescreen" test file, extending it with a test for hiding the column.