1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Not Planned XF2 - Make all Page-Elements Widgets: give us complete layout freedom

Discussion in 'Closed Suggestions' started by Alfa1, Aug 12, 2016.

  1. Alfa1

    Alfa1 Well-Known Member

    If all page elements / blocks would be widgets, then we would be able to order all page elements in any position we like. Not just sidebar blocks, but any page element.

    This will allow us to place any block anywhere.
    We could reorder page elements to our liking and easily create unique pages.
    It will also allow us to easily turn page elements off by deactivating the widget.
    Or replace a page element by sticking a new widget on the same location as the deactivated widget.

    Please consider to add this feature, as it will greatly enhance xenforo as a whole.
  2. ŽivaAkcija

    ŽivaAkcija Well-Known Member

    also multiple widget per forum options
  3. ibnesayeed

    ibnesayeed Well-Known Member

    I wished for this a long time ago. :)

    Alfa1 likes this.
  4. Alfa1

    Alfa1 Well-Known Member

    Please like the first post if you want your vote to count.
  5. CyberAP

    CyberAP Well-Known Member

    That's exactly what BEM enables you to do. But I guess that's not possible globally, since some variables are passed from one template to another. In any case, this gets my vote.
  6. surfsup

    surfsup Well-Known Member

    I vote for this!
  7. oO5 Dynasty

    oO5 Dynasty Well-Known Member

    Love the idea
  8. Mike

    Mike XenForo Developer Staff Member

    While I like the idea, unfortunately I'm going to have to call this "not planned". This just isn't technically viable within the context of "ALL page elements". There's some overlap in reasoning with my response to an unrelated suggestion, but the reasons here are likely more fatal overall.

    Widgets are essentially self contained units on a page. This works really well when what you're displaying is an independent unit, but the reality is that, despite appearances, the individual sections of a page aren't necessarily that independent. They may depend on multiple variables. For example, the behavior of quick reply depends not only on the thread being viewed, but the specific posts that have been displayed. Even the URL for behaviors is a form of dependency; if code assumes that you're viewing a thread when something happens, doing that elsewhere will invalidate that assumption. It might actually require all sorts of variables to be passed in to cover eventualities.

    This doesn't handle the fact that we also need to change how we fetch and access data as doing it outside the widget (in the controller) limits the advantage of using a widget. This then rather significantly changes the entire access structure of the code. Being able to pass in all these params in a consistent way, when it wouldn't be known whether it makes sense to a widget or not (or how the widget will interpret it), is a significant problem.

    So essentially, IMO, there are fundamental technical problems with this even getting off the ground. Further, it would likely make developing anything (add-ons or core) a good bit more complex because of increased configurability, especially as the widget gets more complex. A great sounding idea, but unlikely to ever come to fruition.
    SneakyDave and CyberAP like this.
  9. Alfa1

    Alfa1 Well-Known Member

    If we change the context from "ALL page elements" to "As many as possible", would that make it a viable suggestion?
    tajhay and Ernest L. Defoe like this.
  10. CyberAP

    CyberAP Well-Known Member

    Aren't widgets represent these things?
  11. Mike

    Mike XenForo Developer Staff Member

    Likely not, since "as many as possible" would likely more represent "a few very specific situations", which I don't think is what you mean.

Share This Page