Skip to content

Commit

Permalink
refactor: $:/tags/CommandPaletteXX -> $:/tags/AutoCompleteXX
Browse files Browse the repository at this point in the history
  • Loading branch information
linonetwo committed Aug 13, 2024
1 parent 9a63e2b commit a027efc
Show file tree
Hide file tree
Showing 26 changed files with 26 additions and 27 deletions.
2 changes: 1 addition & 1 deletion src/autocomplete/commands/help/CtrlEnter.tid
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
command-palette-prefix:
caption: <<lingo Help/CtrlEnter/Caption $:/plugins/linonetwo/autocomplete/language/>>
description: <<lingo Help/CtrlEnter/Description $:/plugins/linonetwo/autocomplete/language/>>
tags: $:/tags/CommandPaletteHelp
tags: $:/tags/AutoCompleteHelp
title: $:/plugins/linonetwo/autocomplete/commands/help/CtrlEnter
list-after: $:/plugins/linonetwo/autocomplete/commands/help/User
2 changes: 1 addition & 1 deletion src/autocomplete/commands/help/Enter.tid
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
command-palette-prefix:
caption: <<lingo Help/Enter/Caption $:/plugins/linonetwo/autocomplete/language/>>
description: <<lingo Help/Enter/Description $:/plugins/linonetwo/autocomplete/language/>>
tags: $:/tags/CommandPaletteHelp
tags: $:/tags/AutoCompleteHelp
title: $:/plugins/linonetwo/autocomplete/commands/help/Enter
list-after: $:/plugins/linonetwo/autocomplete/commands/help/ShiftEnter
2 changes: 1 addition & 1 deletion src/autocomplete/commands/help/Filter.tid
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
command-palette-prefix: [
caption: <<lingo Help/Filter/Caption $:/plugins/linonetwo/autocomplete/language/>>
description: <<lingo Help/Filter/Description $:/plugins/linonetwo/autocomplete/language/>>
tags: $:/tags/CommandPaletteHelp
tags: $:/tags/AutoCompleteHelp
title: $:/plugins/linonetwo/autocomplete/commands/help/Filter
2 changes: 1 addition & 1 deletion src/autocomplete/commands/help/Help.tid
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
command-palette-prefix: ?
caption: <<lingo Help/Help/Caption $:/plugins/linonetwo/autocomplete/language/>>
description: <<lingo Help/Help/Description $:/plugins/linonetwo/autocomplete/language/>>
tags: $:/tags/CommandPaletteHelp
tags: $:/tags/AutoCompleteHelp
title: $:/plugins/linonetwo/autocomplete/commands/help/Help
2 changes: 1 addition & 1 deletion src/autocomplete/commands/help/ShiftEnter.tid
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
command-palette-prefix:
caption: <<lingo Help/ShiftEnter/Caption $:/plugins/linonetwo/autocomplete/language/>>
description: <<lingo Help/ShiftEnter/Description $:/plugins/linonetwo/autocomplete/language/>>
tags: $:/tags/CommandPaletteHelp
tags: $:/tags/AutoCompleteHelp
title: $:/plugins/linonetwo/autocomplete/commands/help/ShiftEnter
list-after: $:/plugins/linonetwo/autocomplete/commands/help/CtrlEnter
2 changes: 1 addition & 1 deletion src/autocomplete/commands/help/System.tid
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
command-palette-prefix: $ ¥
caption: <<lingo Help/System/Caption $:/plugins/linonetwo/autocomplete/language/>>
description: <<lingo Help/System/Description $:/plugins/linonetwo/autocomplete/language/>>
tags: $:/tags/CommandPaletteHelp
tags: $:/tags/AutoCompleteHelp
title: $:/plugins/linonetwo/autocomplete/commands/help/System
2 changes: 1 addition & 1 deletion src/autocomplete/commands/help/Tags.tid
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
command-palette-prefix: #
caption: <<lingo Help/Tags/Caption $:/plugins/linonetwo/autocomplete/language/>>
description: <<lingo Help/Tags/Description $:/plugins/linonetwo/autocomplete/language/>>
tags: $:/tags/CommandPaletteHelp
tags: $:/tags/AutoCompleteHelp
title: $:/plugins/linonetwo/autocomplete/commands/help/Tags
2 changes: 1 addition & 1 deletion src/autocomplete/commands/help/User.tid
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
command-palette-prefix:
caption: <<lingo Help/User/Caption $:/plugins/linonetwo/autocomplete/language/>>
description: <<lingo Help/User/Description $:/plugins/linonetwo/autocomplete/language/>>
tags: $:/tags/CommandPaletteHelp
tags: $:/tags/AutoCompleteHelp
title: $:/plugins/linonetwo/autocomplete/commands/help/User
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
title: $:/plugins/linonetwo/autocomplete/widget/build-in-sub-plugins/command-action-string.js
tags: $:/tags/CommandPalettePlugin
tags: $:/tags/AutoCompletePlugin
type: application/javascript
module-type: library
priority: 20
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
title: $:/plugins/linonetwo/autocomplete/widget/build-in-sub-plugins/command-message.js
tags: $:/tags/CommandPalettePlugin
tags: $:/tags/AutoCompletePlugin
type: application/javascript
module-type: library
priority: 20
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
title: $:/plugins/linonetwo/autocomplete/widget/build-in-sub-plugins/search-config.js
tags: $:/tags/CommandPalettePlugin
tags: $:/tags/AutoCompletePlugin
type: application/javascript
module-type: library
priority: 15
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
title: $:/plugins/linonetwo/autocomplete/widget/build-in-sub-plugins/search-filter.js
tags: $:/tags/CommandPalettePlugin
tags: $:/tags/AutoCompletePlugin
type: application/javascript
module-type: library
priority: 0
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const plugin = {
sourceId: 'help',
getItems({ query }) {
if (cachedTiddlers.length === 0 || !cacheSystemTiddlers()) {
cachedTiddlers = $tw.wiki.filterTiddlers('[all[shadows]tag[$:/tags/CommandPaletteHelp]]');
cachedTiddlers = $tw.wiki.filterTiddlers('[all[shadows]tag[$:/tags/AutoCompleteHelp]]');
}
return (cachedTiddlers
.map((title) => $tw.wiki.getTiddler(title)?.fields)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
title: $:/plugins/linonetwo/autocomplete/widget/build-in-sub-plugins/search-help.js
tags: $:/tags/CommandPalettePlugin
tags: $:/tags/AutoCompletePlugin
type: application/javascript
module-type: library
priority: -1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
title: $:/plugins/linonetwo/autocomplete/widget/build-in-sub-plugins/search-layout.js
tags: $:/tags/CommandPalettePlugin
tags: $:/tags/AutoCompletePlugin
type: application/javascript
module-type: library
priority: 25
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
title: $:/plugins/linonetwo/autocomplete/widget/build-in-sub-plugins/search-recent.js
tags: $:/tags/CommandPalettePlugin
tags: $:/tags/AutoCompletePlugin
type: application/javascript
module-type: library
priority: 1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
title: $:/plugins/linonetwo/autocomplete/widget/build-in-sub-plugins/search-story-history.js
tags: $:/tags/CommandPalettePlugin
tags: $:/tags/AutoCompletePlugin
type: application/javascript
module-type: library
priority: 0
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
title: $:/plugins/linonetwo/autocomplete/widget/build-in-sub-plugins/search-system-title.js
tags: $:/tags/CommandPalettePlugin
tags: $:/tags/AutoCompletePlugin
type: application/javascript
module-type: library
priority: 5
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
title: $:/plugins/linonetwo/autocomplete/widget/build-in-sub-plugins/search-tags.js
tags: $:/tags/CommandPalettePlugin
tags: $:/tags/AutoCompletePlugin
type: application/javascript
module-type: library
priority: 0
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
title: $:/plugins/linonetwo/autocomplete/widget/build-in-sub-plugins/search-user-text.js
tags: $:/tags/CommandPalettePlugin
tags: $:/tags/AutoCompletePlugin
type: application/javascript
module-type: library
priority: 15
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
title: $:/plugins/linonetwo/autocomplete/widget/build-in-sub-plugins/search-user-title-pinyin.js
tags: $:/tags/CommandPalettePlugin
tags: $:/tags/AutoCompletePlugin
type: application/javascript
module-type: library
priority: 10
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
title: $:/plugins/linonetwo/autocomplete/widget/build-in-sub-plugins/search-user-title.js
tags: $:/tags/CommandPalettePlugin
tags: $:/tags/AutoCompletePlugin
type: application/javascript
module-type: library
priority: 5
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ title: $:/plugins/linonetwo/autocomplete/widget/templates/FilterResultBodyCascad
tags: $:/tags/ViewTemplateBodyFilter
list-before: $:/config/ViewTemplateBodyFilters/system

[tag[$:/tags/CommandPaletteResult]then[$:/core/ui/ViewTemplate/body/default]]
[tag[$:/tags/AutoCompleteResult]then[$:/core/ui/ViewTemplate/body/default]]
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
title: $:/plugins/linonetwo/autocomplete/widget/templates/FilterResultTemplate
tags: $:/tags/CommandPaletteResult
tags: $:/tags/AutoCompleteResult
throttle.refresh: yes
_is_titleless: yes

Expand Down
4 changes: 2 additions & 2 deletions src/autocomplete/widgets/utils/getSubPlugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import { ITiddlerFields } from 'tiddlywiki';
export function getSubPlugins(id: string) {
const plugins: Array<AutocompletePlugin<ITiddlerFields, unknown>> = [];
/**
* Try loading plugins. Plugin should add tag `$:/tags/CommandPalettePlugin` and export a `plugin` object.
* Try loading plugins. Plugin should add tag `$:/tags/AutoCompletePlugin` and export a `plugin` object.
*/
const searchTitlePluginTitles = $tw.wiki.filterTiddlers('[all[shadows]tag[$:/tags/CommandPalettePlugin]]');
const searchTitlePluginTitles = $tw.wiki.filterTiddlers('[all[shadows]tag[$:/tags/AutoCompletePlugin]]');
searchTitlePluginTitles
.map(title => $tw.wiki.getTiddler(title)?.fields)
.filter(item => item !== undefined)
Expand Down
1 change: 0 additions & 1 deletion src/commandpalette/styles/DefaultCommandPalette.css.tid
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
tags: $:/tags/CommandPaletteTheme
title: $:/plugins/linonetwo/commandpalette/styles/DefaultCommandPalette.css
tags: $:/tags/Stylesheet

Expand Down

0 comments on commit a027efc

Please sign in to comment.