Skip to content

Decide on new copy/duplicate icons#1437

Merged
johbaxter merged 13 commits intodevfrom
1406-decide-on-new-copyduplicate-icons
Jul 17, 2025
Merged

Decide on new copy/duplicate icons#1437
johbaxter merged 13 commits intodevfrom
1406-decide-on-new-copyduplicate-icons

Conversation

@NaveenRamasamy028
Copy link
Copy Markdown
Contributor

@NaveenRamasamy028 NaveenRamasamy028 commented Jul 7, 2025

1) Introduced Distinct Icons for Copy and Duplicate Actions
Users can now clearly differentiate between the copy and duplicate functionalities with newly assigned icons. This visual update enhances clarity and overall user experience.
2) Success Notification Added for Database Export
When users export files from any engine, a success message now confirms that the export has been completed successfully. This improvement applies across all supported engine types.
3) Delete Button Error Resolved in Layer Panel
The issue where clicking the delete button caused an error in the layer panel has been fixed. Users can now delete blocks without encountering any issues.

@NaveenRamasamy028 NaveenRamasamy028 requested a review from a team as a code owner July 7, 2025 13:56
@NaveenRamasamy028 NaveenRamasamy028 linked an issue Jul 7, 2025 that may be closed by this pull request
3 tasks
@github-actions
Copy link
Copy Markdown

github-actions bot commented Jul 7, 2025

@CodiumAI-Agent /describe

@QodoAI-Agent
Copy link
Copy Markdown

Title

Decide on new copy/duplicate icons


PR Type

Enhancement


Description

  • Replace default copy icon with custom duplicate icon

  • Import and style Duplicate.svg in components

  • Update NotebookExplorerPanelItem duplicate button rendering

  • Update DeleteDuplicateMask duplicate button rendering


Changes walkthrough 📝

Relevant files
Enhancement
NotebookExplorerPanelItem.tsx
Use custom duplicate icon component                                           

packages/client/src/components/blocks-workspace/panels/NotebookExplorerPanelItem.tsx

  • Imported Duplicate.svg asset
  • Added StyledDuplicateIcon styled component
  • Replaced ContentCopyOutlined with StyledDuplicateIcon
  • +13/-1   
    DeleteDuplicateMask.tsx
    Swap copy icon to duplicate SVG                                                   

    packages/client/src/components/designer/DeleteDuplicateMask.tsx

  • Imported Duplicate.svg asset
  • Replaced ContentCopy icon with inline tag
  • +2/-1     

    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

    github-actions bot commented Jul 7, 2025

    @CodiumAI-Agent /review

    @github-actions
    Copy link
    Copy Markdown

    github-actions bot commented Jul 7, 2025

    @CodiumAI-Agent /improve

    @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

    Accessibility

    Replacing ContentCopyOutlined with an <img> may impact screen readers. Ensure the duplicate icon includes appropriate alt, aria-label, or role attributes for accessibility.

    <StyledDuplicateIcon
        src={DuplicateIcon}
        alt="Duplicate Icon"
    />
    Consistent Styling

    Confirm that StyledDuplicateIcon matches the sizing, color, and interactive states (hover/focus) of other MUI icons in this panel to maintain a uniform UI.

    const StyledDuplicateIcon = styled('img')({
        width: '1rem',
        height: '1.0625rem',
        display: 'inline-block',
        verticalAlign: 'middle',
        objectFit: 'contain',
    });
    Icon Implementation

    Consider using MUI’s SvgIcon wrapper for the custom duplicate asset to leverage theming and ensure consistent behavior instead of a raw <img>.

    <img src={DuplicateIcon} alt="Duplicate Icon" />

    @QodoAI-Agent
    Copy link
    Copy Markdown

    PR Code Suggestions ✨

    CategorySuggestion                                                                                                                                    Impact
    Accessibility
    Mark icon as decorative

    Since the button already has a tooltip and title, mark the icon as decorative to
    avoid redundant screen reader announcements by clearing the alt text and adding
    aria-hidden.

    packages/client/src/components/blocks-workspace/panels/NotebookExplorerPanelItem.tsx [133-136]

     <StyledDuplicateIcon
         src={DuplicateIcon}
    -    alt="Duplicate Icon"
    +    alt=""
    +    aria-hidden="true"
     />
    Suggestion importance[1-10]: 7

    __

    Why: Changing the alt to empty and adding aria-hidden="true" correctly marks the icon as decorative and avoids redundant screen reader output.

    Medium
    Consistent decorative icon

    Wrap the duplicate icon in a styled component or inline style for consistent sizing
    and mark it as decorative with alt="" and aria-hidden="true" for accessibility.

    packages/client/src/components/designer/DeleteDuplicateMask.tsx [419]

    -<img src={DuplicateIcon} alt="Duplicate Icon" />
    +<img
    +    src={DuplicateIcon}
    +    alt=""
    +    aria-hidden="true"
    +    style={{ width: '1rem', height: 'auto', objectFit: 'contain' }}
    +/>
    Suggestion importance[1-10]: 6

    __

    Why: Adding inline sizing and marking the img as decorative (alt="", aria-hidden="true") improves both consistency and accessibility with moderate impact.

    Low
    General
    Preserve icon aspect ratio

    Use auto height instead of a fixed value to preserve the SVG’s intrinsic aspect
    ratio and remove unnecessary objectFit.

    packages/client/src/components/blocks-workspace/panels/NotebookExplorerPanelItem.tsx [46-52]

     const StyledDuplicateIcon = styled('img')({
         width: '1rem',
    -    height: '1.0625rem',
    +    height: 'auto',
         display: 'inline-block',
         verticalAlign: 'middle',
    -    objectFit: 'contain',
     });
    Suggestion importance[1-10]: 5

    __

    Why: Switching to height: 'auto' simplifies styling and maintains the SVG’s intrinsic proportions, though the impact is relatively minor.

    Low

    @NaveenRamasamy028 NaveenRamasamy028 linked an issue Jul 9, 2025 that may be closed by this pull request
    3 tasks
    Copy link
    Copy Markdown
    Contributor

    @johbaxter johbaxter left a comment

    Choose a reason for hiding this comment

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

    Looks good though ty

    if (output && response.errors.length === 0) {
    notification.add({
    color: 'success',
    message: `${type} downloaded successfully`,
    Copy link
    Copy Markdown
    Contributor

    Choose a reason for hiding this comment

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

    .to(Uppercase + .toLowercase()

    @johbaxter johbaxter merged commit 36d9010 into dev Jul 17, 2025
    3 checks passed
    @johbaxter johbaxter deleted the 1406-decide-on-new-copyduplicate-icons branch July 17, 2025 17:23
    @github-actions
    Copy link
    Copy Markdown

    @CodiumAI-Agent /update_changelog

    @QodoAI-Agent
    Copy link
    Copy Markdown

    Changelog updates: 🔄

    2025-07-17 *

    • Added distinct icons for copy and duplicate actions.
    • Added success notification on database export.
    • Fixed error when deleting items in the layer panel.

    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.

    On Click of Delete button in the layers panel throws an error Decide on new copy/duplicate icons Add success message to database export

    3 participants