Skip to content

Commit

Permalink
update chat mode. (#2868)
Browse files Browse the repository at this point in the history
  • Loading branch information
pragyasri-gs authored Jan 5, 2024
1 parent de163b6 commit be2544d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 30 deletions.
5 changes: 5 additions & 0 deletions .changeset/stale-items-fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@finos/legend-query-builder': patch
---

Removing Modal From Query Chat.
32 changes: 2 additions & 30 deletions packages/legend-query-builder/src/components/QueryChat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,7 @@
*/

import { observer } from 'mobx-react-lite';
import {
Dialog,
Modal,
ModalHeader,
ModalBody,
ModalFooter,
ModalFooterButton,
BlankPanelContent,
} from '@finos/legend-art';
import { Dialog } from '@finos/legend-art';
import { useApplicationStore } from '@finos/legend-application';
import type { QueryBuilder_LegendApplicationPlugin_Extension } from '../stores/QueryBuilder_LegendApplicationPlugin_Extension.js';
import type { QueryBuilderState } from '../stores/QueryBuilderState.js';
Expand All @@ -47,27 +39,7 @@ export const QueryChat = observer(
open={queryBuilderState.isQueryChatOpened}
onClose={() => queryBuilderState.setIsQueryChatOpened(false)}
>
<Modal className="query-builder__chat-mode__modal" darkMode={true}>
<ModalHeader title="Chat Mode" />
<ModalBody className="query-builder__chat-mode__body">
<>
{extraQueryChatConfigurations.length === 0 ? (
<BlankPanelContent>
Chat Mode is not available
</BlankPanelContent>
) : (
extraQueryChatConfigurations[0]?.(queryBuilderState)
)}
</>
</ModalBody>
<ModalFooter>
<ModalFooterButton
className="btn--caution"
onClick={() => queryBuilderState.setIsQueryChatOpened(false)}
text="Discard and Close"
/>
</ModalFooter>
</Modal>
{extraQueryChatConfigurations[0]?.(queryBuilderState)}
</Dialog>
);
},
Expand Down

0 comments on commit be2544d

Please sign in to comment.