Skip to content

[Bug] Toolbar start slot prevents OverflowList actions from shrinking beside end content #8804

Closed

Description

@thewebartisan7

Description

Composing OverflowList in TableSelectionToolbar.startContent does not collapse the actions as expected when the toolbar becomes narrower: the action slot keeps its content width instead of taking the space remaining beside the selection summary and Clear button.

Expected: actions that no longer fit move into the overflow menu, while the summary and Clear remain usable, provided the container is wide enough for the summary, Clear, and overflow trigger.

Reproduction

In the Astryx playground, render a selected table with this toolbar and narrow the preview:

import {Button} from '@astryxdesign/core/Button';
import {DropdownMenu} from '@astryxdesign/core/DropdownMenu';
import {OverflowList} from '@astryxdesign/core/OverflowList';
import {TableSelectionToolbar} from '@astryxdesign/core/Table';

const actions = ['Save', 'Edit', 'Duplicate', 'Share', 'Archive', 'Delete'];

export default function Example() {
  return (
    <div style={{width: 480, maxWidth: '100%'}}>
      <TableSelectionToolbar
        clearLabel="Clear"
        selection={{
          selectedKeys: new Set(['1']),
          selectedCount: 1,
          hasSelection: true,
          clearSelection: () => {},
        }}
        startContent={
          <OverflowList
            gap={2}
            overflowRenderer={items => (
              <DropdownMenu
                button={{label: `+${items.length}`, variant: 'ghost', size: 'sm'}}
                items={items.map(({index}) => ({
                  label: actions[index],
                  onClick: () => {},
                }))}
              />
            )}>
            {actions.map(label => (
              <Button key={label} label={label} size="sm" />
            ))}
          </OverflowList>
        }
      />
    </div>
  );
}

This reduced example isolates the composition from the larger table demo; it has not been separately browser-verified. The original demo and a CSS workaround were manually tried in the Astryx playground, where the workaround made the actions collapse correctly.

Investigation and workaround

In the inspected source, Toolbar.startSlot has no minWidth: 0. Its startOnly flex rule only applies without endContent, but TableSelectionToolbar always supplies endContent.

The successful diagnostic workaround applied:

  • flex: 1 1 0% and min-width: 0 to the internal start slot;
  • flex: 0 0 auto and min-width: 0 to the internal end slot;
  • min-width: 0; width: 100%; box-sizing: border-box to the inner toolbar;
  • width: 100%; min-width: 0 to the visible OverflowList container.

This points to the slot sizing policy, but does not isolate which subset of these declarations is sufficient. We would prefer supported composition over selectors targeting private wrappers. Toolbar's xstyle/style target its outer Section, and there is no public start-slot styling prop.

Could the two-slot Toolbar layout support this composition directly, or could you document the intended supported approach? Any fix should preserve focus rings and keyboard access rather than simply clip the action area.

Astryx Version

Installed source inspected: @astryxdesign/[email protected]. Manual verification used the hosted Astryx playground; its exact deployed version was not recorded.

Environment

Astryx documentation playground. Browser/OS versions were not recorded. No assistive-technology verification performed.

Activity

  1. cixzhang commented on Nov 17, 2026

    @cixzhang
    Contributor

    (Posted by Cindy's agent.) Thanks for the clear report. A fix is up in #12238: an OverflowList placed directly in a horizontal Toolbar's startContent now folds its actions into its overflow trigger beside endContent, instead of pushing the end content past the toolbar's edge. It builds on @quocluongg's work in #11996. We'll note here again when it lands.

  2. cixzhang commented on Nov 19, 2026

    @cixzhang
    Contributor

    (Posted by Cindy's agent.) Fixed in #12238, now on main: an OverflowList in a horizontal Toolbar's start slot now folds its actions into its overflow trigger beside the end content, instead of pushing the end content past the toolbar's edge. It ships in the next release. Thank you for the clear report, @thewebartisan7, and thanks to @quocluongg, whose fix #12238 builds on.

  3. added a commit that references this issue on Nov 19, 2026
    472896d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions