I have created an app layout in App Builder but when I click the "Generate App" button I get a red box with a message saying "code generation failed".
I have tried this with one of the sample apps and the code generates as expected so I need to know what I have done wrong in creating my own app.
I have tried using Chrome on both Windows and Mac.
Hi Ross,Thanks for your report. We have detected an issue with "Filters" button that has an invalid "Toggle" interaction.We're not sure about the steps that led to that state, I suppose that was an attempt to create a dropdown.To fix it you can remove the Toggle action in all instances of that button. To narrow down the problem you can "Preview" each view with codegen panel open to check which of them fail to generate.
Thanks for your reply. I thought you meant that there was an issue with the Toggle interaction in general, but I have figured out what has happened: I did have dropdown components attached to my "Filter" buttons but these dropdown had mysteriously disappeared (perhaps worth logging another issue here?).
I'm guessing this would then leave the interaction invalid as the interaction was looking for a component that no longer existed. I have now replaced these dropdown components and they are now working correctly. Indeed, I have built these in the same way that the sample app was created (Team Collaboration, under "Home").
Unfortunately, the code generation still fails. But it works if I generate from the sample app.
I have gone through all of the views with "code view" on - it shows code for each view now.
Interestingly, it is showing the wrong code for some views - it shows some of the missing dropdowns on views where they don't exist.
Hi Ross, according to our code generation logs there's still a broken dropdown in a view titled "Dummy View", so by fixing or deleting that view it should work fine.
We will investigate to find and fix the root cause of the issue and also make it more tolerant to these problems by:
- Ignore invalid actions so you can get the generated code anyway.
- Show in the outline and allow you to delete phantom dropdowns
Great Pablo - that works now.
On the other issue that I mentioned - the dropdowns that had previously gone missing, seem to be showing code in the code view on other views. For example, the view "Model Viewer" should only show the title inside a container div. Yet in the code view it shows the code for a dropdown which previously existed on a different view. This isn't really causing a problem but I don't seem to be able to remove it.
Thanks for your help Pablo.
Great. Yes, for the hidden dropdowns we don't have currently a way to remove them directly. You can create a new view, copy the correct elements there and remove the original view. The same can be done with container layouts (instead of view) if the dropdown is nested in one of them.We will work to prevent this situation in future versions and also provide a way to clean up in case it happens again.