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

AnimationName selector #7288

Merged
merged 29 commits into from
Jan 9, 2025
Merged

AnimationName selector #7288

merged 29 commits into from
Jan 9, 2025

Conversation

OkamisLeRoi
Copy link
Collaborator

@OkamisLeRoi OkamisLeRoi commented Jan 8, 2025

The goal is to introduce a new property type in the extensions, 'AnimationName', for improved QoL for the end user. They no longer have to manually type the name of the animation. They have a selector based on the animations already created.

Currently, this is only available in the 'Behavior' panel in the object editing dialog box. I will add it to the left-side editing panel once this PR is approved.

https://gdevelop-storybook.s3.amazonaws.com/feat/animation-name-behaviors/latest/index.html?path=/story/eventsbasedbehavioreditor-eventsbasedbehavioreditordialog--default

@OkamisLeRoi OkamisLeRoi requested a review from 4ian as a code owner January 8, 2025 11:38
Core/GDCore/String.cpp Outdated Show resolved Hide resolved
GDevelop.js/Bindings/ObjectJsImplementation.cpp Outdated Show resolved Hide resolved
GDevelop.js/Gruntfile.js Outdated Show resolved Hide resolved
@@ -1,4 +1,5 @@
// @flow
import { ProjectScopedContainersAccessor } from '../../InstructionOrExpression/EventsScope';
Copy link
Collaborator

Choose a reason for hiding this comment

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

Did you forget to revert this line?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Regarding this, in the terminal where you ran npm start in newIDE/app, you should see a warning about this unused import, and VSCode might display the file with an orange color

newIDE/app/src/PropertiesEditor/index.js Outdated Show resolved Hide resolved
},
getLabel,
getDescription,
getChoices,
Copy link
Collaborator

@D8H D8H Jan 8, 2025

Choose a reason for hiding this comment

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

I guess a new attribute isAllowingFreeText could be added and PropertiesEditor will only allow the current property value until we make a new component that does autocompletion one day.

A easier solution would be to add the default property value to the list but the extension creator may decide to change it and it may have side effects if some behaviors still have the old default value and it's not an existing animation either. But, I guess it will be rare enough.

What do you think about only adding the property default value to the list for now?

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 revert those changes in yarn.lock? It's always a bit risky to update it if you're not sure about the changes

Core/GDCore/String.cpp Outdated Show resolved Hide resolved
Comment on lines +732 to +736
<SelectOption
key="property-type-animationname"
value="AnimationName"
label={t`Animation name (text)`}
/>
Copy link
Collaborator

Choose a reason for hiding this comment

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

I wonder if it should be below the "Choice" type as it's a bit more specific.

@OkamisLeRoi OkamisLeRoi merged commit 740de83 into master Jan 9, 2025
5 of 6 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.

4 participants