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

Rows / Columns aren't properly configured for 1:1 AR frames. #316

Closed
1 task done
huntertdiamond opened this issue May 15, 2024 · 1 comment
Closed
1 task done
Labels
Good First Issue Misc: Good First Issue

Comments

@huntertdiamond
Copy link

Describe the bug

I'm attempting to create a grid with a 1:1 aspect ratio using the Row/Rows and Column/Columns exposed by createSystem, but am unable to get the rows to stay within the bounds of the frame.

With a 1:1 aspect ratio provided in new Frog({})

Screenshot 2024-05-15 at 10 20 58 AM

With default 1.91:1 aspect ratio

Screenshot 2024-05-15 at 10 26 26 AM

Here is the boilerplate

import { Column, Columns, Row, Rows, vars } from "../ui.js";
import { Button, Frog } from "frog";

export const homeRoute = new Frog({
  ui: { vars },
  imageAspectRatio: "1:1",
});

homeRoute.frame("/", (c) => {
  return c.res({
    image: (
      <Rows gap="4" width="100%" height="100%">
        {[...Array(4)].map((_, rowIndex) => (
          <Row backgroundColor="two" height="1/4" width="100%">
            <Columns
              gap="1"
              width="100%"
              height="100%"
              alignHorizontal="center"
              alignVertical="center"
            >
              {[...Array(4)].map((_, colIndex) => (
                <Column backgroundColor="eight" width="1/4">
                  {colIndex + 1 + rowIndex * 4}
                </Column>
              ))}
            </Columns>
          </Row>
        ))}
      </Rows>
    ),
    intents: [
      <Button.Link href="https://www.example.com/">Link </Button.Link>,
      <Button value="learn" action="/example">
        Button Press
      </Button>,
    ],
  });
});

Link to Minimal Reproducible Example

https://gist.github.com/huntertdiamond/db1624e98a589373e16398250fe2e179

Steps To Reproduce

provided above

Frog Version

latest

TypeScript Version

No response

Check existing issues

Anything else?

No response

@tmm tmm added Good First Issue Misc: Good First Issue labels May 16, 2024
@dalechyn
Copy link
Collaborator

Since not a full minimal reproducible example was provided (ui.ts file is missing), i'm assuming that you haven't specified frame dimensions there.

I've tried to reproduce it at https://github.com/dalechyn/29may-frog, but was unable to.
Screenshot 2024-05-29 at 15 38 39

@dalechyn dalechyn closed this as not planned Won't fix, can't repro, duplicate, stale May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good First Issue Misc: Good First Issue
Projects
None yet
Development

No branches or pull requests

3 participants