•  
      request #11665 Import Graphs and edit modals dynamically in Kanban
    Infos
    #11665
    Joris MASSON (jmasson)
    2018-08-16 14:17
    2018-06-22 13:39
    12005
    Details
    Import Graphs and edit modals dynamically in Kanban
    As an end-user,
    I want to load as little javascript as possible
    So that downloading (the first time) and parsing the code does not slow down my page load.

    This should be an occasion to introduce fellow developers to code-splitting with webpack and dynamic import [1].
    Dynamic import is a Stage 3 proposal to let developers load code only when needed. In our case, it lets us load modals only when the user clicks on them, instead of having them always in the code.
    Using this technique would reduce kanban's initial javascript size by about 200 KiB, principally due to d3js which is only ever used in the graphs modal.
    The obvious targets for this technique are modals. Users do not always click on them, and for example in the Edit Kanban modal, most users do not have admin powers and so the modal button is hidden to them anyway !

    [1] https://github.com/tc39/proposal-dynamic-import
    Agile Dashboard
    Empty
    Empty
    • [x] enhancement
    • [ ] internal improvement
    Empty
    Stage
    Empty
    Closed
    2018-08-16
    Attachments
    Empty
    References

    Follow-ups