Skip to content

DataViews: inherit background color from parent #73797

@oandregal

Description

@oandregal

What problem does this address?

We want DataViews to inherit the background color from the parent component. There are two aspects that don't:

  • sticky elements: footer (bulk actions, pagination)
  • fly outs: view config, actions menu, filters, etc.

We tried making it transparent at #73240, but sticky elements were an issue, so we switched to make it white and offer customizability via CSS Custom Props at #73390

The direction for the Design System favors this approach instead: there's a ThemeProvider that configures high-level design aspects (density, color palette) by setting certain CSS Custom Properties. Components use these properties for styling. If components want to offer customization, they do so by exposing props for consumers to use.

See the case of the Box component:

<Box
  backgroundColor={...}
  padding={ ...}
/>

What is your proposed solution?

Even if it's just early days, we need to align DataViews with the DS best practices. This means we need to deprecate the usage of the CSS Custom Properties.

The way forward would be either offer customizability via component prop (backgroundColor), or find ways for the background color to cascade where it doesn't normally do (e.g., sticky elements).

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Feature] DataViewsWork surrounding upgrading and evolving views in the site editor and beyond[Type] Code QualityIssues or PRs that relate to code quality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions