Skip to content

Commit

Permalink
(PC-34260)[PRO] feat: Temporarly set the recurrence forms dialog as d…
Browse files Browse the repository at this point in the history
…rawer.
  • Loading branch information
gmeigniez-pass committed Feb 7, 2025
1 parent 0f2f53d commit 1400482
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export const AddRecurrencesButton = ({
<DialogBuilder
onOpenChange={setIsRecurrenceModalOpen}
open={isRecurrenceModalOpen}
variant="drawer"
trigger={
<Button
variant={ButtonVariant.PRIMARY}
Expand Down
4 changes: 2 additions & 2 deletions pro/src/ui-kit/DialogBuilder/DialogBuilder.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ describe('DialogBuilder', () => {
).toBeInTheDocument()
expect(screen.getByRole('button', { name: 'Annuler' })).toBeInTheDocument()
expect(
screen.getByRole('button', { name: 'Fermer la modale' })
screen.getByRole('button', { name: 'Fermer la fenêtre modale' })
).toBeInTheDocument()
})

Expand All @@ -54,7 +54,7 @@ describe('DialogBuilder', () => {
)

await userEvent.click(
screen.getByRole('button', { name: 'Fermer la modale' })
screen.getByRole('button', { name: 'Fermer la fenêtre modale' })
)
expect(
screen.queryByRole('heading', { name: 'Dialog title' })
Expand Down
1 change: 1 addition & 0 deletions pro/src/ui-kit/DialogBuilder/DialogBuilder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ export function DialogBuilder({
// Detect if click actually happened within the bounds of content.
// This can happen if click was on an absolutely positioned element overlapping content,
// such as a click on the scroll bar (https://github.com/radix-ui/primitives/issues/1280)
/* istanbul ignore next */
const actuallyClickedInside =
e.detail.originalEvent.clientX > contentRect.left &&
e.detail.originalEvent.clientX <
Expand Down

0 comments on commit 1400482

Please sign in to comment.