fix(cms): refactor typescript and components#6037
Conversation
|
chinook25
left a comment
There was a problem hiding this comment.
Looks good, just 2 non-blocking questions
| extends IHeadings, | ||
| IParagraphs, | ||
| IImages, | ||
| INavigationGroups {} |
There was a problem hiding this comment.
What does the {} do here? (I don't know this syntax ;) )
There was a problem hiding this comment.
This creates an empty interface. I needed a way to a general interface (similar to the Input component), but I defined it here so I can reuse it in the UI app. I will eventually add a few things here.
| configurablePage?: any; | ||
| block?: any; |
There was a problem hiding this comment.
Still quite some any's in this file, should they be defined better?
There was a problem hiding this comment.
This is now produced by the generateTypes command, which doesn't have great support for inherited tables and refbacks.



What are the main changes you did
In order to create an editable layer in the page builder, it is important to refactor the typescript files and components to make it easier to add new components. This also reduces the need to override the file produced by generateTypes which created issues with the props. Instead, I created-
PageComponentwhich combines all interfaces with additional props (e.g., mg_tableclass, editable, etc.)This PR is part of molgenis/GCC#1143 and molgenis/GCC#2515
How to test
Checklist