From 9b93ef28552d7fe0b3196f91fe9aacebb9713c48 Mon Sep 17 00:00:00 2001 From: NoelKova Date: Tue, 6 Aug 2024 09:45:55 +0200 Subject: [PATCH 1/3] add_single_quote_name_attribute --- apps/sensenet/src/components/view-controls/new-view.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/sensenet/src/components/view-controls/new-view.tsx b/apps/sensenet/src/components/view-controls/new-view.tsx index 0b7d1e439..aa66ed8cc 100644 --- a/apps/sensenet/src/components/view-controls/new-view.tsx +++ b/apps/sensenet/src/components/view-controls/new-view.tsx @@ -73,7 +73,7 @@ export const NewView: React.FC = (props) => { routeMatch={routeMatch} savePath={PATHS.contentTypes.snPath} loadContent={loadDefaultContentType} - getFileNameFromText={(text) => text.match(//m)?.[1] || ''} + getFileNameFromText={(text) => text.match(//m)?.[1] || ''} /> ) } else if (props.contentTypeName === 'Resource') { From 0971aba313a1d081fe451cf707a7659da9513296 Mon Sep 17 00:00:00 2001 From: NoelKova Date: Tue, 6 Aug 2024 10:10:48 +0200 Subject: [PATCH 2/3] action_buttons_height_fix --- apps/sensenet/src/components/ContentBreadcrumbs.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/apps/sensenet/src/components/ContentBreadcrumbs.tsx b/apps/sensenet/src/components/ContentBreadcrumbs.tsx index 43b625af7..42b7b7468 100644 --- a/apps/sensenet/src/components/ContentBreadcrumbs.tsx +++ b/apps/sensenet/src/components/ContentBreadcrumbs.tsx @@ -22,11 +22,16 @@ const useStyles = makeStyles((theme: Theme) => { marginLeft: 'auto', display: 'flex', marginRight: '8px', + height: '40px', }, buttonsWrapper: { display: 'flex', alignItems: 'center', }, + actionButton: { + width: '40px', + marginRight: '2px', + }, }) }) @@ -87,6 +92,7 @@ export const ContentBreadcrumbs = (pr
{ @@ -101,6 +107,7 @@ export const ContentBreadcrumbs = (pr { @@ -123,6 +130,7 @@ export const ContentBreadcrumbs = (pr { From 0492465e20315f722de956bbcba9cd693f90d3c3 Mon Sep 17 00:00:00 2001 From: NoelKova Date: Wed, 7 Aug 2024 11:13:11 +0200 Subject: [PATCH 3/3] no_action_buittons_on_refresh_content_page --- apps/sensenet/src/components/editor/text-editor.tsx | 7 ++++++- apps/sensenet/src/components/view-controls/browse-view.tsx | 3 ++- apps/sensenet/src/components/view-controls/edit-view.tsx | 3 ++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/apps/sensenet/src/components/editor/text-editor.tsx b/apps/sensenet/src/components/editor/text-editor.tsx index 3a1a1e1d1..ce46e7ecc 100644 --- a/apps/sensenet/src/components/editor/text-editor.tsx +++ b/apps/sensenet/src/components/editor/text-editor.tsx @@ -3,7 +3,7 @@ import { PathHelper } from '@sensenet/client-utils' import { ActionModel, GenericContent, Settings, File as SnFile } from '@sensenet/default-content-types' import { useLogger, useRepository } from '@sensenet/hooks-react' import React, { useEffect, useState } from 'react' -import { useLocalization } from '../../hooks' +import { useLocalization, useSelectionService } from '../../hooks' import { getMonacoLanguage } from '../../services/content-context-service' import { ContentBreadcrumbs } from '../ContentBreadcrumbs' import { FullScreenLoader } from '../full-screen-loader' @@ -50,6 +50,11 @@ export const TextEditor: React.FunctionComponent = (props) => { const [hasChanges, setHasChanges] = useState(false) const logger = useLogger('TextEditor') const [error, setError] = useState() + const selectionService = useSelectionService() + + useEffect(() => { + selectionService.selection.setValue([props.content]) + }, [props, selectionService.selection]) const saveContent = async () => { try { diff --git a/apps/sensenet/src/components/view-controls/browse-view.tsx b/apps/sensenet/src/components/view-controls/browse-view.tsx index 1f8bce22f..ad5a62d5a 100644 --- a/apps/sensenet/src/components/view-controls/browse-view.tsx +++ b/apps/sensenet/src/components/view-controls/browse-view.tsx @@ -43,9 +43,10 @@ export const BrowseView: React.FC = (props) => { }) setContent(expanedContentResponse.d) selectionService.activeContent.setValue(expanedContentResponse.d) + selectionService.selection.setValue([expanedContentResponse.d]) } getExpandedContent() - }, [repository, props.contentPath, selectionService.activeContent]) + }, [repository, props.contentPath, selectionService.activeContent, selectionService.selection]) if (content === undefined) { return null diff --git a/apps/sensenet/src/components/view-controls/edit-view.tsx b/apps/sensenet/src/components/view-controls/edit-view.tsx index e415039e6..ef66393f8 100644 --- a/apps/sensenet/src/components/view-controls/edit-view.tsx +++ b/apps/sensenet/src/components/view-controls/edit-view.tsx @@ -49,9 +49,10 @@ export const EditView: React.FC = (props) => { }) setContent(expanedContentResponse.d) selectionService.activeContent.setValue(expanedContentResponse.d) + selectionService.selection.setValue([expanedContentResponse.d]) } getExpandedContent() - }, [repository, props.contentPath, selectionService.activeContent]) + }, [repository, props.contentPath, selectionService.activeContent, selectionService.selection]) if (content === undefined) { return null