Is it possible to create a custom dialog with custom js/html?

Options

I know custom dialogs can be created, but the elements on this dialogs seem to be limited to existing elements (combos, tables, etc.). Is it possible to include external js libraries, js code and custom html elements?

Best Answer

  • Michael McCollough
    Michael McCollough E Community Moderator
    #2 Answer ✓
    Options

    Dialogs (from a plugin/D2 classic perspective) need to follow the dialog XML standard. HOWEVER, with Smart View, it is possible to override controls, behavior a bit further BUT it is not possible though custom js/html, only though Smart View compliant code. It is pretty customizable (Smart View perspective) but the framework needs to be within the Smart View framework boundary.

    We are working on external widgets and publish/subscribe event implementations to enable more customization /flexibility.

    I am open to any suggestions/concerns you have if you want to share.

    Also, I am not saying your question is "impossible", it is just not documented or currently "supported", if I were to dig into things (I am a Product Manager now, I used to be Professional Services and got pretty good at doing the unsupported/impossible) I might find some hook/way to do what you are suggesting. Nothing is really "impossible" it is just judged on a ratio of understanding and effort that puts it in a possible/impossible bucket.

    I am also not an all-knowing guru (those that think they know it all miss some obvious things they may never have seen) so if I am missing something obvious, I am open to hearing about it as well.

Answers

  • Michael McCollough
    Michael McCollough E Community Moderator
    #3 Answer ✓
    Options

    Dialogs (from a plugin/D2 classic perspective) need to follow the dialog XML standard. HOWEVER, with Smart View, it is possible to override controls, behavior a bit further BUT it is not possible though custom js/html, only though Smart View compliant code. It is pretty customizable (Smart View perspective) but the framework needs to be within the Smart View framework boundary.

    We are working on external widgets and publish/subscribe event implementations to enable more customization /flexibility.

    I am open to any suggestions/concerns you have if you want to share.

    Also, I am not saying your question is "impossible", it is just not documented or currently "supported", if I were to dig into things (I am a Product Manager now, I used to be Professional Services and got pretty good at doing the unsupported/impossible) I might find some hook/way to do what you are suggesting. Nothing is really "impossible" it is just judged on a ratio of understanding and effort that puts it in a possible/impossible bucket.

    I am also not an all-knowing guru (those that think they know it all miss some obvious things they may never have seen) so if I am missing something obvious, I am open to hearing about it as well.

  • Hi Michael,

    Thanks for the answer, I was afraid this was the situation. I'm thinking on the possibilites to move existing customizations on D2 to Smartview (ie: video preview → https://blog.aldago.es/2021/01/23/d2-video-preview-widget/ , RTF text editor, etc.) which makes sense to have on the sidebar of the browser view, and not on the landing page as a widget "unrelated" to content (Something similar to FME's IA assistant, which might have more "UI possibilites" as a widget, but it really doesn't make sense outside the browser view)

    I'm quite sure users won't take nicely having to re-adapt (change) everything to fit a new application "model" 😕

  • Michael McCollough
    Michael McCollough E Community Moderator
    Options

    We will be looking at external widgets for 24.4 which should give you much of what you need and much of what we need to help transition customers from D2 Classic to Smart View. We have some other items on our roadmap.

    Multiple landing pages (which should provide something similar to multiple workspaces/workspace views that D2 Classic did should be in our 24.2 release. Landing page customization (choose your layout/where tiles/widgets go, similar to D2 Classic as well) is on our roadmap as well.

    For the external widget, we have a need in the landing page/tile implementation. As we get more into the weeds on it I expect we may have to have a "landing page" implementation of external widget tile and we "may" even look to a "Portal Perspective" that provides much of the portal level layout and control you had with D2 Classic.

    I agree with you on users don't want to re-write everything they have done to move to the new Smart View. The first SDK release we did we focused on getting some of the most used D2 Plugins (dialog service for example) so that the same plugin could be reused from D2 Classic in Smart View. We will pickup a few more D2FS services to document their behavior and shore them up as best we can as we move forward.

    Disclaimer: These are all forward looking/unofficial statements and as such are susceptible to change. (Have to put this in here to make others happy and set expectations).