Skip to content

Commit

Permalink
Merge branch 'next' into nv-5073-digest-schema-updates
Browse files Browse the repository at this point in the history
  • Loading branch information
LetItRock committed Dec 23, 2024
2 parents 3213b0d + a9b7a68 commit 64a06f1
Show file tree
Hide file tree
Showing 9 changed files with 40 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export function StepIndicators({ jobs }: StepIndicatorsProps) {
<div
key={job._id}
className={cn(
'-ml-2 flex h-7 w-7 items-center justify-center rounded-full first:ml-0',
'-ml-2 flex h-7 w-7 items-center justify-center rounded-full border first:ml-0',
STATUS_STYLES[job.status as keyof typeof STATUS_STYLES] ?? STATUS_STYLES.default
)}
>
Expand Down
8 changes: 4 additions & 4 deletions apps/dashboard/src/components/activity/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import { RiLoader3Line, RiLoader4Fill } from 'react-icons/ri';
import { IconType } from 'react-icons/lib';

export const STATUS_STYLES = {
completed: 'border-[1px] border-success/40 bg-success/10 text-success/40',
failed: 'border-[1px] border-destructive/40 bg-destructive/10 text-destructive/40',
delayed: 'border-[1px] border-warning/40 bg-warning/10 text-warning/40',
default: 'border-[1px] border-neutral-200 bg-neutral-50 text-neutral-200',
completed: 'border-[#99e3bb] bg-[#e9faf0] text-[#99e3bb]',
failed: 'border-[#ec98a0] bg-[#ffebed] text-[#ec98a0]',
delayed: 'border-[#F5A524] bg-[#FEF4E6] text-[#F8C16E]',
default: 'border-[#e0e4ea] bg-[#fbfbfb] text-[#e0e4ea]',
} as const;

export const JOB_STATUS_CONFIG: Record<
Expand Down
4 changes: 2 additions & 2 deletions apps/dashboard/src/components/in-app-action-dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export const InAppActionDropdown = ({ onMenuItemClick }: { onMenuItemClick?: ()

return (
<>
<DropdownMenu>
<DropdownMenu modal={false}>
<div className={cn('mt-3 flex items-center gap-1')}>
<div className="border-neutral-alpha-200 relative flex min-h-10 w-full flex-wrap items-center justify-end gap-1 rounded-md border p-1 shadow-sm">
{!primaryAction && !secondaryAction && (
Expand Down Expand Up @@ -168,7 +168,7 @@ const ConfigureActionPopover = (props: ComponentProps<typeof PopoverTrigger> & {
);

return (
<Popover modal={true}>
<Popover>
<PopoverTrigger {...rest} />
<PopoverContent className="max-w-72" side="bottom" align="end">
<div className="flex flex-col gap-3">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export const AvatarPicker = forwardRef<HTMLInputElement, AvatarPickerProps>(

return (
<div className="size-9 space-y-2">
<Popover modal={true} open={isOpen} onOpenChange={setIsOpen}>
<Popover open={isOpen} onOpenChange={setIsOpen}>
<PopoverTrigger asChild>
<Button variant="outline" size="icon" className="text-foreground-600 relative size-full overflow-hidden">
{value ? (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export const CustomStepControls = (props: CustomStepControlsProps) => {
<div className="flex flex-col justify-center gap-1">
<span className="block text-sm">Override code defined defaults</span>
<span className="text-xs text-neutral-400">
Code-defined defaults are read-only by default, you can override them using this toggle.
Code-defined defaults are read-only by default, you can allow overrides using this toggle.
</span>
</div>
<Switch
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { FormControl, FormField, FormMessage } from '@/components/primitives/form/form';
import { useWorkflow } from '@/components/workflow-editor/workflow-provider';
import { parseStepVariables } from '@/utils/parseStepVariablesToLiquidVariables';
import { useFeatureFlag } from '@/hooks/use-feature-flag';
import { cn } from '@/utils/ui';
import { Editor } from '@maily-to/core';
import {
Expand All @@ -20,6 +21,7 @@ import {
spacer,
text,
} from '@maily-to/core/blocks';
import { FeatureFlagsKeysEnum } from '@novu/shared';
import type { Editor as TiptapEditor } from '@tiptap/core';
import { HTMLAttributes, useMemo, useState } from 'react';
import { useFormContext } from 'react-hook-form';
Expand Down Expand Up @@ -48,16 +50,27 @@ export const Maily = (props: MailyProps) => {
const [_, setEditor] = useState<TiptapEditor>();
const { control } = useFormContext();

const isForBlockEnabled = useFeatureFlag(FeatureFlagsKeysEnum.IS_ND_EMAIL_FOR_BLOCK_ENABLED);
const isShowEnabled = useFeatureFlag(FeatureFlagsKeysEnum.IS_ND_EMAIL_SHOW_ENABLED);

return (
<FormField
control={control}
name="body"
render={({ field }) => {
return (
<>
{!isShowEnabled && (
<style>{`
button:has(.lucide-eye) {
display: none;
}
`}</style>
)}
<div className={cn('mx-auto flex h-full flex-col items-start', className)} {...rest}>
<FormControl>
<Editor
key={isForBlockEnabled ? 'for-block-enabled' : 'for-block-disabled'}
config={{
hasMenuBar: false,
wrapClassName: 'min-h-0 max-h-full flex flex-col w-full h-full overflow-y-auto',
Expand All @@ -74,7 +87,7 @@ export const Maily = (props: MailyProps) => {
image,
section,
columns,
forLoop,
...(isForBlockEnabled ? [forLoop] : []),
divider,
spacer,
button,
Expand Down
2 changes: 1 addition & 1 deletion apps/dashboard/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -353,4 +353,4 @@
height: 100%;
scroll-behavior: smooth;
}
}
}
2 changes: 2 additions & 0 deletions packages/shared/src/types/feature-flags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,6 @@ export enum FeatureFlagsKeysEnum {
IS_NEW_DASHBOARD_ACTIVITY_FEED_ENABLED = 'IS_NEW_DASHBOARD_ACTIVITY_FEED_ENABLED',
IS_ND_INTEGRATION_STORE_ENABLED = 'IS_ND_INTEGRATION_STORE_ENABLED',
IS_ND_SMS_CHAT_PUSH_ENABLED = 'IS_ND_SMS_CHAT_PUSH_ENABLED',
IS_ND_EMAIL_FOR_BLOCK_ENABLED = 'IS_ND_EMAIL_FOR_BLOCK_ENABLED',
IS_ND_EMAIL_SHOW_ENABLED = 'IS_ND_EMAIL_SHOW_ENABLED',
}
20 changes: 14 additions & 6 deletions scripts/release.mjs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/**
* Release all packages in the monorepo.
*
*
* Usage: pnpm release <version>
*
*
* Known issues:
* - nx release with independent versioning and updateDependents: "auto" increases patch by the amount of dependencies updated (https://github.com/nrwl/nx/issues/27823)
*/
Expand All @@ -13,8 +13,10 @@ import inquirer from 'inquirer';
import yargs from 'yargs/yargs';
import { execa } from 'execa';

const projects = ['tag:type:package'];

(async () => {
const { dryRun, verbose, ...rest } = yargs(hideBin(process.argv))
const { dryRun, verbose, from, ...rest } = yargs(hideBin(process.argv))
.version(false)
.option('dryRun', {
alias: 'd',
Expand All @@ -27,6 +29,11 @@ import { execa } from 'execa';
type: 'boolean',
default: false,
})
.option('from', {
description:
'The git reference to use as the start of the changelog. If not set it will attempt to resolve the latest tag and use that.',
type: 'string',
})
.help()
.parse();

Expand All @@ -38,20 +45,21 @@ import { execa } from 'execa';
}

const { workspaceVersion, projectsVersionData } = await releaseVersion({
projects: ['tag:type:package'],
projects,
specifier,
dryRun,
verbose,
firstRelease: false,
});

await releaseChangelog({
projects: ['tag:type:package'],
projects,
specifier,
versionData: projectsVersionData,
version: workspaceVersion,
dryRun,
verbose,
from,
});

await execa({
Expand All @@ -68,7 +76,7 @@ import { execa } from 'execa';
]);

await releasePublish({
projects: ['tag:type:package'],
projects,
specifier: 'patch',
dryRun,
verbose,
Expand Down

0 comments on commit 64a06f1

Please sign in to comment.