Skip to content

fix(client): fixed text block drag and drop search#766

Merged
johbaxter merged 1 commit intodevfrom
749-text-blocks-dragging-issue
Mar 28, 2025
Merged

fix(client): fixed text block drag and drop search#766
johbaxter merged 1 commit intodevfrom
749-text-blocks-dragging-issue

Conversation

@Shubham009-prog
Copy link
Copy Markdown
Contributor

Description

  1. Fixed the Text Block Drag and drop issue
  2. Changed the default names as name is being used as key so it was creating duplicates

@Shubham009-prog Shubham009-prog self-assigned this Mar 27, 2025
@Shubham009-prog Shubham009-prog requested a review from a team as a code owner March 27, 2025 13:49
@Shubham009-prog Shubham009-prog linked an issue Mar 27, 2025 that may be closed by this pull request
@github-actions
Copy link
Copy Markdown

@CodiumAI-Agent /describe

@QodoAI-Agent
Copy link
Copy Markdown

Title

fix(client): fixed text block drag and drop search


User description

Description

  1. Fixed the Text Block Drag and drop issue
  2. Changed the default names as name is being used as key so it was creating duplicates

PR Type

Enhancement


Description

  • Renamed menu item labels for header levels.

  • Clarified naming to avoid default duplicates.


Changes walkthrough 📝

Relevant files
Enhancement
default-menu.ts
Rename text block entries with header level labels.           

packages/client/src/components/blocks-workspace/menus/default-menu.ts

  • Updated names from "Text" to "Text (h1-h6)".
  • Aligned helper texts with new header level naming.
  • +6/-6     

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

    @CodiumAI-Agent /review

    @QodoAI-Agent
    Copy link
    Copy Markdown

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

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

    Naming Consistency

    Review the renaming of text block headers from a generic 'Text' to descriptive labels like 'Text (h1)' to ensure consistency across the project and confirm that no other parts of the system depend on the old naming conventions.

        name: 'Text (h1)',
        helperText: 'Display Text in header 1',
        activeImage: BLOCK_IMAGES['H1_ACTIVE'],
        hoverImage: BLOCK_IMAGES['H1_HOVER'],
        json: {
            widget: 'text',
            data: {
                style: {
                    padding: '4px',
                    whiteSpace: 'pre-line',
                    textOverflow: 'ellipsis',
                },
                text: 'Hello world',
                variant: 'h1',
            },
            listeners: {},
            slots: {} as BlockJSON['slots'],
        },
    },
    {
        section: SECTION_TEXT,
        name: 'Text (h2)',
        helperText: 'Display Text in header 2',
        activeImage: BLOCK_IMAGES['H2_ACTIVE'],
        hoverImage: BLOCK_IMAGES['H2_HOVER'],
        json: {
            widget: 'text',
            data: {
                style: {
                    padding: '4px',
                    whiteSpace: 'pre-line',
                    textOverflow: 'ellipsis',
                },
                text: 'Hello world',
                variant: 'h2',
            },
            listeners: {},
            slots: {} as BlockJSON['slots'],
        },
    },
    {
        section: SECTION_TEXT,
        name: 'Text (h3)',
        helperText: 'Display Text in header 3',
        activeImage: BLOCK_IMAGES['H3_ACTIVE'],
        hoverImage: BLOCK_IMAGES['H3_HOVER'],
        json: {
            widget: 'text',
            data: {
                style: {
                    padding: '4px',
                    whiteSpace: 'pre-line',
                    textOverflow: 'ellipsis',
                },
                text: 'Hello world',
                variant: 'h3',
            },
            listeners: {},
            slots: {} as BlockJSON['slots'],
        },
    },
    {
        section: SECTION_TEXT,
        name: 'Text (h4)',
        helperText: 'Display Text in header 4',
        activeImage: BLOCK_IMAGES['H4_ACTIVE'],
        hoverImage: BLOCK_IMAGES['H4_HOVER'],
        json: {
            widget: 'text',
            data: {
                style: {
                    padding: '4px',
                    whiteSpace: 'pre-line',
                    textOverflow: 'ellipsis',
                },
                text: 'Hello world',
                variant: 'h4',
            },
            listeners: {},
            slots: {} as BlockJSON['slots'],
        },
    },
    {
        section: SECTION_TEXT,
        name: 'Text (h5)',
        helperText: 'Display Text in header 5',
        activeImage: BLOCK_IMAGES['H5_ACTIVE'],
        hoverImage: BLOCK_IMAGES['H5_HOVER'],
        json: {
            widget: 'text',
            data: {
                style: {
                    padding: '4px',
                    whiteSpace: 'pre-line',
                    textOverflow: 'ellipsis',
                },
                text: 'Hello world',
                variant: 'h5',
            },
            listeners: {},
            slots: {} as BlockJSON['slots'],
        },
    },
    {
        section: SECTION_TEXT,
        name: 'Text (h6)',

    @github-actions
    Copy link
    Copy Markdown

    @CodiumAI-Agent /improve

    @QodoAI-Agent
    Copy link
    Copy Markdown

    PR Code Suggestions ✨

    No code suggestions found for the PR.

    @johbaxter johbaxter merged commit 474dae6 into dev Mar 28, 2025
    4 checks passed
    @johbaxter johbaxter deleted the 749-text-blocks-dragging-issue branch March 28, 2025 17:26
    @github-actions
    Copy link
    Copy Markdown

    @CodiumAI-Agent /update_changelog

    @QodoAI-Agent
    Copy link
    Copy Markdown

    Changelog updates: 🔄

    2025-03-28

    • Fixed text block drag and drop issue.
    • Updated text block naming to prevent duplicate keys.

    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.

    Text Blocks do not drag in properly when you search for them

    3 participants