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

[Bug]: Text overflows outside the box when there is huge content in a section #29876

Open
hjetpoluru opened this issue Jan 23, 2025 · 0 comments · May be fixed by #29882
Open

[Bug]: Text overflows outside the box when there is huge content in a section #29876

hjetpoluru opened this issue Jan 23, 2025 · 0 comments · May be fixed by #29882
Assignees
Labels
regression-prod-12.11.0 Regression bug that was found in production in release 12.11.0 Sev3-low Low severity; minimal to no impact upon users team-snaps-platform Snaps Platform team type-bug

Comments

@hjetpoluru
Copy link
Contributor

Describe the bug

Huge content within the section inside the box overflows outside.

Expected behavior

No response

Screenshots/Recordings

Screen.Recording.2025-01-21.at.10.23.24.PM.mov

Steps to reproduce

  1. Use the below example code to generate the component.
  2. Observe the text overflow outside the box within the section when the scroll is performed.
import type { OnRpcRequestHandler } from '@metamask/snaps-sdk';
import { Box, Text, Bold, Section } from '@metamask/snaps-sdk/jsx';

/**
 * Handle incoming JSON-RPC requests, sent through `wallet_invokeSnap`.
 *
 * @param args - The request handler args as object.
 * @param args.origin - The origin of the request, e.g., the website that
 * invoked the snap.
 * @param args.request - A validated JSON-RPC request object.
 * @returns The result of `snap_dialog`.
 * @throws If the request method is not valid for this snap.
 */
export const onRpcRequest: OnRpcRequestHandler = async ({
  origin,
  request,
}) => {
  switch (request.method) {
    case 'hello':
      return snap.request({
        method: 'snap_dialog',
        params: {
          type: 'confirmation',
          content: (
            <Section direction='horizontal'>
            <Text>First text that wraps so we can see the alignment</Text>
            <Text>Second text that wraps so we can see the alignment</Text>
            <Text>Third text that wraps so we can see the alignment</Text>
            <Text>First text that wraps so we can see the alignment</Text>
            <Text>Second text that wraps so we can see the alignment</Text>
            <Text>Third text that wraps so we can see the alignment</Text>
            <Text>First text that wraps so we can see the alignment</Text>
            <Text>Second text that wraps so we can see the alignment</Text>
            <Text>Third text that wraps so we can see the alignment</Text>
          </Section>
          ),
        },
      });
    default:
      throw new Error('Method not found.');
  }
};

Error messages or log output

Detection stage

In production (default)

Version

12.11.0

Build type

None

Browser

Chrome

Operating system

MacOS

Hardware wallet

No response

Additional context

No response

Severity

No response

@hjetpoluru hjetpoluru added Sev3-low Low severity; minimal to no impact upon users team-snaps-platform Snaps Platform team type-bug labels Jan 23, 2025
@github-project-automation github-project-automation bot moved this to To be fixed in Bugs by team Jan 23, 2025
@github-project-automation github-project-automation bot moved this to To be fixed in Bugs by severity Jan 23, 2025
@metamaskbot metamaskbot added the regression-prod-12.11.0 Regression bug that was found in production in release 12.11.0 label Jan 23, 2025
@hmalik88 hmalik88 linked a pull request Jan 23, 2025 that will close this issue
7 tasks
@hmalik88 hmalik88 self-assigned this Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression-prod-12.11.0 Regression bug that was found in production in release 12.11.0 Sev3-low Low severity; minimal to no impact upon users team-snaps-platform Snaps Platform team type-bug
Projects
Status: To be fixed
Status: To be fixed
Development

Successfully merging a pull request may close this issue.

3 participants