apache / apache/superset

Edit Mode: Rows Not Shrinking on Chart Resize + Unable to Vertically and Diagonally Resize Chart When They're Above a Column

Open
#37,644 1 comment 0 reactions 0 assignees View on GitHub
dashboard:component dashboard:editmode 🦾 ai-candidate
Dominant language
Python
Stars
74.8k
Forks
18.3k
Avg merge
2d 5h
Merged PRs (30d)
685

Description

### Bug description

Currently, when dashboards were in edit mode, the row size grows with the largest component within it. However, it does not shrink with the largest component within it. Also, charts cannot be resized if they are directly above a column component due to the column drop target area extending beyond the column component. As a result, when a user would hover on the bottom edge or bottom-right corner of a component above the column component, they would only be able to move the column component instead of being able to vertically or diagonally resize the non-column component.

**Row Shrinking**
1. Create some charts and a dashboard
2. Open the dashboard in edit mode
3. Add the charts to the same row in the dashboard
4. Increase the height of one of the charts in the row. The row height increases (expected)
5. Decrease the height of all of the charts in the row. The row height does not shrink to the size of the smallest chart in the row (unexpected)

**Resizing Charts Above a Column**
1. Create some charts and a dashboard
2. Open the dashboard in edit mode
3. Add two charts to one row
4. Add a column layout element to the row below
5. Add a chart to the row below the row with the column
6. Try to vertically and diagonally resize the chart that is in the first row and not directly above the column element. Chart resizes (expected)
7. Repeat step 6 with the chart in the bottom row. Chart resizes (expected)
8. Repeat step 6 with the chart in the first row that's directly above the column element. The resize cursors do not appear. The drop target menu for the column element display, though the user is hovering above the corner or bottom edge of the chart (unexpected).

Note: I have a bug fix for this, but I haven't opened a PR yet

### Screenshots/recordings

_No response_

### Superset version

master / latest-dev

### Python version

3.9

### Node version

16

### Browser

Chrome

### Additional context

_No response_

### Checklist

- [x] I have searched Superset docs and Slack and didn't find a solution to my problem.
- [x] I have searched the GitHub issue tracker and didn't find a similar bug report.
- [x] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing both behaviors in dashboard edit mode: shrinking all charts in a row, then resizing a chart directly above a column layout element. Compare the row height after chart resizing and the resize cursors/drop target behavior; done means rows shrink appropriately and the affected chart supports vertical and diagonal resizing.

Written by the indexing model from the issue text.

Assessment

Tech stack
react
Domain
data-visualization, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.