frankframework / frank-doc

Frank!Doc
https://frankdoc.frankframework.org
Apache License 2.0
4 stars 5 forks source link

Show/hide inheritance is not working properly on initial load #157

Closed Laurens-makel closed 1 year ago

Laurens-makel commented 1 year ago

The inheriterd attributesare not shown properly when I load the following page: https://frankdoc.frankframework.org/#/Senders/WebServiceSender

I see the following:

image

Then I press 'Hide inheritance' and suddenly I see all inherited attributes...

image

Then I press 'Show inheritance' and suddenly all inherited attributes are not visible anymore....

image

Matthbo commented 1 year ago

On default, when show inheritance is enabled, it merges all the attributes etc. into the element. When you then hide the inheritance it will show the parent classes with their own attributes etc. This is also how it was done in the old version of the frankdoc except for that the button was not only labelled incorrectly but also improperly copied and changed codewise. This has been corrected in the current version meaning that the behaviour isn't changed at all

Laurens-makel commented 1 year ago

I am not implying any behaviour has been changed :)

Isn't it weird that when I press 'Hide Inheritance' it actually shows me all inherited attributes and when I press 'Show Inheritance' it actually hides all inherited attributes?

Matthbo commented 1 year ago

It shouldn't hide it but show it merged into the given element, but I did find a bug that makes it not show the inherited attributes at all because of an error caused by an angular pipe which breaks for some reason after flipping the show/hide inheritance button. This likely happened because of a big refactor to clean up/improve the old code

Intended behaviour: image

After switching show inheritance -> hide -> show: image

Production stacktrace:

ERROR TypeError: Cannot read properties of undefined (reading 'getDisplayName')
    at transformLink (main.81fe4c4b999354ea.js:1:274063)
    at String.replace (<anonymous>)
    at e.transform (main.81fe4c4b999354ea.js:1:273855)
    at Ay (main.81fe4c4b999354ea.js:1:84537)
    at Fy (main.81fe4c4b999354ea.js:1:274687)
    at dk (main.81fe4c4b999354ea.js:1:274731)
    at Sg (main.81fe4c4b999354ea.js:1:56961)
    at Vs (main.81fe4c4b999354ea.js:1:55744)
    at c0 (main.81fe4c4b999354ea.js:1:56163)
    at Vs (main.81fe4c4b999354ea.js:1:56189)