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,dashboard): add step events.length variable #7601

Merged
merged 5 commits into from
Jan 29, 2025

Conversation

LetItRock
Copy link
Contributor

What changed? Why was the change needed?

Add the step steps.digest-step.events.length variable for the digested events.

Truncate the variables name in the dropdown.

Screenshots

Screenshot 2025-01-28 at 11 01 59
Screenshot 2025-01-28 at 11 01 47

Copy link

linear bot commented Jan 28, 2025

Comment on lines +25 to +30
properties: {
// the length property is JS native property on arrays
length: {
type: 'number',
},
},
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 valid JSONSchema syntax. So here we define the length property on the events array. It will be available on arrays as it's JS native property on the arrays.

@@ -54,7 +55,7 @@ const VariablesList = React.forwardRef<HTMLUListElement, VariablesListProps>(
}}
>
<Code2 className="text-feature size-3 min-w-3" />
{option.label}
<TruncatedText>{option.label}</TruncatedText>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fix for the long variable names, the truncated text will be shown in tip on hover

@@ -46,6 +46,9 @@ export function parseStepVariables(schema: JSONSchemaDefinition): ParsedVariable
type: 'variable',
label: fullPath,
});
if (value.properties) {
extractProperties({ type: 'object', properties: value.properties }, fullPath);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

extract properties from the array type

Base automatically changed from nv-5252-fix-removing-step-conditions to next January 28, 2025 11:01
Comment on lines 105 to 107
if (typeof skip === 'boolean') {
updateStepData.controlValues!.skip = null;
}
Copy link
Member

Choose a reason for hiding this comment

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

why is this needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

didn't update with latest next, will do that

Copy link

netlify bot commented Jan 29, 2025

Deploy Preview for dev-web-novu ready!

Name Link
🔨 Latest commit ef02e56
🔍 Latest deploy log https://app.netlify.com/sites/dev-web-novu/deploys/679a4dbaea54ae0008e713d9
😎 Deploy Preview https://deploy-preview-7601.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 29, 2025

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

Name Link
🔨 Latest commit ef02e56
🔍 Latest deploy log https://app.netlify.com/sites/dashboard-v2-novu-staging/deploys/679a4dbaa9e164000803a171
😎 Deploy Preview https://deploy-preview-7601.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.

@LetItRock LetItRock merged commit fe69629 into next Jan 29, 2025
31 of 32 checks passed
@LetItRock LetItRock deleted the nv-5244-digest-events-length-variable branch January 29, 2025 17:38
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