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

fix(Menu): MenuItemの高さが小さい画面で崩れるのを修正 #1549

Merged
merged 2 commits into from
Mar 29, 2024

Conversation

Qs-F
Copy link
Collaborator

@Qs-F Qs-F commented Mar 27, 2024

User description

チケット

実装内容

  • MenuItemのmin-heightをリセットするようにした

スクリーンショット

変更前 変更後
image image

相談内容(あれば)


Type

bug_fix


Description

  • Reset the minimum height of the MenuItem component to ensure it displays correctly in small window sizes.

Changes walkthrough

Relevant files
Bug fix
MenuItem.tsx
Reset `MenuItem` Component's Minimum Height                           

packages/for-ui/src/menu/MenuItem.tsx

  • Added min-h-[unset] to the MenuItem component to reset its minimum
    height.
  • +1/-1     

    PR-Agent usage:
    Comment /help on the PR to get a list of all available PR-Agent tools and their descriptions

    Copy link

    changeset-bot bot commented Mar 27, 2024

    🦋 Changeset detected

    Latest commit: 2adab72

    The changes in this PR will be included in the next version bump.

    This PR includes changesets to release 1 package
    Name Type
    @4design/for-ui Patch

    Not sure what this means? Click here to learn what changesets are.

    Click here if you're a maintainer who wants to add another changeset to this PR

    Copy link

    PR-Agent was enabled for this repository. To use it, please link your git user with your CodiumAI identity here.

    PR Description updated to latest commit (e1764ba)

    Copy link

    PR-Agent was enabled for this repository. To use it, please link your git user with your CodiumAI identity here.

    PR Review

    ⏱️ Estimated effort to review [1-5]

    1, because the change is minimal and straightforward, affecting only a single property in a single component.

    🧪 Relevant tests

    No

    🔍 Possible issues

    Styling Regression: Changing the min-height property to unset might cause unexpected visual regressions in layouts where the MenuItem component's height was implicitly relied upon. It's recommended to verify this change across all UIs where MenuItem is used.

    🔒 Security concerns

    No


    ✨ Review tool usage guide:

    Overview:
    The review tool scans the PR code changes, and generates a PR review which includes several types of feedbacks, such as possible PR issues, security threats and relevant test in the PR. More feedbacks can be added by configuring the tool.

    The tool can be triggered automatically every time a new PR is opened, or can be invoked manually by commenting on any PR.

    • When commenting, to edit configurations related to the review tool (pr_reviewer section), use the following template:
    /review --pr_reviewer.some_config1=... --pr_reviewer.some_config2=...
    
    [pr_reviewer]
    some_config1=...
    some_config2=...
    

    See the review usage page for a comprehensive guide on using this tool.

    @Qs-F Qs-F changed the title Fix to reset MenuItem min-height fix(Menu): MenuItemの高さが小さい画面で崩れるのを修正 Mar 27, 2024
    Copy link

    qodo-merge-pro bot commented Mar 27, 2024

    PR Code Suggestions

    CategorySuggestions                                                                                                                                                       
    Enhancement
    Use a responsive height setting for better visual consistency across devices.

    Consider using a more responsive height setting instead of min-h-[unset] to ensure the
    MenuItem component remains visually consistent across different screen sizes. For example,
    using min-h-[2rem] or a similar value can provide a minimum height that adapts better to
    various devices while maintaining the design integrity.

    packages/for-ui/src/menu/MenuItem.tsx [47]

    -`bg-shade-white-default text-r hover:bg-shade-white-hover focus-visible:bg-shade-white-active [&.Mui-focused]:bg-shade-white-active flex min-h-[unset] flex-row items-start gap-2 whitespace-nowrap px-4 py-1 font-sans`
    +`bg-shade-white-default text-r hover:bg-shade-white-hover focus-visible:bg-shade-white-active [&.Mui-focused]:bg-shade-white-active flex min-h-[2rem] flex-row items-start gap-2 whitespace-nowrap px-4 py-1 font-sans`
     

    ✨ Improve tool usage guide:

    Overview:
    The improve tool scans the PR code changes, and automatically generates suggestions for improving the PR code. The tool can be triggered automatically every time a new PR is opened, or can be invoked manually by commenting on a PR.

    • When commenting, to edit configurations related to the improve tool (pr_code_suggestions section), use the following template:
    /improve --pr_code_suggestions.some_config1=... --pr_code_suggestions.some_config2=...
    
    [pr_code_suggestions]
    some_config1=...
    some_config2=...
    

    See the improve usage page for a comprehensive guide on using this tool.

    Copy link

    cloudflare-workers-and-pages bot commented Mar 27, 2024

    Deploying for-ui with  Cloudflare Pages  Cloudflare Pages

    Latest commit: 2adab72
    Status: ✅  Deploy successful!
    Preview URL: https://dbdf6072.for-ui.pages.dev
    Branch Preview URL: https://fix-menuitem-in-small-window.for-ui.pages.dev

    View logs

    @Qs-F Qs-F requested a review from locona March 27, 2024 08:00
    Copy link
    Contributor

    @locona locona left a comment

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    LGTM

    @Qs-F Qs-F merged commit 5b3a8a8 into main Mar 29, 2024
    5 checks passed
    @Qs-F Qs-F deleted the fix/menuitem-in-small-window-height@1471 branch March 29, 2024 02:51
    @github-actions github-actions bot mentioned this pull request Mar 29, 2024
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    小さい画面でMenuItemが崩れるのを修正
    2 participants