Skip to content

Commit

Permalink
fix: use full path when searching autocomplete tags
Browse files Browse the repository at this point in the history
  • Loading branch information
moughxyz committed Feb 9, 2022
1 parent 0c3d1fc commit 78ec092
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 29 deletions.
14 changes: 2 additions & 12 deletions app/assets/javascripts/ui_models/app_state/note_tags_state.ts
Expand Up @@ -217,20 +217,10 @@ export class NoteTagsState {
}

getPrefixTitle(tag: SNTag): string | undefined {
const hierarchy = this.application.getTagParentChain(tag);

if (hierarchy.length === 0) {
return undefined;
}

const prefixTitle = hierarchy.map((tag) => tag.title).join('/');
return `${prefixTitle}/`;
return this.application.getTagPrefixTitle(tag);
}

getLongTitle(tag: SNTag): string {
const hierarchy = this.application.getTagParentChain(tag);
const tags = [...hierarchy, tag];
const longTitle = tags.map((tag) => tag.title).join('/');
return longTitle;
return this.application.getTagLongTitle(tag);
}
}
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -83,8 +83,8 @@
"@reach/listbox": "^0.16.2",
"@reach/tooltip": "^0.16.2",
"@standardnotes/components": "1.7.0",
"@standardnotes/features": "1.29.0",
"@standardnotes/snjs": "2.53.0",
"@standardnotes/features": "1.30.0",
"@standardnotes/snjs": "2.54.0",
"@standardnotes/settings": "^1.11.3",
"@standardnotes/sncrypto-web": "1.6.2",
"mobx": "^6.3.5",
Expand Down
30 changes: 15 additions & 15 deletions yarn.lock
Expand Up @@ -2615,18 +2615,18 @@
resolved "https://registry.yarnpkg.com/@standardnotes/components/-/components-1.7.0.tgz#192f358ddffe275a9ab3709ef31b7b8bf3b58ec1"
integrity sha512-4J9iuos5WZvl+/Z7dNvhgEY9SRTdSm6JiUHbo6rRtryjvlJB4EkvnARxexJvw17MBmTWjvHY8c3aLm/w1dzv0A==

"@standardnotes/domain-events@^2.21.4":
version "2.21.4"
resolved "https://registry.yarnpkg.com/@standardnotes/domain-events/-/domain-events-2.21.4.tgz#d6a78e5e9ff700208e7ed407edf492bd289137a4"
integrity sha512-1odojLlirCNB8h8O3PKPgaSmbjRtkg1MYTovg4uvcDPRbPecw+2F70dA9gMS33224JlorBhjBi4qcn+ehraP8w==
"@standardnotes/domain-events@^2.21.5":
version "2.21.5"
resolved "https://registry.yarnpkg.com/@standardnotes/domain-events/-/domain-events-2.21.5.tgz#10d52186500f541cead0d097f99cda4e6b0d3a21"
integrity sha512-1hKeaJNUn8BtlpaYXvW0JjHP/0JB96x168VZAGKQW4U9SqhEzskMq4M5Tt/sTEV4QBf2dJSHBa+FnK6fYZrqZQ==
dependencies:
"@standardnotes/auth" "^3.15.4"
"@standardnotes/features" "^1.29.0"
"@standardnotes/features" "^1.30.0"

"@standardnotes/features@1.29.0", "@standardnotes/features@^1.29.0":
version "1.29.0"
resolved "https://registry.yarnpkg.com/@standardnotes/features/-/features-1.29.0.tgz#f7c4c2cb9fdf5c7cc08bae177a40ec09eb73be95"
integrity sha512-OTxAtj1nA5yj6yEh3m2AsMnpd+JU6xQ8MBd6Vn3nxx3WKux5d+hTJkkskkbERc+0MZhIFLCiBUrkSolJc8Yo+g==
"@standardnotes/features@1.30.0", "@standardnotes/features@^1.30.0":
version "1.30.0"
resolved "https://registry.yarnpkg.com/@standardnotes/features/-/features-1.30.0.tgz#b7d7884d2f741d2c690b56947ea5f1233adfd6de"
integrity sha512-g01P1/HwPIjEbpIwyr0gFZWPacreTzPF5AT3Sqz4mVxl9+Fb9QY8ckPgdVuPkotQc2xzU1SwAhP7c7Zo+2tWcA==
dependencies:
"@standardnotes/auth" "^3.15.4"
"@standardnotes/common" "^1.9.0"
Expand All @@ -2650,15 +2650,15 @@
buffer "^6.0.3"
libsodium-wrappers "^0.7.9"

"@standardnotes/snjs@2.53.0":
version "2.53.0"
resolved "https://registry.yarnpkg.com/@standardnotes/snjs/-/snjs-2.53.0.tgz#151ff71dbc05d1d650fb8d6907d92af9122f5c91"
integrity sha512-xJLB1W4OP2ApbLZTuO/kVnuq4IS0LHR3aM5WsSmk3g84PiAjvOTYAf/hsUp2/YWq5msxx9wOUi3fB8YFieDqxg==
"@standardnotes/snjs@2.54.0":
version "2.54.0"
resolved "https://registry.yarnpkg.com/@standardnotes/snjs/-/snjs-2.54.0.tgz#97fff8e09bd7bbda00f462f7a4ac796fe8ef7b0f"
integrity sha512-mfB/tyWnG+CyvxbQIh5PqU+fOboSf/F4uf0RcF/U/8urG2ncULM5P4FgWtgZdwWgDnKq2ar3Q1kK2EWz781udQ==
dependencies:
"@standardnotes/auth" "^3.15.4"
"@standardnotes/common" "^1.9.0"
"@standardnotes/domain-events" "^2.21.4"
"@standardnotes/features" "^1.29.0"
"@standardnotes/domain-events" "^2.21.5"
"@standardnotes/features" "^1.30.0"
"@standardnotes/settings" "^1.11.3"
"@standardnotes/sncrypto-common" "^1.6.0"

Expand Down

0 comments on commit 78ec092

Please sign in to comment.