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

ink-link does not render correctly when used within nested ink Box #7

Closed
tknickman opened this issue Mar 31, 2020 · 2 comments
Closed

Comments

@tknickman
Copy link

I am seeing a strange issue when using ink-link along with the Box provided by ink.

I am trying to make a two column layout with ink, utilizing links in each column.

As a test, here is a component using ink with no links:

const LinkBugExample = () => {
  return (
    <Box>
      <Box>Test</Box>
      <Box>Test</Box>
    </Box>
  );
};

This renders just fine:
TestTest

If I add links to the text as follows:

const LinkBugExample = () => {
  return (
    <Box>
      <Box>
        <Link url="www.google.com">google</Link>
      </Box>
      <Box>
        <Link url="www.bing.com">bing</Link>
      </Box>
    </Box>
  );
};

This does not render correctly and I get:
ww.google.comgooglbing where ww.google.comgoogl is the link to google, and bing is the link to bing.

Links works fine until I start nesting boxes.

Reading through the code here I'm inclined to think this is an issue with ink and not ink-link, but I thought I would start here to see what you may think.

Any ideas?

I'm using:
ink-link@1.0.0
ink@2.7.1

And my terminal is iTerm2 Build 3.3.9

@tknickman
Copy link
Author

I'm going to move this over to ink, it seems that this only occurs using flexDirection="row" on a Box, which seems to imply that this is a bug with how ink is implementing yoga on the terminal. Thanks!

@tknickman
Copy link
Author

For reference vadimdemedes/ink#269

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