Skip to content

Custom Element Scoping broken in 2.3.0 #10016

@MarcusNotheis

Description

@MarcusNotheis

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

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

Metadata

Metadata

Assignees

Labels

TOPIC CorebugThis issue is a bug in the code

Type

No type

Projects

Status

Completed

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions