Skip to content

feat(client): Bug fixed on Alignment in Container Component #1169

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

Merged
merged 1 commit into from
May 19, 2025

Conversation

pallabi2303
Copy link
Contributor

Description

Bug fixed on alignment when the vertical direction is selected in container component

Changes Made

Fixed the Bottom alignment in vertical alignment when the the Direction is towards column (Arrow Downwards)

How to Test

  1. Apps -> Create New App -> Drag and Drop -> add Container component -> Block Settings
  2. In Appearance of Block settings User can check the Vertical Alignment options

…elected #1095
@pallabi2303 pallabi2303 self-assigned this May 19, 2025
@pallabi2303 pallabi2303 requested a review from a team as a code owner May 19, 2025 12:48
Copy link

@CodiumAI-Agent /describe

@pallabi2303 pallabi2303 linked an issue May 19, 2025 that may be closed by this pull request
3 tasks
@CodiumAI-Agent
Copy link

Title

feat(client): Bug fixed on Alignment in Container Component


User description

Description

Bug fixed on alignment when the vertical direction is selected in container component

Changes Made

Fixed the Bottom alignment in vertical alignment when the the Direction is towards column (Arrow Downwards)

How to Test

  1. Apps -> Create New App -> Drag and Drop -> add Container component -> Block Settings
  2. In Appearance of Block settings User can check the Vertical Alignment options

PR Type

Bug fix


Description

  • Fix bottom alignment in vertical direction

  • Replace 'left'/'right' with flex-start/end

  • Update alignment title to 'Bottom'


Changes walkthrough 📝

Relevant files
Bug fix
ContainerLayoutSettings.tsx
Correct vertical bottom alignment                                               

libs/renderer/src/components/block-settings/custom/ContainerLayoutSettings.tsx

  • Replaced 'left' with 'flex-start' and 'right' with 'flex-end'
  • Updated alignment title from "Right" to "Bottom"
  • Ensured proper bottom alignment in vertical layout
  • +3/-3     

    Need help?
  • Type /help how to ... in the comments thread for any questions about PR-Agent usage.
  • Check out the documentation for more information.
  • Copy link

    @CodiumAI-Agent /review

    @CodiumAI-Agent
    Copy link

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ Recommended focus areas for review

    Missing title

    The first alignment option now uses flex-start but lacks a title property (e.g., "Top" or "Left"), leading to inconsistent option labels.

    {
        value: "flex-start",
        icon:
            flexDirection === "row"
                ? AlignHorizontalLeft
                : VerticalAlignTop,
    Missing value

    The center alignment option doesn't specify a value (likely "center"), which may cause it to be non-functional.

        icon:
            flexDirection === "row"
                ? AlignHorizontalCenter
                : VerticalAlignCenter,
        title: "Center",
        isDefault: false,
    },

    Copy link

    @CodiumAI-Agent /improve

    @CodiumAI-Agent
    Copy link

    PR Code Suggestions ✨

    CategorySuggestion                                                                                                                                    Impact
    Possible issue
    Conditionally set flex-end title

    Make the title for the flex-end option dynamic so it correctly reads "Right" in row
    layouts and "Bottom" in column layouts. This avoids showing "Bottom" when in a
    horizontal alignment context.

    libs/renderer/src/components/block-settings/custom/ContainerLayoutSettings.tsx [718]

    -title: "Bottom",
    +title: flexDirection === "row" ? "Right" : "Bottom",
    Suggestion importance[1-10]: 8

    __

    Why: The static title: "Bottom" incorrectly labels the flex-end option in row layouts as "Bottom", so making it dynamic to "Right" improves accuracy and UX.

    Medium
    Add dynamic flex-start title

    Add a dynamic title for the flex-start option so it shows "Left" for row direction
    and "Top" for column direction, ensuring consistency with the icon and alignment
    context.

    libs/renderer/src/components/block-settings/custom/ContainerLayoutSettings.tsx [695]

     value: "flex-start",
    +title: flexDirection === "row" ? "Left" : "Top",
    Suggestion importance[1-10]: 6

    __

    Why: Adding a dynamic title for flex-start ensures the option is labeled "Left" for rows and "Top" for columns, aligning with the icon and context.

    Low

    @johbaxter johbaxter merged commit 0d248cf into dev May 19, 2025
    4 checks passed
    @johbaxter johbaxter deleted the BugFixed-Alignment-ContainerComponent branch May 19, 2025 15:41
    Copy link

    @CodiumAI-Agent /update_changelog

    @CodiumAI-Agent
    Copy link

    Changelog updates: 🔄

    2025-05-19 *

    Fixed

    • Fixed bottom alignment for vertical orientation in Container component

    to commit the new content to the CHANGELOG.md file, please type:
    '/update_changelog --pr_update_changelog.push_changelog_changes=true'

    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

    Successfully merging this pull request may close these issues.

    Fix the bug on alignment when the vertical direction is selected
    3 participants