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

Improve wrapPanels #214

Merged
merged 1 commit into from
Jul 19, 2024
Merged

Improve wrapPanels #214

merged 1 commit into from
Jul 19, 2024

Conversation

v-zhuravlev
Copy link
Contributor

@v-zhuravlev v-zhuravlev commented Jul 5, 2024

Initial implementation (#110 ) of wrapPanels didn't support panels inside rows. This PR adds support for panels inside rows, so wrapPanels can properly calculate grid coordinates with collapsed rows as well.
Useful in conjunction with g.util.panel.resolveCollapsedFlagOnRows:

        g.dashboard.new('Dash')
        + g.dashboard.withPanels(
          g.util.panel.resolveCollapsedFlagOnRows(
            g.util.grid.wrapPanels(
              [
              g.panel.row.new('row1')
              + g.panel.row.withCollapsed(true)
                + g.panel.row.withPanels(panels1),
              g.panel.row.new('row2')
              + g.panel.row.withCollapsed(true)
                + g.panel.row.withPanels(panels2),
              ]
            )
          ),
        ),
    },

Add support for panels inside rows
Copy link
Member

@Duologic Duologic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks ok.

@v-zhuravlev
Copy link
Contributor Author

@Duologic is it ready to be merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants