cancel
Showing results for 
Search instead for 
Did you mean: 

Sapui5: networkgraph generates a lot of error messages / reporting sapui5 bugs

roland_bouman
Contributor

Hi all,

I am using the SAPUI5 networkgraph quite a lot and I am noticing buggy behavior which I believe has to do with the library itself.

The problem occurs when you simply use the networkgraph component and can be witnessed even in the samples released by SAP. See for example: https://sapui5.hana.ondemand.com/#/entity/sap.suite.ui.commons.networkgraph.Graph/sample/sap.suite.u...

The message is:

assert-dbg.js:34 Assertion failed: Attributes 'class' and 'style' must not be written, instead use dedicated 'class' or 'style' method

I believe this particular one is caused by sap.suite.ui.commons.networkgraph.Group (https://sapui5.hana.ondemand.com/1.86.3/resources/sap/suite/ui/commons/networkgraph/Group.js). If you deminify, and look in the method _render, you'll find a bit that goes:

      this._renderHtmlElement("div", {}, {
        id: i,
        "data-sap-ui": i,
        "class": this._getGroupClass(),
        "style": s
      }, o.renderManager);

As you can see, class and style are passed here in the object literal just like the id and data-sap-ui attributes, which I think is exactly what the assertion is complaining about.

I have added a screenshot from the chrome devtools that shows this as well.

The thing is, I have been trying to file this as a bug against SAPUI5 but I cannot seem to do this anywhere. I have an S user but the portal only lets me file an incident against a "system" and this simply has nothing todo with a system - this is just a standalone app I am developing. It will run for customers that have a SAP license of course that allows them to use SAPUI5.

There are actually a lot more issues with SAPUI5 as opposed to openui5 that I would like to address but there simply does not seem to be a good channel to communicate about this, or at least I am not finding it.

boghyon
Product and Topic Expert
Product and Topic Expert

I just reported some of the SAPUI5 issues on GitHub anyway[1][2]. I can't submit incidents for some reason.

roland_bouman
Contributor
0 Kudos

boghyon.hoffmann thanks for chiming in!

Well, that's odd. around the same time, I also reported my issue at the openui5 github issue tracker. It got closed immediately because it was about sapui5, not openui5.

https://github.com/SAP/openui5/issues/2895#issuecomment-627367020

Margot
Product and Topic Expert
Product and Topic Expert

The problem is that most of the libraries only available in SAPUI5 are not developed by the same team than those available also in OpenUI5. Therefore those teams can't process those issues on the OpenUI5 GitHub repository.
For sure this is not the answer you want to get here and for the moment I do not see a solution how to report bugs for SAPUI5 without a system. I will take this with me and check if we can come up with a simple solution for both sides.

roland_bouman
Contributor

margot.wollny thank you! Much appreciated 🙂

AndreasKunz
Advisor
Advisor

roland.bouman reporting SAPUI5 issues in the OpenUI5 issue tracker at GitHub is not what that tracker is meant for, but sometimes one is lucky when the respective part of SAPUI5 is developed within our department (or close-by) or when the ticket handler knows to whom it could be addressed or has not too much pressure from other tickets (incl. internal ones), so she/he could investigate. Of course there should be a way (I hope Margot can fine one) to report SAPUI5 issues without the problems you experienced.

The specific issue you describe above is not a real error: it is just an assert statement saying that it would be cleaner if controls write their styles using specific RenderManager methods. The result will work well, nevertheless.

Between 1.82 and 1.84, the network graph has changed to the new semantic rendering, which is a good thing (from Line 389 here: https://sapui5.hana.ondemand.com/1.84.0/resources/sap/suite/ui/commons/networkgraph/SvgBase-dbg.js), but doesn't feed the style into the specific rendering method.

roland_bouman
Contributor
0 Kudos

andreas.kunz thanks for your reply, it is much appreciated.

When I read boghyon.hoffmann's comment yesterday I figured that the fact that the openui5 issue tracker was used to communicate about a fix, it didn't necessarily have to mean it was fixed because he filed the issue there - it might have just been a case of someone that happened to know the status and simply communicating it there. Or indeed something along the lines of the scenario you explained. And of course - I am happy those issues were fixed - good for everyone.

I also understand why my request was closed, I guess I would've closed it too considering that it was not about openui5. But I would be lying if I wouldn't admit that sometimes it's hard to bottle up frustration over these issues. I posted my issue there out of frustration too - and with some hope that maybe I would get lucky too.

Anyway, a new day, with new chances.

To the topic at hand: I understand that the assertion is not technically a bug, but I am saying its not very nice to have all these messages spilling out to the browser console. There are already a lot of other assertions log messages for i18n there too and I find it makes it considerably harder to spot real critical errors.

I am fine with components writing their styles and classes out directly, but apparently, somebody that helped design the framework didn't think so and made that assertion there. It's just confusing when ui5 on the one hand makes some rules about how tings should be done and then also breaks them. I mean, I'm fine with that too but please don't spill these messages. Maybe it's not a "bug" in the narrow sense but it's certainly something that someone needs to fix.

Accepted Solutions (0)

Answers (0)