|
@@ -10,6 +10,7 @@ import { animateScroll } from 'react-scroll';
|
|
|
import { DropdownItem } from 'reactstrap';
|
|
import { DropdownItem } from 'reactstrap';
|
|
|
import { debounce } from 'throttle-debounce';
|
|
import { debounce } from 'throttle-debounce';
|
|
|
|
|
|
|
|
|
|
+import { useLayoutFluidClassName } from '~/client/services/layout';
|
|
|
import { exportAsMarkdown, updateContentWidth } from '~/client/services/page-operation';
|
|
import { exportAsMarkdown, updateContentWidth } from '~/client/services/page-operation';
|
|
|
import { toastSuccess } from '~/client/util/toastr';
|
|
import { toastSuccess } from '~/client/util/toastr';
|
|
|
import type { IPageWithSearchMeta } from '~/interfaces/search';
|
|
import type { IPageWithSearchMeta } from '~/interfaces/search';
|
|
@@ -126,6 +127,9 @@ export const SearchResultContent: FC<Props> = (props: Props) => {
|
|
|
|
|
|
|
|
const [isExpandContentWidth, setIsExpandContentWidth] = useState(page.expandContentWidth);
|
|
const [isExpandContentWidth, setIsExpandContentWidth] = useState(page.expandContentWidth);
|
|
|
|
|
|
|
|
|
|
+ // TODO: determine className by the 'expandContentWidth' from the updated page
|
|
|
|
|
+ const growiLayoutFluidClass = useLayoutFluidClassName(isExpandContentWidth);
|
|
|
|
|
+
|
|
|
const duplicateItemClickedHandler = useCallback(async(pageToDuplicate) => {
|
|
const duplicateItemClickedHandler = useCallback(async(pageToDuplicate) => {
|
|
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
|
const duplicatedHandler: OnDuplicatedFunction = (fromPath, toPath) => {
|
|
const duplicatedHandler: OnDuplicatedFunction = (fromPath, toPath) => {
|
|
@@ -206,7 +210,13 @@ export const SearchResultContent: FC<Props> = (props: Props) => {
|
|
|
const isRenderable = page != null && rendererOptions != null;
|
|
const isRenderable = page != null && rendererOptions != null;
|
|
|
|
|
|
|
|
return (
|
|
return (
|
|
|
- <div key={page._id} data-testid="search-result-content" className={`search-result-content ${styles['search-result-content']} d-flex flex-column`}>
|
|
|
|
|
|
|
+ <div
|
|
|
|
|
+ key={page._id}
|
|
|
|
|
+ data-testid="search-result-content"
|
|
|
|
|
+ className={`search-result-content ${styles['search-result-content']}
|
|
|
|
|
+ dynamic-layout-root ${growiLayoutFluidClass}
|
|
|
|
|
+ overflow-y-auto`}
|
|
|
|
|
+ >
|
|
|
<div className="grw-page-path-text-muted-container">
|
|
<div className="grw-page-path-text-muted-container">
|
|
|
{ isRenderable && (
|
|
{ isRenderable && (
|
|
|
<GrowiSubNavigation
|
|
<GrowiSubNavigation
|
|
@@ -218,7 +228,11 @@ export const SearchResultContent: FC<Props> = (props: Props) => {
|
|
|
/>
|
|
/>
|
|
|
) }
|
|
) }
|
|
|
</div>
|
|
</div>
|
|
|
- <div id="search-result-content-body-container" className="search-result-content-body-container" ref={scrollElementRef}>
|
|
|
|
|
|
|
+ <div
|
|
|
|
|
+ id="search-result-content-body-container"
|
|
|
|
|
+ ref={scrollElementRef}
|
|
|
|
|
+ className="search-result-content-body-container main container-lg grw-container-convertible overflow-y-scroll"
|
|
|
|
|
+ >
|
|
|
{ isRenderable && (
|
|
{ isRenderable && (
|
|
|
<RevisionLoader
|
|
<RevisionLoader
|
|
|
rendererOptions={rendererOptions}
|
|
rendererOptions={rendererOptions}
|