Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Sep 27, 2025

Problem

The current tools dropdown combines "Load from file/folder" and "Load from preset" into a single menu item that opens a modal with a toggle between the two modes. This creates a confusing user experience where users have to:

  1. Click "Load from file or preset"
  2. Then toggle between "File or Folder" and "Preset" modes within the modal

This doesn't make much sense from a UX perspective since these are fundamentally different actions that users want to perform directly.

Solution

This PR separates the combined action into two distinct menu items in the tools dropdown:

  • "Load from file/folder" - Opens a focused modal dedicated to importing from files/folders
  • "Load from preset" - Opens a focused modal dedicated to loading presets

Changes

New Components

  • FileLoadModal.tsx - Dedicated modal for file/folder importing using the existing FilePreset component
  • PresetLoadModal.tsx - Dedicated modal for preset loading using the existing DefaultPreset component

Updated Components

  • ToolsDropdown.tsx - Now renders two separate menu items instead of one combined item
  • Removed dependency on the original PresetModal for the new workflow

Translation Updates

Added new translation keys in multiple languages:

  • loadFromFile - "Load from file/folder"
  • loadFromPreset - "Load from preset"

Test Updates

  • Updated TokenBottomBar.test.tsx to work with the new separate menu structure

Benefits

  • Clearer user intent - Users can directly select their desired action
  • Faster workflow - No need to navigate toggles within modals
  • Better information architecture - Each action has its own focused dialog with appropriate title
  • Minimal code changes - Reuses existing components while improving UX

The original PresetModal with its toggle functionality remains available for any other parts of the codebase that might need it, ensuring backward compatibility.

Original prompt

Lets separate "Load from preset" into its own action in the tools menu. right now its part of the Load from file or preset - doesnt make much sense, lets rather make it its own dialog


✨ 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 Copilot AI assigned Copilot and six7 Sep 27, 2025
Copy link

changeset-bot bot commented Sep 27, 2025

🦋 Changeset detected

Latest commit: f447e2b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@tokens-studio/figma-plugin Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copilot AI and others added 2 commits September 27, 2025 07:40
Co-authored-by: six7 <4548309+six7@users.noreply.github.com>
Co-authored-by: six7 <4548309+six7@users.noreply.github.com>
@Copilot Copilot AI changed the title [WIP] Lets separate "Load from preset" into its own action in the tools menu. right now its part of the Load from file or preset - doesnt make much sense, lets rather make it its own dialog Separate "Load from preset" into its own action in the tools menu Sep 27, 2025
Copilot finished work on behalf of six7 September 27, 2025 07:49
@Copilot Copilot AI requested a review from six7 September 27, 2025 07:49
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.

2 participants