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

Persist dashboard panel expand/collapse state in URL #15020

Closed
ytzlax opened this issue Nov 17, 2017 · 4 comments
Closed

Persist dashboard panel expand/collapse state in URL #15020

ytzlax opened this issue Nov 17, 2017 · 4 comments
Labels
Feature:Dashboard Dashboard related features release_note:enhancement Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas

Comments

@ytzlax
Copy link
Contributor

ytzlax commented Nov 17, 2017

All actions in kibana dashboard change the URL, actions like filtering, open and close legend and etc..
But expand and collapse visualisation to full screen, doesn't change the URL.
I think that click on expand visualisation need to change the URL like other actions.

@stacey-gammon
Copy link
Contributor

Can you explain a bit more about your use case and why this feature would be important to you?

We have so much state already stored in the URL that it's become very long and unwieldy, in addition to causing issues with hitting max url length limits. We've been trying to only store important variables in there, and it was consciously decided that the panel expand/collapse state was not important enough to require persisting across url sharing. That it was more of a temporary exploration state. If you can give us some more context, we can reconsider this decision.

@stacey-gammon stacey-gammon changed the title Expand visualisations Persist dashboard panel expand/collapse state in URL Nov 22, 2017
@ytzlax
Copy link
Contributor Author

ytzlax commented Nov 22, 2017

Hi,
In my company we developed application, inside the application I embed iframe kibana dashboard,
in each visualization left side I placed a button(outside of the iframe), when the user click on expand kibana button, all my application buttons need to disappear.
My problem is how can I know when the user click on the expand button.
If its problem to store the state in the URL, maybe you can fire event that the expand button clicked,
thats what I did inside kibana code I added
$rootScope.$emit('$toogleExpand');
in file %KIBANA_HOME%\src\core_plugins\kibana\public\dashboard\dashboard.js

$scope.toggleExpandPanel = (panelIndex) => {  
        $rootScope.$emit('$toogleExpand');

        if ($scope.expandedPanel && $scope.expandedPanel.panelIndex === panelIndex) {
          $scope.expandedPanel = null;
        } else {
          $scope.expandedPanel =
            dashboardState.getPanels().find((panel) => panel.panelIndex === panelIndex);
        }
      };

thanks

@timroes timroes added Team:Visualizations Visualization editors, elastic-charts and infrastructure and removed :Sharing labels Sep 14, 2018
@markwalkom
Copy link
Contributor

Not if this is related to #2716, but having legend state persisted (ie when I save a dashboard with some legends closed they should stay that way on a reload/refresh) would be super handy.

@timroes timroes added Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas and removed Team:Visualizations Visualization editors, elastic-charts and infrastructure labels Oct 7, 2020
@ThomThomson
Copy link
Contributor

Closing this in favor of #145454.

We have recently removed almost all dashboard state from the URL, but maximized panel state is considered more of a location than an internal dashboard state, so we've decided to expose it. Check the linked issue for tracking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Dashboard Dashboard related features release_note:enhancement Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas
Projects
None yet
Development

No branches or pull requests

6 participants