flexi icon indicating copy to clipboard operation
flexi copied to clipboard

option for max height of parent

Open ghost opened this issue 9 years ago • 15 comments

if possible can you add a attribute like "fill parent"? this way its possible to create layouts with fixed header and scrollable columns, right now i haven't found a way to realize such a scenario.

for example: screenshot 2016-04-01 19 44 25

<screen>
    <page>
        <box fit>
            HEADER
        </box>
        <box style="background:red;">
           <hbox>
               <box style="background: purple; overflow-y: scroll">
                   <div style="width: 20px; height: 2000px; background: blue;"></div>
               </box>
               <box>
                   RIGHT
               </box>
           </hbox>
        </box>
    </page>
</screen>

ghost avatar Apr 01 '16 18:04 ghost

What you want is possible (and not difficult), I'll create a demo later.

runspired avatar Apr 01 '16 20:04 runspired

oh ok many thx, then i have misunderstood something ;-) sorry

ghost avatar Apr 01 '16 20:04 ghost

any news?

ghost avatar Jun 30 '16 20:06 ghost

+1 Would also be interested in a demo :)

mk-conn avatar Jul 01 '16 22:07 mk-conn

@onceatime and @mk-conn can you guys elaborate on what you are trying to achieve? I can try to throw something together.

RobbieTheWagner avatar Jan 17 '17 19:01 RobbieTheWagner

I'd like to figure this out too. My use case is a full-screen app layout, where you scroll individual containers and never the entire page. Here's an example using flexbox directly but not Flexi: http://bl.ocks.org/jfsiii/5380802 (just add overflow: scroll to the column containers).

@rwwagner90 or @runspired can either of you suggest how to do this with Flexi? Sounds like it should be simple but I can't seem to get it right.

xtagon avatar Apr 17 '17 04:04 xtagon

Thought I solved this but it's not working still. Removed my original comment since it still doesn't add the scrollbars :(

xtagon avatar Apr 17 '17 06:04 xtagon

Hi @xtagon you have it working with normal flexbox? Should be fairly easy to convert something that works in flexbox to flexi. If it's working as you want in flexbox, let me know.

RobbieTheWagner avatar Apr 17 '17 13:04 RobbieTheWagner

@rwwagner90 Thanks. I finally got it working by adding height: 100% to the box that has overflow: scroll. For some reason it doesn't work with just <box fill>

xtagon avatar Apr 17 '17 16:04 xtagon

@xtagon would you be interested in contributing the example you are talking about here to the flexi dummy app, for us to show as an example?

RobbieTheWagner avatar Apr 24 '17 18:04 RobbieTheWagner

@rwwagner90 Absolutely. My case depends on some quirks with how I'm using Semantic-UI's sidebar pusher in my app, but I should be able to put together a more minimal example.

xtagon avatar Apr 24 '17 18:04 xtagon

@xtagon great! Please let me know if you need any help figuring out where to put all the stuff for the examples.

RobbieTheWagner avatar Apr 24 '17 18:04 RobbieTheWagner

@rwwagner90 I can use some help. I looked at recent PRs for the examples and tried to follow that as a guide. I created a route, linked to it in the index, created a template for my layout and a route component with a template. I just copied the SVG and template snipped from another example, but it won't render in my browser so I must have missed something.

You can see what I tried here: https://github.com/xtagon/flexi/commit/b554267d6eb4dadea9ea5dc8398302df20166f95

xtagon avatar Apr 26 '17 03:04 xtagon

@xtagon I think the issue is your component has no dash in the name. Components must be dasherized.

RobbieTheWagner avatar Apr 26 '17 13:04 RobbieTheWagner

Opened PR #130

xtagon avatar Apr 27 '17 06:04 xtagon