GithubHelp home page GithubHelp logo

glia's People

Watchers

 avatar

glia's Issues

Allow 'eager-loading` cells.

At the moment, cells are instantiated lazily, i.e. only when needed to render. This suits most simple cases, when we might want to construct the cell with specific parameters at the time of rendering.

However, in more complex cases, if the constructor of one cell needed to adjust cells elsewhere in the layout, e.g. add Javascript to the head, or adjust the breadcrumbs/navigation, it makes sense to have all of the cells instantiated as soon as the layout is loaded, and adjust each before rendering using methods rather than constructor arguments.

E.g. when the product details cell is instantiated, it adds the zoom javascript to the head cell, and adds a path to the breadcrumbs cell. This happens when the layout is loaded, so that by the time the head cell is rendered, it has all of the details it need.s

Ignore references without matching cell

If a reference refers to a cell that does not exist in the merged layout, it most likely will cause an error. We should simply ignore the reference, perhaps with a warning.

Decouple areas from directories

1. By wrapping your DSL (TODO: Not Completed yet)

If you app code is organised into modules, you may wish to keep a layout file in each module.
This way the layout files can each place cells related to their own modules on any page of the app.

Just wrap the DSL with Glia.area(:area_name) do .. end,
then make sure the layout files are required as part of your app's bootstrap process.

Glia.area(:frontend) do 
  handle :pavlova_view do
    reference name: :specifications do
      remove name: :cake_specs
    end
    reference name: :cake_ingredients, template_name: 'cake/pavlova_ingredients' do
      action name: :add_ingredient, args: ['Eggs', '6 Large']
    end
  end
end

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.