elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.77k stars 8.17k forks source link

[Discover] Timestamp column doesnt behave as expected when being toggled #185637

Open stratoula opened 3 months ago

stratoula commented 3 months ago

Describe the feature:

The Discover table always displays a time field column when the dataview has a default timestamp or if @timestamp is being detected in the ES|QL mode. This column can't be toggled from the table or the sidebar

image

but it can be toggled by the doc viewer.

image

By toggling this does nothing. Actually it adds it on the selected columns but the table is not affected of course. If I click again nothing happens, it doesnt even remove it from the selected columns. The toggle action should be hidden for this field in the doc viewer for consistency with the reset components and for not causing confusion

elasticmachine commented 3 months ago

Pinging @elastic/kibana-data-discovery (Team:DataDiscovery)

stratoula commented 3 months ago

I was between a bug and an enhancement but as I assume that this works like that for many minors I changed it to enhancement. Feel free to change it as you wish

kertal commented 3 months ago

It's a Legabughancement. It's related to https://github.com/elastic/kibana/issues/92886

https://github.com/elastic/kibana/issues/92886#issuecomment-789007146

So in 2021 I stated

when we get rid of legacy, the user should be able to remove the time column, so no more restrictions

This would work when we would have selected columns like @timestamp, @col1 , @col2 But for the default state, no columns selected, this wouldn't work, since we don't have virtual columns like Document ... yet

So I think it would make sense to implementing the ability for certain fields not being selectable in the sidebar or the DocViewer 👍