Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CTRL+D shortcut to duplicate #6629

Closed
wants to merge 1 commit into from

Conversation

osmaneTKT
Copy link
Contributor

Add CTRL+D shortcut to duplicate #6194

@osmaneTKT osmaneTKT requested a review from 4ian as a code owner June 6, 2024 09:15
@@ -1420,6 +1433,7 @@ const ObjectsList = React.forwardRef<Props, ObjectsListInterface>(
{
label: i18n._(t`Duplicate`),
click: () => duplicateObject(item),
accelerator: 'CTRL+D',
Copy link
Collaborator

Choose a reason for hiding this comment

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

This value does not respect the format we use, you can search accelerator in the repo to understand how you should write it.

@@ -750,6 +750,19 @@ const ObjectsList = React.forwardRef<Props, ObjectsListInterface>(
selectObjectFolderOrObjectWithContext,
]
);
React.useEffect(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you regroup this effect with the other one setting the onDelete shortcut? Also, you can add a comment to the one above the instanciation of keyboardShortcutsRef

Copy link
Collaborator

@AlexandreSi AlexandreSi left a comment

Choose a reason for hiding this comment

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

Thanks for the suggestion!

@Bouh
Copy link
Collaborator

Bouh commented Jun 7, 2024

There is two PR for this feature I made another one at:
https://github.com/4ian/GDevelop/pull/6273/files

@osmaneTKT
Copy link
Contributor Author

Okay I am going to see this

@AlexandreSi
Copy link
Collaborator

There is two PR for this feature I made another one at: https://github.com/4ian/GDevelop/pull/6273/files

I think the strategy of having the shortcut defined on the tree view (as done in this PR #6629) is a better strategy. I'll look into it.

osmaneTKT added a commit to osmaneTKT/GDevelop that referenced this pull request Jun 17, 2024
I corrected accelerator and grouped onDelete with onDuplicate. I also added a comment to the one above the instantiation of keyboardShortcutsRef.
@osmaneTKT osmaneTKT closed this Jun 18, 2024
AlexandreSi pushed a commit that referenced this pull request Jul 17, 2024
I corrected accelerator and grouped onDelete with onDuplicate. I also added a comment to the one above the instantiation of keyboardShortcutsRef.
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.

3 participants