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

Q: what should a gts version of flexi-layouts look like? #321

Open
runspired opened this issue Nov 1, 2024 · 0 comments
Open

Q: what should a gts version of flexi-layouts look like? #321

runspired opened this issue Nov 1, 2024 · 0 comments

Comments

@runspired
Copy link
Collaborator

runspired commented Nov 1, 2024

I think we can simplify things by dong a runtime-only replacement with an option build-plugin to compile away unused variations.

Something like:

import { Layout } from '@html-next/flexi-layouts';

const MyComponent = <template>
  <Layout>
    <:mobile></:mobile>
    <:desktop></:desktop>
  </Layout>
</template>;

export default MyComponent;

Alternatively we might be able to use the template-tag infrastructure to rewrite something like this:

import { Layout } from '@html-next/flexi-layouts';

const MyComponent = <layout>
  <mobile></mobile>
  <desktop></desktop>
</layout>;

export default MyComponent;

Or like this

import { Layout } from '@html-next/flexi-layouts';

class MyComponent extends Component {
  <mobile></mobile>
  <desktop></desktop>
}

export default MyComponent;

Downside of the former is we would no longer be able to do dynamic breakpoints. Names and total breakpoints would have to be preset. Downside of the latter is we might be taking on a lot of tooling support for TS/Glint/LanguageServers etc.

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

1 participant