Skip to content

Conversation

@danielbachhuber
Copy link
Contributor

@danielbachhuber danielbachhuber commented Sep 3, 2024

Proposed Changes

Switches the "Local path" field to use a copy button instead of open new button.

Before:

CleanShot 2024-09-10 at 03 48 40@2x

After:

CleanShot 2024-09-10 at 03 47 45@2x

Testing Instructions

  1. Open the "Settings" tab.
  2. Verify clicking the copy icon adds the site's path to the clipboard.

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?

@danielbachhuber danielbachhuber self-assigned this Sep 3, 2024
@danielbachhuber
Copy link
Contributor Author

@matt-west It seems odd that "copy" is the default behavior for the other fields:

CleanShot 2024-09-03 at 04 59 24@2x

What do you think about making "copy" the default behavior for this field too, and then using an "open in new window" icon for opening the file path?

@matt-west
Copy link
Contributor

@danielbachhuber Yep, that works. Thanks for the suggestion!

@wojtekn
Copy link
Contributor

wojtekn commented Sep 10, 2024

@danielbachhuber @matt-west Studio already provides a way to open a directory in the Overview tab, 'Open in...' -> 'Finder' option.

What if we make it consistent in the Settings tab and use the copy action for all listed items, ditching the open action there?

@danielbachhuber danielbachhuber changed the title Adds a "Copy local path" button to the "Local path" field Switch "Local path" field to copy button instead of open new button Sep 10, 2024
@danielbachhuber
Copy link
Contributor Author

What if we make it consistent in the Settings tab and use the copy action for all listed items, ditching the open action there?

@wojtekn I'm amenable to this. I tried using the copy button and then open new, but it looked funky when you clicked the button and "Copied!" appeared.

@danielbachhuber danielbachhuber marked this pull request as ready for review September 10, 2024 10:57
@wojtekn
Copy link
Contributor

wojtekn commented Sep 10, 2024

Thanks @danielbachhuber. Yes, I agree that two buttons together could be confusing there.

@matt-west
Copy link
Contributor

Do you think users will need to copy the local path more than they want to open the folder in Finder?

I agree that we can simplify to one action here. Copying makes sense for the other items in settings as it's things like passwords, URLs, and username. I’m not yet convinced that it needs to be the primary action for local path though. Can you share some example of when users will need to copy the path as text.

@wojtekn
Copy link
Contributor

wojtekn commented Sep 11, 2024

Do you think users will need to copy the local path more than they want to open the folder in Finder?

They can open the folder in the Overview tab.

I agree that we can simplify to one action here. Copying makes sense for the other items in settings as it's things like passwords, URLs, and username. I’m not yet convinced that it needs to be the primary action for local path though. Can you share some example of when users will need to copy the path as text.

Now, users need to open the Terminal and run pwd command to copy the path. An example use case is when users want to run any command line that requires the absolute path, e.g., copy the site to another directory, backup the directory, or scan it using a tool like lint.

Copy link
Contributor

Choose a reason for hiding this comment

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

Let's remove no longer used imports - Icon, file, getIpcApi, and Button.

@danielbachhuber
Copy link
Contributor Author

Can you share some example of when users will need to copy the path as text.

Now, users need to open the Terminal and run pwd command to copy the path. An example use case is when users want to run any command line that requires the absolute path, e.g., copy the site to another directory, backup the directory, or scan it using a tool like lint.

This is what I ran into. I'm not sure of a use case to open the site's directory in the Finder, to be honest.

@wojtekn
Copy link
Contributor

wojtekn commented Sep 11, 2024

I'm not sure of a use case to open the site's directory in the Finder, to be honest.

I use that occasionally to edit or delete files or review the site content quickly.

I think that with your change, the UI is clearer as:

  • all actions that open the browser or another app are kept in the Overview tab
  • all actions in Settings allow to copy the text

@matt-west
Copy link
Contributor

matt-west commented Sep 11, 2024

Thanks for the additional info.

Happy to drop the folder icon and go with the copy action instead. 👍

I’ve updated the designs in Figma to reflect the change.

@wojtekn wojtekn merged commit f7d2d76 into trunk Sep 11, 2024
@wojtekn wojtekn deleted the improve/add-copy-button branch September 11, 2024 16:11
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.

4 participants