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

feat(api-service): polish attrs process #7477

Merged
merged 4 commits into from
Jan 12, 2025

Conversation

djabarovgeorge
Copy link
Contributor

What changed? Why was the change needed?

Screenshots

Expand for optional sections

Related enterprise PR

Special notes for your reviewer

Copy link

netlify bot commented Jan 9, 2025

Deploy Preview for dev-web-novu ready!

Name Link
🔨 Latest commit 42d789b
🔍 Latest deploy log https://app.netlify.com/sites/dev-web-novu/deploys/67826cd52d23a00008856e1d
😎 Deploy Preview https://deploy-preview-7477.dashboard.novu-staging.co
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Jan 9, 2025

Deploy Preview for dashboard-v2-novu-staging ready!

Name Link
🔨 Latest commit 42d789b
🔍 Latest deploy log https://app.netlify.com/sites/dashboard-v2-novu-staging/deploys/67826cd551aaf00008dadd83
😎 Deploy Preview https://deploy-preview-7477.dashboard-v2.novu-staging.co
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@@ -65,6 +85,10 @@ function processAttributes(
attrs[attr] as string,
attrs.fallback as string,
);
if (!MAILY_FIRST_CITIZEN_VARIABLE_KEY.includes(flag)) {
// eslint-disable-next-line no-param-reassign
attrs[flag] = false;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is the main change, the other changes are reuse enum

@@ -65,6 +85,10 @@ function processAttributes(
attrs[attr] as string,
attrs.fallback as string,
);
if (!MAILY_FIRST_CITIZEN_VARIABLE_KEY.includes(flag)) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

we do not want to update the id and idShowKey, because mainly hold the actual value in them and not the flag. as with other attributes.
so for example isUrlVariable=true/false is a flag, while id=payload.foo is a value.

@djabarovgeorge djabarovgeorge merged commit 80c9ef9 into next Jan 12, 2025
30 of 31 checks passed
@djabarovgeorge djabarovgeorge deleted the polish-attribute-processing branch January 12, 2025 09:13
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.

3 participants