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

[dashboard] Panel height is not stable when drag resizing [1 day] #7950

Open
sissbruecker opened this issue Oct 7, 2024 · 1 comment
Open
Labels
bug Something isn't working Impact: Low needs research More information needed to estimate Severity: Minor vaadin-dashboard

Comments

@sissbruecker
Copy link
Contributor

Description

In specific configurations of the dashboard, the panel height is not stable when drag resizing. I mainly got to reproduce this by setting a smaller --vaadin-dashboard-row-min-height.

Also note that the rowspan of the first panel seems to reset to 1 from the initial 2 once the issue occurs.

Bildschirmaufnahme.2024-10-07.um.15.14.26.mov

Expected outcome

The panel height should be stable while resizing and not change with each mouse move event. rowspan of other panels should not be affected.

Minimal reproducible example

    <vaadin-dashboard editable></vaadin-dashboard>

    <style>
      vaadin-dashboard {
        --vaadin-dashboard-row-min-height: 100px;
        --vaadin-dashboard-col-max-count: 2;
      }

      .content {
        font-size: 80px;
        font-weight: bold;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
      }
    </style>

    <script type="module">
      import '@vaadin/dashboard';

      const dashboard = document.querySelector('vaadin-dashboard');
      dashboard.items = [
        {
          title: 'Panel 1',
          content: 'Panel 1',
          rowspan: 2
        },
        {
          title: 'Panel 2',
          content: 'Panel 2',
        },
        {
          title: 'Panel 3',
          content: 'Panel 3',
        },
      ];

      dashboard.renderer = (root, _dashboard, { item }) => {
        if (!root.firstElementChild) {
          root.append(document.createElement('vaadin-dashboard-widget'));
        }
        root.firstElementChild.widgetTitle = item.title;
        root.firstElementChild.innerHTML = `
          <div class="content">${item.content}</div>
        `;
      };
    </script>

Steps to reproduce

Use the snippet above, then start resizing the second panel.

Environment

Vaadin version(s): 24.5

Browsers

Chrome, Firefox

@yuriy-fix yuriy-fix added bug Something isn't working Severity: Minor Impact: Low needs research More information needed to estimate labels Oct 10, 2024
@yuriy-fix yuriy-fix changed the title [dashboard] Panel height is not stable when drag resizing [dashboard] Panel height is not stable when drag resizing [1 day] Oct 10, 2024
@yuriy-fix
Copy link
Contributor

Let's check if we can come up with a solution in a reasonable time [1 day].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Impact: Low needs research More information needed to estimate Severity: Minor vaadin-dashboard
Projects
None yet
Development

No branches or pull requests

2 participants