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 OriginTag to Command #16823

Merged
merged 8 commits into from
Mar 19, 2024
Merged

Conversation

PankajBhojwani
Copy link
Contributor

@PankajBhojwani PankajBhojwani commented Mar 5, 2024

Summary of the Pull Request

As outlined in #16816 , adding OriginTag to Command is one of the prerequisites to implementing Action IDs. This PR does that.

Validation Steps Performed

Actions/Commands still get parsed and work

PR Checklist

  • Closes #xxx
  • Tests added/passed
  • Documentation updated
    • If checked, please file a pull request on our docs repo and link it here: #xxx
  • Schema updated (if necessary)

@PankajBhojwani PankajBhojwani marked this pull request as ready for review March 5, 2024 23:42
Comment on lines +69 to +70
static com_ptr<ActionMap> FromJson(const Json::Value& json, const OriginTag origin = OriginTag::None);
std::vector<SettingsLoadWarnings> LayerJson(const Json::Value& json, const OriginTag origin, const bool withKeybindings = true);
Copy link
Member

Choose a reason for hiding this comment

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

Does the origin need to be an optional parameter? If it weren't we could ensure we never forget to pass the right tag.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So the reason for this is in SerializationTests.cpp we call FromJson on several different classes (Profile, ActionMap, etc) in a template function, and not all have them take OriginTag as a parameter. We should fix those tests to not behave like this and make origin a non-optional parameter, but I'm fine with leaving that as a follow up

@PankajBhojwani PankajBhojwani added the AutoMerge Marked for automatic merge by the bot when requirements are met label Mar 18, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot enabled auto-merge (squash) March 18, 2024 20:04
@PankajBhojwani
Copy link
Contributor Author

@zadjii-msft @lhecker could you re-approve? It says the reviews are stale

@microsoft-github-policy-service microsoft-github-policy-service bot merged commit 5f27280 into main Mar 19, 2024
20 checks passed
@microsoft-github-policy-service microsoft-github-policy-service bot deleted the dev/pabhoj/action_origin branch March 19, 2024 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AutoMerge Marked for automatic merge by the bot when requirements are met
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants