question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ComponentSupport: Missing public documentation about hyphenating properties

See original GitHub issue

Steps to reproduce the problem

  1. Check this private API description: https://github.com/SAP/openui5/blob/005a9e2d8c35260eccfb062d65b34a90506bd58f/src/sap.ui.core/src/sap/ui/core/ComponentSupport.js#L86-L101

    It says:

    As HTML is case-insensitive, camel cased properties have to be written in dashed form.

    Valid ✔️

    <div data-sap-ui-component data-auto-prefix-id="true" ...>
    

    Invalid

    <div data-sap-ui-component data-autoprefixid="true" ...>
    

    Error: Property or event “autoprefixid” does not exist in sap.ui.core.ComponentContainer.

  2. Go to the public API reference page. Or the topic Declarative API for Initial Components

What is the expected result?

The important message, that “camel cased properties have to be written in dashed form”, is clearly noticeable in the documentation as well as in the API reference page, maybe even as a MessageStrip with an additional link to the naming convention.

What happens instead?

Neither the API reference nor the documentation topic makes the reader aware of the naming convention.

The thing is; application developers are used to write bootstrap config attributes without hyphens in index.html, such as:

  • resourceroots ✔️
  • oninit ✔️
  • waitfortheme ✔️

Naturally, within the same index.html page, they tend to write ComponentContainer settings without hyphens as well:

  • autoprefixid
  • componentloaded
  • handlevalidation

They then see the error in the console and wonder if defining such properties is possible at all, and if yes, what the proper syntax looks like.


<del>A better approach would be to allow the above syntax if possible. This would make developing ui5 applications a bit more intuitive.</del> --> Nevermind!

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
Thoddcommented, Dec 12, 2019

PS: Additionally we will make changes to the Dev-Guide, once we rework the Component-Section.

0reactions
stephania87commented, Jun 25, 2019

just FYI #1980266553

Read more comments on GitHub >

github_iconTop Results From Across the Web

Declarative API for Initial Components - SAPUI5 SDK
Using the ComponentSupport Module. With the declarative sap/ui/core/ComponentSupport API it is possible to define the initially started component directly ...
Read more >
OpenUI5: UI Development Toolkit for HTML5 - SAP Help Portal
One consistent user experience for your apps. • Responsive across browsers and devices - smartphones, tablets, desktops.
Read more >
Hyphenation not working - Microsoft Community
I am using the new office 365 subscription model for mac and I am having problems trying to enable hyphenation for Word.
Read more >
MySQL 8.0 Reference Manual :: 5.1.8 Server System Variables
Setting a session system runtime variable value normally requires no special ... At startup, the server automatically generates RSA private/public key-pair ...
Read more >
Apache Camel Development Guide Red Hat Fuse 7.11 | Red Hat ...
Red Hat is committed to replacing problematic language in our code, documentation, and web properties. We are beginning with these four terms: master, ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found