DFFS speed loading issue – any updates?

Home Forums Modern DFFS DFFS speed loading issue – any updates?

Viewing 9 reply threads
  • Author
    Posts
    • #36953
      Marcus Khoo
      Participant

        Hi Alexander,
        If I click too fast, I still get verious situations where DFFS Modern does not load and i see the standard SharePoint form displayed. Whilst I don’t personally have an issue with this (I can just refresh the browser), end users are not so forgivving and they think things are broken. Any thoughts? Thanks /Marcus

      • #36954
        Jorah Lavin
        Participant

          Marcus, on our team we’ve been supplying DFFS links, which avoid the ‘wait for DFFS to load’ issue… It works for many use cases, but not all.

        • #36956
          Marcus Khoo
          Participant

            Hi Jorah, thanks for the tip but my users need to access the forms from SharePoint lists using the standard SharePoint “New, Edit, Open” functions.

            🙁

          • #36959
            Alexander Bautz
            Keymaster

              Hi Marcus,
              I made a change in v1.0.18.0 to avoid reloading the page after saving an item – that helps when working with multiple items in a list, but when you first open a list view it will take a few seconds before DFFS is enabled.

              The modern DFFS is created as a list view command set extension and by design it loads after the list view has rendered. I’m aware of the problem and keep looking for a better solution, but at the moment I haven’t figured out a way to speed up the initial load.

              Alexander

            • #36964
              Marcus Khoo
              Participant

                Just a thought, would it be possible to load in a “light” version of the list set extension that just disables the existing standard form mechanisms and then waits for the real DFFS to load? If DFSS has not yet loaded, the “light” version could give a link which, by the time it is displayed will have loaded DFSS?

              • #36965
                Alexander Bautz
                Keymaster

                  I’m not sure that would make any difference as DFFS isn’t that “heavy” to load, it is just that this kind of extensions load after the list view loads.

                  Alexander

                • #36991
                  Alexander Bautz
                  Keymaster

                    I got this excellent tip (thanks Michelle) that can hide the original form and show a message to the user if DFFS hasn’t completed loading before the user hits either the New item button or tries to view or edit an item.

                    This is done through the standard “List formatting” functionality – see this link for details on how to open the configure layout panel: https://learn.microsoft.com/en-us/sharepoint/dev/declarative-customization/list-form-configuration

                    Add this to the header

                    {
                        "elmType": "div",
                        "style": {
                            "margin-bottom": "100vh",
                            "padding": "20px 15%"
                        },
                        "children": [
                            {
                                "elmType": "div",
                                "attributes": {
                                    "class": "ms-fontColor-neutralSecondary ms-fontWeight-bold ms-fontSize-24"
                                },
                                "style": {
                                    "box-sizing": "border-box",
                                    "width": "100%",
                                    "text-align": "left",
                                    "padding": "21px 12px",
                                    "overflow": "hidden"
                                },
                                "children": [
                                    {
                                        "elmType": "div",
                                        "txtContent": "The Modern DFFS is not ready. Please wait a few seconds after a page load before you click to open the form."
                                    },
                                    {
                                        "elmType": "div",
                                        "style": {
                                            "margin-top": "20px"
                                        },
                                        "txtContent": "Close this panel and try again."
                                    }
                                ]
                            }
                        ]
                    }
                    

                    Add this to the body

                    {
                        "sections": []
                    }
                    

                    See attached image.

                    Alexander

                  • #37181
                    Marcus Khoo
                    Participant

                      This is a brilliant work around.

                      How do you easily get back to the original form though when there ARE DFFS forms defined?

                      Thanks

                      • #37182
                        Alexander Bautz
                        Keymaster

                          Hi,
                          I don’t think there is any shortcut back to the original form when this formatting is applied – you would have to remove the formatting to access the original form.

                          Alexander

                      • #37183
                        Marcus Khoo
                        Participant

                          Sorry, this is the question I meant to ask.

                          I have already created DFFS forms and they mostly work fine.

                          I have 40 lists and hence 120 DFFS forms

                          I can only add the JSON formatting suggested in this post, to the “original” SharePonit form.

                          How do I access the original form in order to put the JSON formatting in place when everytime I open the forms now I get the DFFS form?

                          Is there a quick way to temporary “disable” the DFFS form so I can add the JSON to the “original” form?

                          Thanks

                          • #37184
                            Alexander Bautz
                            Keymaster

                              Not that I’m aware of. I’ll look at adding support for an URL search string parameter like “?disableDFFS=1” or something like that.

                              I guess the easiest method for you is to just remove the Modern DFFS solution from the APP catalog – do the changes and then add it back.

                              Alexander

                          • #37185
                            Marcus Khoo
                            Participant

                              Hi Alexander, the URL parmeter sounds like a great idea. I have not used the “Deploy” option from the AppCatalog because we only need it on ONE site collection so just removing it from the Site Collection would work for me to add the JSON. I’ll use that for the time being. Many thanks.

                              • #37186
                                Alexander Bautz
                                Keymaster

                                  On second thought I already have a method to override it. Open the developer tools (F12 > Console) and type this in the console:

                                  window["__modernDFFS_" + _spPageContextInfo.listUrl.split("/").pop()] = {"new": false, "disp": false, "edit": false};
                                  

                                  It should disable the Modern DFFS until you refresh the page.

                                  Alexander

                            Viewing 9 reply threads
                            • You must be logged in to reply to this topic.