superset
superset copied to clipboard
🐛 Problems creating rows and columns in the superset.
Bug description
🐛 I'm having trouble trying to create divisions on the screen. The superset appears to have limitations in this regard. I can't, for example, create a column and add the number of elements and their divisions. It always breaks. can you help me?
Hello @LucasSantosGuedes! I'm here to help you with your Superset issue. I'm a bot designed to assist with bug solving, answering questions, and guiding contributors. Let's tackle this together!
To create rows and columns in Apache Superset without encountering layout issues when adding elements and their divisions, you can follow these key practices:
-
Use Flexbox for Layout: Utilize the
GridContentandGridRowcomponents, which use flexbox to manage the layout of rows and columns. This ensures proper alignment and spacing of elements. -
Handle Component Drop Properly: Implement the
handleComponentDropfunction correctly to manage the addition of new components without breaking the layout. -
Use Droppable Areas: Define areas where new components can be dropped using the
Droppablecomponent. This helps maintain the layout structure. -
Use Resizable Containers: Ensure elements can be resized without breaking the layout by using the
ResizableContainercomponent. -
Implement Row and Column Components Properly: Handle the layout of children in
RowandColumncomponents, including managing empty states and drop targets.
Here are some code snippets to illustrate these practices:
const GridContent = styled.div`
display: flex;
flex-direction: column;
/* Additional styles */
`;
const GridRow = styled.div`
display: flex;
flex-direction: row;
/* Additional styles */
`;
handleTopDropTargetDrop(dropResult) {
if (dropResult) {
this.props.handleComponentDrop({
...dropResult,
destination: {
...dropResult.destination,
index: 0,
},
});
}
}
By following these practices, you can create stable rows and columns in Apache Superset without encountering layout issues [1][2][3][4].
Details
About Dosu This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.
Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.
To continue the conversation, mention @dosu.
Do you mean in the dashboard editor, like you're not able to drag and drop the layout elements for rows or columns?
mismo problema, no deja diseñar correctamente, sería util poder ordenarlo
This has been silent for more than 200 days, and I never heard back about my last question, so I'll close it as not-planned. Holler if you're still facing this, and perhaps it'll be more fitting for a Help Discussion.