Skip to content

[OP / Toolbar(Button) V2]: Hydration of Header Toolbar Actions #10415

Closed
@wvudako

Description

@wvudako

Describe the bug

Like in the code samples in
https://sap.github.io/ui5-webcomponents-react/v2/?path=/docs/layouts-floorplans-objectpage--docs

we are using a Toolbar V2 to display Actions in the OP Header.

[All Imports] from '@ui5/webcomponents-react';

<ObjectPage...
  titleArea={
    <ObjectPageTitle...
      actionsBar={
        <Toolbar...
          <ToolbarButton

Theoretically by a user, but more consistently by automated tests, it is possible to click the button before the button handler is attached.

Our solution was to retry clicking the button until it actually does something
Our preferred solution would be that the buttons are disabled until the handler is attached

https://www.youtube.com/watch?v=8g7FvoRToGo perfectly describes the status quo
We are using Playwright with Chromium, which clicks the button once its visible and enabled
Because of the flakiness of the issue we are unsure which other components are affected by this, but we believe to have had the same issue using the compat Toolbar with standard Buttons, starting with the upgrade to webcomponents 2.x

Playwright 1.47.2
Webcomponents(-react) 2.4.0, but believed to be since 2.0

Isolated Example

No response

Reproduction steps

Using the codesample, click the button immediately after its visible and enabled

Expected Behaviour

Button is not clickable until click handler is attached

Screenshots or Videos

No response

UI5 Web Components for React Version

2.4.0

UI5 Web Components Version

2.4.0

Browser

Chrome

Operating System

Windows 11

Additional Context

No response

Relevant log output

No response

Organization

No response

Declaration

  • I’m not disclosing any internal or sensitive information.

Metadata

Metadata

Type

No type

Projects

Status

Completed

Status

Completed

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions