Uploaded image for project: 'Magnolia UI'
  1. Magnolia UI
  2. MGNLUI-4996

Allow view context auto-creation

    XMLWordPrintable

Details

    • Task
    • Resolution: Fixed
    • Neutral
    • 6.1
    • None
    • None
    • None

    Description

      View contexts are useful concept when it comes to sharing the state of the UI: the parent view may bind and share a context, child views - inject/subscribe to/mutate it.

      However, for better re-usability of the views, we should avoid explicitly creating the contexts in the view logic: what if in the other scenario the current root view is just a sub-view of smth even more massive that would also rely on the same context?

      As a solution to this we can let the views inject even not yet created contexts - just instantiate and bind them on the fly upon injection.

      Expected result:

      • a view can use/own without claiming ownership explicitly (i.e. by just injecting them).

      Checklists

        Acceptance criteria

        Attachments

          Activity

            People

              apchelintcev Aleksandr Pchelintcev
              apchelintcev Aleksandr Pchelintcev
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Checklists

                  Task DoR