Giter Site home page Giter Site logo

Support alternate layout systems about wave HOT 4 CLOSED

h2oai avatar h2oai commented on May 19, 2024
Support alternate layout systems

from wave.

Comments (4)

mturoci avatar mturoci commented on May 19, 2024

I suggest trying out CSS grid as an alternate layout system. This would allow developers to have a fine grained control on the CSS level. E.g. ability to specify mixed units - fr - relative to viewport and px - fixed size as opposed to current state where card width is fixed only. We could also take advantage of grid-template-areas:

grid-template-columns: 200px 1fr 1fr;
grid-template-rows: 80px 1fr 1fr 100px;
grid-template-areas:
    "header header header"
    "sidebar content-1 content-1"
    "sidebar content-2 content-3"
    "footer footer footer";

This API could be more intuitive for non-pure web devs.

I am not sure if this will not affect the the mouse handling in viz mentioned above.

from wave.

lo5 avatar lo5 commented on May 19, 2024

Agree, grids are one possible solution (assuming they behave identically across major browsers).

One way to state the overarching goal is:
"Make my app look professional and slick out of the box, without making me do a ton of upfront work."

This implies:

  1. Allow authors to choose between multiple layouts that best fit their use case, say:
    1. Pixel-perfect grid (what we have today).
    2. 2-column layout with a header/footer that automatically transforms into a 1-column layout when space-constrained (fig. 1).
    3. 2-column layout with automatic header/footer/menu/navigation. For example, we have a mechanism today for laying out content (fig. 2), but we need to allow authors to enable the surrounding chrome (fig. 3).
  2. Preserve the conciseness of the current API.
    1. Introduce a new layout attribute on the meta_card that lets users specify which layout to use. e.g. layout='GridLayout(foo=..., bar=...)'.
    2. The box= string argument on each card continues to be the primary mechanism for specifying "how and where this card is laid out". Today, the box string is parsed into 4 numbers that indicated a left top width height tuple. Instead, we need to interpret the box argument based on the meta_card.layout attribute.

Fig. 1
Screenshot from 2020-09-03 11-32-07

Fig. 2
Screenshot from 2020-09-03 11-36-26

Fig. 3
Screenshot from 2020-09-03 11-36-17

from wave.

lo5 avatar lo5 commented on May 19, 2024

Related to #38

from wave.

lo5 avatar lo5 commented on May 19, 2024

Closed via #58

from wave.

Related Issues (20)

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.