Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release Alpha.0 #10

Open
4 of 5 tasks
triniwiz opened this issue Jan 28, 2023 · 3 comments
Open
4 of 5 tasks

Release Alpha.0 #10

triniwiz opened this issue Jan 28, 2023 · 3 comments

Comments

@triniwiz
Copy link
Owner

triniwiz commented Jan 28, 2023

  • Improve measure calls
  • Animation examples .. "web-ish" maybe 😂
  • Improve JSI usage
  • Test each prop supported
  • Name this Layout
@ammarahm-ed
Copy link
Contributor

ammarahm-ed commented Jan 28, 2023

Many names for the layout have been suggested. I am going to list them here.

<Flex/>
<Grid/>
<Container/>

I would suggest creating 3 base elements for layout. Flex, Grid & Container. The Container can be styled as both grid/flex as needed while Flex & Grid follow their respective layouts. This will give a clear understanding of layout at a glance.

However Container is usually used as something that wraps your app/screen. So <Flex/> & <Grid/> alone do great.
https://theme-ui.com/components/flex
https://theme-ui.com/components/grid
Druid also uses Flex as a layout primitive.

With taffy's roadmap mentioning support for more layout algorithms in future, it makes sense to think of this more broadly. For example Morphorm layout has three base node, Row, Column and Grid

<Row/>
<Column/>

This can in future fit well with the above, Flex, Grid, Container combo where Grid can be switched between css/morphorm grid.

With TableLayout

<Table/>

And

<HStack/>
<VStack/>
<ZStack/>

<Box/>

This is also a great option. Short & Concise. Already used by many web UI libraries in their design systems. However it's function varies from what we want here. For example https://theme-ui.com/components/box defined box as Use the Box component as a layout primitive to add margin, padding, and colors to content..

<DivLayout/>

If we want to stick to the nativescript way of naming layouts, this seems most suitable I think.

<div/>

Since mason & taffy both want to follow the web specification for flex & grid, just calling it a div is another great option.

And here's a list of other name suggestions that were discussed upon:

<TriniDiv/>
<Layout/>
<FlexLayout/>
<Section/>
<DiView/>
<MasonView/>
<Block/>
<Structure/>
<StyledView/>
<LayoutView/>
<FlexView/>
<GridView/>
<Mason/>
<NSDiv/>

@triniwiz
Copy link
Owner Author

These look pretty sweet

<Flex/>
<Grid/>
<Container/>

@ammarahm-ed
Copy link
Contributor

Tests WIP here: https://github.com/herefishyfish/nativescript-mason

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants