ui5-webcomponents icon indicating copy to clipboard operation
ui5-webcomponents copied to clipboard

Custom Element Scoping broken in 2.3.0

Open MarcusNotheis opened this issue 4 months ago • 2 comments

Bug Description

In versions prior to 2.3.0, the the order of imports and the calling setCustomElementsScopingSuffix did not matter, but starting with 2.3.0, the order is important: Only elements imported after setCustomElementsScopingSuffix was called are scoped now.

This works fine in <2.3.0 and ui5-button-demo gets defined:

import '@ui5/webcomponents/dist/Button.js';
import { setCustomElementsScopingSuffix } from '@ui5/webcomponents-base/dist/CustomElementsScope.js';

setCustomElementsScopingSuffix('demo');

In 2.3.0, the same snippet defines the tag name ui5-button

Example for 2.3.0 Example for 2.2.0

Affected Component

all

Expected Behaviour

The order of imports and the place where setCustomElementsScopingSuffix gets called should not matter.

Isolated Example

https://stackblitz.com/edit/js-djmqeu?file=index.js,index.html

Steps to Reproduce

Open the attached examples from the issue description

Log Output, Stack Trace or Screenshots

No response

Priority

Very High

UI5 Web Components Version

2.3.0

Browser

Chrome, Edge, Firefox, Safari

Operating System

No response

Additional Context

No response

Organization

UI5 Web Components for React / SAP SIX

Declaration

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

MarcusNotheis avatar Oct 14 '24 13:10 MarcusNotheis