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

fix: should not save system variables to trigger #2363

Merged
merged 4 commits into from
Dec 28, 2022

Conversation

ainouzgali
Copy link
Contributor

What change does this PR introduce?

Fix so system variables (step, subscriber etc) are not saved to trigger => not shown as variables in the trigger snippet that user can apply values to them

Why was this change needed?

Other information (Screenshots)

Screen Shot 2022-12-26 at 15 43 26

@@ -77,6 +87,10 @@ export class ContentService {
}
}

private isSystemVariable(variableName: string): boolean {
return TemplateSystemVariables.includes(variableName.includes('.') ? variableName.split('.')[0] : variableName);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
return TemplateSystemVariables.includes(variableName.includes('.') ? variableName.split('.')[0] : variableName);
const variable = variableName.includes('.') ? variableName.split('.')[0] : variableName
return TemplateSystemVariables.includes(variable);

I feel this will be much clearer to read

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am actually not sure I agree🙈 For me its easier having that context in the same line
But I don't mind changing it if you feel strongly about it :) @BiswaViraj

Copy link
Contributor

Choose a reason for hiding this comment

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

No, it's okay, just a personal preference

Copy link
Contributor

@BiswaViraj BiswaViraj left a comment

Choose a reason for hiding this comment

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

🚀

@ainouzgali ainouzgali merged commit abfcd41 into next Dec 28, 2022
@ainouzgali ainouzgali deleted the fix-sys-vars-shown-in-trigger branch December 28, 2022 07:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants