TagSpaces is an offline, open source, document manager with tagging support
Description Text Truncated when adding a tag (#2100)
Stanimira06d8e666bcb
diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.ymlindex ac5598807..aaa13c48c 100644--- a/.github/workflows/pull_request.yml+++ b/.github/workflows/pull_request.yml@@ -24,8 +24,14 @@ jobs:always-auth: trueregistry-url: https://npm.pkg.github.com/scope: '@tagspacespro'+ - name: Set up Python 3.x+ uses: actions/setup-python@v5+ with:+ python-version: 3.x- name: Running npm install, prettier and type checksrun: |+ # fix flaky python installation on github actions:+ python -m pip install --upgrade pip setuptoolsnpm installnpm run prettier-checknpm run type-checkdiff --git a/src/renderer/hooks/IOActionsContextProvider.tsx b/src/renderer/hooks/IOActionsContextProvider.tsxindex 133fd7d7c..241e91e3b 100644--- a/src/renderer/hooks/IOActionsContextProvider.tsx+++ b/src/renderer/hooks/IOActionsContextProvider.tsx@@ -1582,7 +1582,7 @@ export const IOActionsContextProvider = ({): Promise<TS.FileSystemEntryMeta> {return new Promise((resolve, reject) => {currentLocation- .loadMetaDataPromise(path, true)+ .loadMetaDataPromise(path).then((fsEntryMeta: TS.FileSystemEntryMeta) => {let updatedFsEntryMeta: TS.FileSystemEntryMeta = {...(fsEntryMeta && fsEntryMeta),diff --git a/src/renderer/hooks/PerspectiveSettingsContextProvider.tsx b/src/renderer/hooks/PerspectiveSettingsContextProvider.tsxindex 76956eb1b..6df381ce4 100644--- a/src/renderer/hooks/PerspectiveSettingsContextProvider.tsx+++ b/src/renderer/hooks/PerspectiveSettingsContextProvider.tsx@@ -190,7 +190,7 @@ export const PerspectiveSettingsContextProvider = ({folderSettings?: TS.FolderSettings,): Promise<TS.FileSystemEntryMeta> {return currentLocation- .loadMetaDataPromise(path, true)+ .loadMetaDataPromise(path).then((fsEntryMeta: TS.FileSystemEntryMeta) => {return {...(fsEntryMeta && fsEntryMeta),diff --git a/src/renderer/hooks/TagGroupsLocationContextProvider.tsx b/src/renderer/hooks/TagGroupsLocationContextProvider.tsxindex 15616e930..dc664d3cd 100644--- a/src/renderer/hooks/TagGroupsLocationContextProvider.tsx+++ b/src/renderer/hooks/TagGroupsLocationContextProvider.tsx@@ -113,13 +113,14 @@ export const TagGroupsLocationContextProvider = ({location.getDirSeparator(),metaFile,);- const metaData = await location.loadJSONFile(metaFilePath);+ return location.loadJSONFile(metaFilePath);+ /*const metaData = await location.loadJSONFile(metaFilePath);if (metaData) {return {...metaData,description: getDescriptionPreview(metaData.description, 200),};- }+ }*/}return Promise.resolve(undefined);}diff --git a/src/renderer/utils/CommonLocation.ts b/src/renderer/utils/CommonLocation.tsindex 59685628f..4dabfb87d 100644--- a/src/renderer/utils/CommonLocation.ts+++ b/src/renderer/utils/CommonLocation.ts@@ -860,16 +860,13 @@ export class CommonLocation implements TS.Location {* @param path* @param fullDescription*/- loadMetaDataPromise = (- path: string,- fullDescription = false,- ): Promise<TS.FileSystemEntryMeta> => {+ loadMetaDataPromise = (path: string): Promise<TS.FileSystemEntryMeta> => {return this.getPropertiesPromise(path).then((entryProperties) => {if (entryProperties) {if (entryProperties.isFile) {- return this.loadFileMetaDataPromise(path, fullDescription);+ return this.loadFileMetaDataPromise(path);}- return this.loadDirMetaDataPromise(path, fullDescription);+ return this.loadDirMetaDataPromise(path);}throw new Error('loadMetaDataPromise not exist' + path);});@@ -877,7 +874,7 @@ export class CommonLocation implements TS.Location {loadFileMetaDataPromise = (path: string,- fullDescription = false,+ //fullDescription = true,): Promise<TS.FileSystemEntryMeta> => {const metaFilePath = getMetaFileLocationForFile(path,@@ -898,16 +895,13 @@ export class CommonLocation implements TS.Location {appVersion: '',// lastUpdated: 0,...metaData,- description: fullDescription- ? metaData.description- : getDescriptionPreview(metaData.description, 200),};});};loadDirMetaDataPromise = (path: string,- fullDescription = false,+ //fullDescription = false,): Promise<TS.FileSystemEntryMeta> => {const metaDirPath = getMetaFileLocationForDir(path, this.getDirSeparator());return this.loadJSONFile(metaDirPath).then((metaData) => {@@ -924,9 +918,9 @@ export class CommonLocation implements TS.Location {appVersion: '',// lastUpdated: 0,...metaData,- description: fullDescription+ /*description: fullDescription? metaData.description- : getDescriptionPreview(metaData.description, 200),+ : getDescriptionPreview(metaData.description, 200),*/};});};