-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
162 additions
and
146 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
frontend/__tests__/components/features/conversation-panel/utils.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { screen, within } from "@testing-library/react"; | ||
import { UserEvent } from "@testing-library/user-event"; | ||
|
||
export const clickOnEditButton = async (user: UserEvent) => { | ||
const ellipsisButton = screen.getByTestId("ellipsis-button"); | ||
await user.click(ellipsisButton); | ||
|
||
const menu = screen.getByTestId("context-menu"); | ||
const editButton = within(menu).getByTestId("edit-button"); | ||
|
||
await user.click(editButton); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
frontend/src/components/features/conversation-panel/conversation-panel-wrapper.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import ReactDOM from "react-dom"; | ||
|
||
interface ConversationPanelWrapperProps { | ||
isOpen: boolean; | ||
} | ||
|
||
export function ConversationPanelWrapper({ | ||
isOpen, | ||
children, | ||
}: React.PropsWithChildren<ConversationPanelWrapperProps>) { | ||
if (!isOpen) return null; | ||
|
||
const portalTarget = document.getElementById("root-outlet"); | ||
if (!portalTarget) return null; | ||
|
||
return ReactDOM.createPortal( | ||
<div className="absolute h-full w-full left-0 top-0 z-20 bg-black/80 rounded-xl"> | ||
{children} | ||
</div>, | ||
portalTarget, | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.