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
Action Manager | Refactor API to future-proof property assignment on construction. #9554
Action Manager | Refactor API to future-proof property assignment on construction. #9554
Conversation
…ping to reflect it to BehaviorContext. Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
…ork module Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
… functions to Python via a bus. Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
…itorActionHandler Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
…of nullptr handler. Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
…ad of all properties explicitly. This should make the API easier to extend and more readable, albeit more verbose. Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
…des to work on Test submodule of EditorPythonBindings Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updates look good! Sorry missed looking at this again before the merge, only a couple of comments
struct ActionContextProperties | ||
{ | ||
AZ_RTTI(ActionProperties, "{74694A62-E3FF-43EE-98DF-D66731DC2286}"); | ||
|
||
ActionContextProperties() = default; | ||
virtual ~ActionContextProperties() = default; | ||
|
||
AZStd::string m_name = ""; | ||
}; | ||
|
||
struct ActionProperties |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These looks great! Thanks for adding 👍 (might be worth an API comment for a little more context but otherwise all good!
EXPECT_FALSE(outcome.IsSuccess()); | ||
} | ||
|
||
TEST_F(ActionManagerFixture, RegisterActionContext) | ||
{ | ||
auto outcome = m_actionManagerInterface->RegisterActionContext(m_widget, "o3de.context.test", "Test", ""); | ||
auto outcome = | ||
m_actionManagerInterface->RegisterActionContext("", "o3de.context.test", {}, m_widget); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit/suggestion: I've found actually using AzToolsFramework::ActionProperties{}
instead of {}
makes it a lot easier to track down usages of ActionProperties
- not super important but one of those things that in practice for maintenance can be useful
Applied minor changes to API arguments ordering to uniform them between calls. Moving ActionContext and Action properties to struct to future-proof future API changes in case we need more properties to be added. Updated the tests accordingly.
No behavior changes, just changes to the API.