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(dashboard): edit step conditions drawer #7417

Open
wants to merge 3 commits into
base: next
Choose a base branch
from

Conversation

LetItRock
Copy link
Contributor

What changed? Why was the change needed?

Step Conditions Empty Drawer:

  • feature flag
  • edit step conditions route
  • empty drawer

Screenshots

Screen.Recording.2025-01-02.at.15.18.18.mov

Copy link

linear bot commented Jan 2, 2025

Copy link

netlify bot commented Jan 2, 2025

Deploy Preview for dev-web-novu ready!

Name Link
🔨 Latest commit 595a730
🔍 Latest deploy log https://app.netlify.com/sites/dev-web-novu/deploys/677cede5aaa167000707e6cd
😎 Deploy Preview https://deploy-preview-7417.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 2, 2025

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

Name Link
🔨 Latest commit 595a730
🔍 Latest deploy log https://app.netlify.com/sites/dashboard-v2-novu-staging/deploys/677cede519e8090008d84f7d
😎 Deploy Preview https://deploy-preview-7417.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.

Copy link

github-actions bot commented Jan 2, 2025

LaunchDarkly flag references

🔍 1 flag added or modified

Name Key Aliases found Info
IS_STEP_CONDITIONS_ENABLED IS_STEP_CONDITIONS_ENABLED

import { FeatureFlagsKeysEnum } from '@novu/shared';
import { Button } from '@/components/primitives/button';

export const EditStepConditions = () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The empty edit step conditions drawer. In the upcoming PRs I'll add the conditions editor and form and will restructure components in the body.

Comment on lines +320 to +340
{isStepConditionsEnabled && (
<>
<SidebarContent>
<Link to={'./conditions'} relative="path" state={{ stepType: step.type }}>
<Button
variant="secondary"
mode="outline"
className="flex w-full justify-start gap-1.5 text-xs font-medium"
>
<RiGuideFill className="h-4 w-4 text-neutral-600" />
Step Conditions
<span className="ml-auto flex items-center gap-0.5">
<span>0</span>
<RiArrowRightSLine className="ml-auto h-4 w-4 text-neutral-600" />
</span>
</Button>
</Link>
</SidebarContent>
<Separator />
</>
)}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Step Conditions button in the Configure Step sidebar

<RiGuideFill className="h-4 w-4 text-neutral-600" />
Step Conditions
<span className="ml-auto flex items-center gap-0.5">
<span>0</span>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

For now, I've hardcoded the value until we have the same logic so we can calculate it

</SheetPortal>
</Sheet>
</>
<StepDrawer title={`Edit ${step?.name}`}>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moved the shared code to the StepDrawer which is used to edit step template and conditions

Copy link
Contributor

Choose a reason for hiding this comment

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

Lovely

Copy link

pkg-pr-new bot commented Jan 3, 2025

Open in Stackblitz

@novu/client

npm i https://pkg.pr.new/novuhq/novu/@novu/client@7417

@novu/headless

npm i https://pkg.pr.new/novuhq/novu/@novu/headless@7417

@novu/node

npm i https://pkg.pr.new/novuhq/novu/@novu/node@7417

@novu/notification-center

npm i https://pkg.pr.new/novuhq/novu/@novu/notification-center@7417

novu

npm i https://pkg.pr.new/novuhq/novu@7417

@novu/providers

npm i https://pkg.pr.new/novuhq/novu/@novu/providers@7417

@novu/shared

npm i https://pkg.pr.new/novuhq/novu/@novu/shared@7417

commit: 595a730

…/edit-step-conditions.tsx

Co-authored-by: Sokratis Vidros <[email protected]>
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