Skip to content

fix: replace whole-card click with dedicated "Load in Editor" button in Model Gallery#362

Merged
nomeguy merged 6 commits intomasterfrom
copilot/add-open-in-editor-button
Dec 9, 2025
Merged

fix: replace whole-card click with dedicated "Load in Editor" button in Model Gallery#362
nomeguy merged 6 commits intomasterfrom
copilot/add-open-in-editor-button

Conversation

Copy link
Contributor

Copilot AI commented Dec 9, 2025

Implementation Complete ✅

All feedback has been addressed:

  • Reverted yarn.lock modifications
  • Removed "Load in Editor" text from button (icon only)
  • Updated tooltip style to match main page tooltips
  • Added delay duration to TooltipProvider for consistency

Changes Made

  1. Icon-only button: Removed text label, keeping only the ExternalLink icon for a cleaner look
  2. Consistent tooltip styling: Applied the same tooltip classes used in ActionToolbar (bg-white dark:bg-gray-800 text-primary border border-primary)
  3. Tooltip timing: Added delayDuration={700} skipDelayDuration={0} to match main page behavior
  4. Cleaner padding: Changed button padding from px-4 py-2 to p-2 since there's no text

Screenshot

Model Gallery with icon-only buttons

The buttons now show only the external link icon with a tooltip on hover that displays "Load in Editor". The tooltip styling matches the main page for consistency.

Original prompt

This section details on the original issue you should resolve

<issue_title>[feature] replace card click with a dedicated "open in editor" button</issue_title>
<issue_description>Problem:
Currently, clicking an entire model card in Model Gallery directly navigates to the Editor and loads the corresponding model template.
However, this behavior may be unexpected for users who simply want to browse or check details without triggering navigation. The whole-card clickable area also reduces the flexibility for future interactions (e.g., preview modal, more actions).

Proposed Solution:
Add a dedicated button on the cardfor loading the model into the Editor.

  • Clicking the button → open Editor and load the selected model template
  • The button will include a tooltip such as "Load in Editor"
  • Use an external-link icon to visually indicate navigation

Button Placement:
Place the button on the Model card (e.g., bottom-right corner or next to action area).</issue_description>

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


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@netlify
Copy link

netlify bot commented Dec 9, 2025

Deploy Preview for casbin-editor ready!

Name Link
🔨 Latest commit 2fdb738
🔍 Latest deploy log https://app.netlify.com/projects/casbin-editor/deploys/693819bc329d4100088641c8
😎 Deploy Preview https://deploy-preview-362--casbin-editor.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@CLAassistant
Copy link

CLAassistant commented Dec 9, 2025

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ nomeguy
❌ Copilot
You have signed the CLA already but the status is still pending? Let us recheck it.

Copilot AI and others added 3 commits December 9, 2025 05:05
Co-authored-by: tjyyy3 <97741063+tjyyy3@users.noreply.github.com>
Co-authored-by: tjyyy3 <97741063+tjyyy3@users.noreply.github.com>
…ecessary return

Co-authored-by: tjyyy3 <97741063+tjyyy3@users.noreply.github.com>
Copilot AI changed the title [WIP] Add dedicated button to open model in editor Replace whole-card click with dedicated "Load in Editor" button in Model Gallery Dec 9, 2025
Copilot AI requested a review from tjyyy3 December 9, 2025 05:16
@nomeguy nomeguy marked this pull request as ready for review December 9, 2025 05:45
@tjyyy3
Copy link
Contributor

tjyyy3 commented Dec 9, 2025

@copilot

  1. don't modify yarn.lock
  2. removethe "Load in Editor" text on the button and keep only the icon to make it cleaner.
  3. the tooltip style should be consistent with the other tooltips on the main page.

…rn.lock

Co-authored-by: tjyyy3 <97741063+tjyyy3@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Dec 9, 2025

@copilot

  1. don't modify yarn.lock
  2. removethe "Load in Editor" text on the button and keep only the icon to make it cleaner.
    ...

All feedback addressed in commit 16e6c2e:

  1. ✅ Reverted yarn.lock to original state
  2. ✅ Removed "Load in Editor" text - button now shows only the icon
  3. ✅ Updated tooltip styling to match main page (bg-white dark:bg-gray-800 text-primary border border-primary)

Updated gallery with icon-only buttons

@nomeguy nomeguy changed the title Replace whole-card click with dedicated "Load in Editor" button in Model Gallery fix: replace whole-card click with dedicated "Load in Editor" button in Model Gallery Dec 9, 2025
@nomeguy nomeguy merged commit 8bafedd into master Dec 9, 2025
6 of 7 checks passed
hsluoyz pushed a commit that referenced this pull request Dec 9, 2025
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.

[feature] replace card click with a dedicated "open in editor" button

4 participants