Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 25, 2025

Notes for Reviewers

This PR fixes #

Splits the Recent Designs list into two distinct click targets:

  • Main content (icon, name, date) → Opens design in local Kanvas extension via window.location.href
  • External link icon → Opens design in Layer5 Cloud via window.ddClient.host.openExternal

Changes:

  • Split openDesign() into openDesignInKanvas() and openDesignInCloud()
  • Added e.stopPropagation() on IconButton to prevent event bubbling
  • Added encodeURIComponent() for URL safety
  • Changed replaceAll() to regex /\s+/g for browser compatibility
const openDesignInKanvas = (design) => {
  const kanvasURL = `http://localhost:9081/extension/meshmap?mode=design&design=${encodeURIComponent(design.id)}`;
  window.location.href = kanvasURL;
};

const openDesignInCloud = (design) => {
  const name = encodeURIComponent(design.name.replace(/\s+/g, "-").toLowerCase());
  const myDesignsURL = `https://cloud.layer5.io/catalog/content/my-designs/${name}-${design.id}?source=...`;
  window.ddClient.host.openExternal(myDesignsURL);
};

Signed commits

  • Yes, I signed my commits.
Original prompt

This section details on the original issue you should resolve

<issue_title>Activate kanvasURL in Recent Designs list</issue_title>
<issue_description>### Current Behavior
Split the list of recent designs into two hyperlinks: one for most of the list item content and the other for the external link icon at the end of each list item.

Desired Behavior

In the RecentDesigns.js component, the and should open the kanvasURL location.

<ListItemIcon>
                  <DesignIcon />
                </ListItemIcon>
                <ListItemText primary={design.name} style={{ textOverflow: "ellipsis", overflow: "hidden", whiteSpace: "nowrap", marginRight: "1rem" }} />
                <ListItemText style={{ color: "#ccc", textAlign: "right" }}
                  primary={`Updated ${getFormatDate(design.updated_at)}`}
                />
              

In the RecentDesigns.js component, the IconButton should continue to behave as it does now, opening the myDesignsURL location.

<IconButton
                    onClick={() => openDesign(design)}
                    edge="end"
                    aria-label="open"
                  >
                    <ExternalLinkIcon width="16" fill="#eee" />
                  </IconButton>

Contributor Guide

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits November 25, 2025 22:55
Co-authored-by: leecalcote <7570704+leecalcote@users.noreply.github.com>
…tent and myDesignsURL for external icon

Co-authored-by: leecalcote <7570704+leecalcote@users.noreply.github.com>
Copilot AI changed the title [WIP] Activate kanvasURL in Recent Designs list [RecentDesigns] Split list items into dual hyperlinks for kanvasURL and cloud URL Nov 25, 2025
Copilot AI requested a review from leecalcote November 25, 2025 23:03
Copilot finished work on behalf of leecalcote November 25, 2025 23:03
@leecalcote leecalcote marked this pull request as ready for review November 25, 2025 23:06
Signed-off-by: Lee Calcote <leecalcote@gmail.com>
@leecalcote leecalcote merged commit a8047f5 into master Nov 25, 2025
2 checks passed
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.

Activate kanvasURL in Recent Designs list

2 participants