-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Identify SAP Web Component Version and React Usage on a User Page #6210
Comments
Hi @Mandy99, your approach of running Regarding the error in the sample repo: this seems to be a super old version of UI5 Web Components, there the querySelector should look like this: Regarding UI5 Web Components for React Versions: You're right, currently this is only possible by searching for react-specific elements on the page (maybe also using the React Dev Tools browser extension), but you can't detect the version at runtime. We'll discuss this internally, but I think we can add some markers to the |
Hi @MarcusNotheis , |
This feature request will be implemented as part of our 2.0.0 release 🙂 |
🎉 This issue has been resolved in version v2.0.0-rc.3 🎉 The release is available on v2.0.0-rc.3 Your semantic-release bot 📦🚀 |
Hi @MarcusNotheis , |
Hi @Mandy99, |
Is your feature request related to a problem?
Our product currently is working on automation testing for SAP Web Components and is looking for a way to identify the version of the web components being used on a user page.
Additionally, we'd like to know if there's a way to tell if the SAP SuccessFactors are with UI5 Web Components for React or Angular.
Describe the solution you'd like
For example, with SAP Fiori, it's possible to retrieve the version by running sap.ui.version in the browser console. Is there a similar way to determine the version for SAP Web Components on a page, such as in SAP SuccessFactors pages?
Describe alternatives you've considered
Tried document.querySelector("meta[name='ui5-shared-resources']").Runtimes on the SuccessFactors page, result returned four versions: 1.23.1, 1.20.0, 1.23.1, and 1.21.2. It's still unclear how each of these versions exactly maps to specific components. Is it correct to assume that 1.23.1 might correspond to the ui5/webcomponents-react version, while 1.20.0 could be the version for @ui5/webcomponents according to the mapping table at https://sap.github.io/ui5-webcomponents-react/v1/?path=/docs/getting-started--docs#add-ui5webcomponents-react-to-an-existing-app?
And when I tried running the same query to confirm my assumption on the SAP UI5 Web Components sample React page https://sap-samples.github.io/ui5-webcomponents-sample-react/, I encountered an error: Uncaught TypeError: Cannot read properties of null (reading 'Runtimes').
Tried on https://sap.github.io/ui5-webcomponents-react/v1/?path=/docs/data-display-list--docs got 1.24.8, while seems shall be 1.29.8.
Tried on https://sap.github.io/ui5-webcomponents/components/Button/ got 2.1.1 seems to be correct.
And it seems that due to current implementation limitations, the only way to determine if the page is using UI5 Web Components for React is by manually searching through the sources in the browser's developer tools for any indication of React-related keywords.
It would be helpful to have a more straightforward and automated way to detect and identify the UI5 Web Components versions in use on a page, including whether they are part of a React or Angular project.
Additional Context
No response
Organization
OpenText ADM UFT One product team
Declaration
The text was updated successfully, but these errors were encountered: