Commit Graph

49 Commits

Author SHA1 Message Date
Junyi
a241bb492e feat: add page content level search plugin API 2022-11-25 21:26:07 +08:00
Junyi Du
310e1a39f6 ux: show page content in cmd k menu 2022-11-25 21:26:07 +08:00
Junyi Du
093fb68819 feat: page content search ipc adjust 2022-11-25 21:26:07 +08:00
Junyi Du
add951c22c update hook with file content 2022-11-25 21:26:07 +08:00
Junyi Du
2a4e557b38 bug fix 2022-11-25 21:26:07 +08:00
Junyi Du
4c11e451ea feat: search by page content 2022-11-25 21:26:07 +08:00
Junyi Du
4527cd8684 reorganize indice update hook 2022-11-25 21:26:07 +08:00
Junyi Du
9c742910a5 naive page content index 2022-11-25 21:26:07 +08:00
Junyi Du
49336a96b7 hook up DB pipeline 2022-11-25 21:26:07 +08:00
Junyi Du
b760684847 add page indice logics 2022-11-25 21:26:07 +08:00
Tienson Qin
21fc17139f fix: registered plugins 2022-11-23 22:40:39 +08:00
Tienson Qin
d2883c38d2 fix: registered search engines 2022-11-23 22:31:43 +08:00
Charlie
dda1f9bd9f Enhance / Plugin APIs (#6945)
Added
1. All configurations of current graph.
App.getCurrentGraphConfigs: () => Promise<any>
2. All favorite pages list of current graph.
App.getCurrentGraphFavorites: () => Promise<Array<string> | null>
3. All recent pages list of current graph.
App.getCurrentGraphRecent: () => Promise<Array<string> | null>
4. Clear right sidebar blocks.
App.clearRightSidebarBlocks: (opts?: { close: boolean }) => void
5. Support register CodeMirror enhancer. #Experiment feature
Experiments.registerExtensionsEnhancer<T = any>(type: 'katex' | 'codemirror', enhancer: (v: T) => Promise<any>)
6. Support hooks for app search service. #Alpha stage
App.registerSearchService<T extends IPluginSearchServiceHooks>(s: T): void
7. Support focus option for App.insertBlock. Credit to [[tennox]] #PR

Fixed
1. Adjust build script to be compatible for shadow-cljs bundler.
How to set up a clojurescript project with shadow-cljs?
https://github.com/rlhk/logseq-url-plus/blob/main/doc/dev-notes.md
2022-11-22 22:00:29 +08:00
Junyi Du
0e4037ab61 Feat: new file name escaping rules (#6134)
* feat: new file name escaping for namespace

feat: new file name decoding back to page name

* test: file name sanitization

feat: use _0x to encode %

feat: don't create title property

test: extra URL encoding for escaped file names

fix: fit pdf prefix into new file name rules

fix: encoding rules on some characters

fix: handle the buggy file names imported by users

fix: pdf block ref failed to jump

fix: #6167

* fix: enhance backward compatibility

chore: title validation

test: fix namespace queries test

chore: use index version stored in config.edn instead of search.versions

* feat: convert old version graph mechanism

ui: file conversion UI

feat: rename files for conversion

feat: don't trigger conversion when title property is manually edited

fix: file conflict notification while renaming files on some OS

feat: re-index on update version

feat: clicking NO in the re-index dialog would update the index-ver flag to suppress the dialog

feat: use html entities for reserved char escaping

dev: remove unresolved vars & minor refactor

chore: move file name sanity from gp-util to fs-util, as it's for encoding only but not parsing

test: update file name tests to html entities rule

test: convert files from dir ver 3 for repo_tests

feat: convert Windows reserved file names

fix: save index version into idb instead of file

fix: decode uri of path while parsing files on mobile

fix: couple dir version and index version to ensure only re-index on converted dirs

feat: go back to url-encode for special chars

* chore: fix lint

chore: improve codebase to address Gabriel's comments

fix: remove file remnants on add conflict

fix: remove file remnants on rename conflict

chore: add test ns to nbb runner

Also fix typoed fn and remove unused code

* fix: issues of rebase PR6134 to master after file-sync merged

* feat: switchable filename format

* fix: use  go block to replace promesa for rename all with blocking

* feat: re-index after apply rename all

* ui: file conversion enhancement

* fix: merging filename format PR with master

* fix: filename format lint & CI

* ui: filename format flow

* fix: error handling on the rare internal file path confliction case

* chore: shorten component code for files-breaking-changed

* chore: fix CI

* Minor fixes per latest code review

- Remove unused page-name-order
- Update catch usage to be consistent with what's on master
- Place state fn in right place
- Wording fixes:
  - select and apply -> manual. There are no checkboxes for the user
  - Update -> Edit. We use edit for all other settings button
  - Alternatives to starting sentences with May. Not a common way to
    start a sentence
  - update outdated template comment

* ux: rename instruction update

* ux: rename instruction update (2)

* Tweak wording of conversion modal

Simplifed first paragraph and explained the page to the user in first
sentence, may isn't a common way to start sentences and updated outdated
wording

* Fix large-var warning by splitting out a piece of component

* fix: right slash on Windows; legacy format file sanitization

* fix: triple lowbar renaming fns

Co-authored-by: Gabriel Horner <gabriel@logseq.com>
2022-10-08 15:47:45 +08:00
Tienson Qin
4e964688e5 fix: no matched search results for page reference autocomplete 2022-09-29 14:47:11 +08:00
Gabriel Horner
1f0e22275d Add ns docstrings for most ns in src/main
- Added to CI now that it passes
- Added no-doc for docstrings that don't add any more than what's in the
ns name or for ones where I didn't know the ns that well
2022-09-27 13:55:16 +08:00
Tienson Qin
9ac8bf98e1 feat: introduce :block/content-max-length for better performance for
both searching and editing.
2022-08-31 23:02:19 +08:00
Tienson Qin
bdbf4bad2a fix: search/editor frozen by base64 encoded image 2022-08-31 23:02:19 +08:00
maxweilun1989
15a0f19a82 fix: add :feature/enable-search-remove-accents 2022-07-27 18:34:01 +08:00
Junyi Du
9eaec328a9 enhance: add :graph/ready event; check search version of each repo 2022-02-23 11:35:50 +08:00
Gabriel Horner
6e7730729d Remove unused fns detected by carve 2022-02-08 23:15:53 +08:00
Tienson Qin
e7331f33b0 Speed up building search indice 2022-02-08 15:49:59 +08:00
Gabriel Horner
86868f1e15 Remove few more fns 2022-01-27 14:11:59 -05:00
Junyi Du
694dfe52ec enhance: page name index sync normalization; e2e alias diacritic test 2022-01-20 10:33:50 +08:00
Junyi Du
226541ff5e enhance: apply normalization on page indexing & diacritics / accents searching compat. 2022-01-20 10:33:50 +08:00
Junyi Du
26c4f2c486 fix: sanitize block search content 2022-01-17 18:19:35 +08:00
Junyi Du
3afde150ce enhance: index normalized text only (case-insensitive) 2022-01-17 18:19:35 +08:00
Junyi Du
4775be1baf fix: lowercased block content in search result 2022-01-13 12:21:22 +08:00
Gabriel Horner
f1d15b0e05 Lint components and address comments in review
Start using :clj-kondo/ignore as lint violations that need to be
revisited. They may side effect and should be removed with better
understanding of their context
2022-01-12 15:32:47 -05:00
Gabriel Horner
7497d8b396 Lint a good chunk of src/main/frontend
Left some TODOs to discuss with others and others for me to finish
2022-01-11 17:34:54 -05:00
Junyi Du
0fd86fd691 enhancement: NKFC normalize searching queries 2022-01-10 13:29:40 +08:00
Junyi Du
417acc58ae basic fix 2022-01-04 21:37:44 +08:00
Tienson Qin
270d9d5877 fix: remove built-in properties from search result
close #3144
2021-11-15 20:06:51 +08:00
llcc
fef5bbf068 enhance(clock): support recording in repeated block // cleanup unused namespaces (#2777)
* enhance(clock): support recording in repeated block

* cleanup: unused namespaces

* cleanup: missing-else-branch if --> when

* enhance: wider search results window for mobile browser

* fix: namespace requirement
2021-09-08 10:23:16 +08:00
Tienson Qin
3a98f92dff enhance: hide logbook drawer when editing 2021-08-31 00:38:51 +08:00
Tienson Qin
15d2091c06 fix: don't show properties in block references
also, don't show built-in properties in search results
2021-07-16 19:50:56 +08:00
Weihua Lu
5de0749fba feat: imp node in page search 2021-05-18 15:38:51 +08:00
rcmerci
a7a9f649c2 remove redundant ! on property-related funcs & add some tests
enter the commit message for your changes. Lines starting
2021-05-17 20:35:30 +08:00
rcmerci
e8c68a62e5 add util.property & move unit-tests 2021-05-17 20:35:30 +08:00
Weihua Lu
8efa39d65e fix: block search in page filter 2021-05-12 17:46:16 +08:00
Tienson Qin
0c758fc268 feat: simplified markdown properties wip 2021-04-30 18:31:26 +08:00
Tienson Qin
acedd5ac0a chore: remove debugging 2021-04-12 21:36:59 +08:00
Tienson Qin
73c9f05139 enhance: search tweaks 2021-04-12 21:36:59 +08:00
Tienson Qin
02c77a1177 enhance: adjust blocks search 2021-04-12 16:13:14 +08:00
Tienson Qin
d28b72824d feat(search): delete the search db when unlink a graph 2021-04-08 13:52:47 +08:00
Tienson Qin
2fdfd0dcb1 feat(search): single database done 2021-04-08 13:52:47 +08:00
Tienson Qin
2d71389fe5 feat(search): initial refactor 2021-04-08 13:52:47 +08:00
Tienson Qin
1e6cf89c5f feat(sqlite): add Engine protocol 2021-04-08 13:52:47 +08:00
Tienson Qin
0bdf2c65e5 perf(search): use fuzzysort for both pages and blocks searching 2020-12-13 22:40:06 +08:00