-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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): in-app editor unsaved changes modal plus handling esc and clicking on drawer gray overlay #6958
Conversation
…kflow name; textarea remove shadow
…c and clicking on drawer gray area
@@ -45,6 +45,7 @@ | |||
"@radix-ui/react-switch": "^1.1.1", | |||
"@radix-ui/react-tabs": "^1.1.1", | |||
"@radix-ui/react-tooltip": "^1.1.3", | |||
"@radix-ui/react-visually-hidden": "^1.1.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
used to hide some required components, more about it in the comments below
@@ -55,7 +55,7 @@ TabsTrigger.displayName = TabsPrimitive.Trigger.displayName; | |||
const tabsContentVariants = cva('focus-visible:outline-none', { | |||
variants: { | |||
variant: { | |||
default: 'ring-offset-background focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2', | |||
default: '', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need to show the outline on the tabs content component
{/* TODO: show loading indicator */} | ||
{workflow && step && stepType && <StepEditor workflow={workflow} step={step} stepType={stepType} />} | ||
</motion.div> | ||
<SheetContentBase asChild onInteractOutside={handleCloseSidebar} onEscapeKeyDown={handleCloseSidebar}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The SheetContentBase
is the component that allows to handle the clicks on the drawer overlay and ESC button clicks. But the thing is that it requires the use of the SheetTitle, SheetDescription
under the hood, but the current implementation doesn't use it. So I had to hide these two visually.
We might decide to refactor that in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a TODO in the code.
</Tabs> | ||
</form> | ||
</Form> | ||
<AlertDialog open={blocker.state === 'blocked'}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The unsaved changes modal
✅ Deploy Preview for novu-stg-vite-dashboard-poc ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@novu/client
@novu/headless
@novu/framework
@novu/js
@novu/nest
@novu/nextjs
@novu/node
@novu/notification-center
novu
@novu/providers
@novu/react
@novu/react-native
@novu/shared
@novu/stateless
commit: |
What changed? Why was the change needed?
In-App Editor Drawer:
Screenshots
Screen.Recording.2024-11-12.at.13.56.15.mov