Fixes#9346 and fixes#5926.
Also fixes case where relative paths for unsupported paths were creating
pages per directory e.g. `deps/graph-parser/yarn.lock` created deps and
graph-parser pages
* fix(ui): marker of number list
* feat(ui): sub alpha marker for order block (own-property)
* fix(ui): make order list style more compatiable
* fix(ui): reactive block state for all the order list related items
* improve(ux): backspace for the empty order list block
* improve(ui): slash commands for the own number list block
* fix(ui): incorrect order list number for the root block
* fix(ui): order list not work for the custom query blocks
* fix(ui): contextmenu for the number list marker
* improve(ui): remove the property of `logseq.children-as` for the order list feature
* fix(ui): incorrect order list number for the journal pages list
---------
Co-authored-by: Gabriel Horner <97210743+logseq-cldwalker@users.noreply.github.com>
dev: graph parser IoC hook
test: use test db for diff-merge tests
fix: ci lint
dev: refactoring post block-parsing process
feat: diff-merge 2 way merge integration
fix: key namespace of uuid in fix-duplicated-id
fix: duplicated uuid ci
parse-graph didn't have all the extract-options that the app does.
Adding them fixed the bugs.
Also fix publishing bug where old :all-pages-public? option wasn't
respected
* Frontend and cmdline version use the same fns!
* Add docstrings and db tests
* Fix bug with intermittently failing asset copies
* Move publish cli to scripts since publish-spa shouldn't have graph-parser dependency
* Fix parse-graph bug noticed while testing publishing
- Add tests for export
- Refactor export to be more readable
- Add error notification for export that user can see
- Remove unused :ui/show-recent? state
- Cleanup and move escape fns to proper locations
* enhance: add mldoc ast schema
* Add bb task to validate mldoc
Also move mldoc schema to make room for other schemas
---------
Co-authored-by: Gabriel Horner <gabriel@logseq.com>
Co-authored-by: Tienson Qin <tiensonqin@gmail.com>
* fix: fragment urls for audio player
* fix: add Support for url queries and fragments to extension detection
* feat: add tests for extraction of file extension
Co-authored-by: Gabriel Horner <gabriel@logseq.com>
- Brought back Xd-{before,after}-ms and tested it
- Move it to its own ns in graph-parser
- Updated nbb-logseq in deps/
- Made db-utils alias consistent
- Organized resolve-input
Also:
- Move test to a more appropriate ns - model-test isn't for testing
higher level parse file behavior
- Delete model fns that are no longer used
- Fix tests which had incorrect target-page-content and were no longer
testing retractAttribute
- Add options to cli ns for related nbb reuse
- Light cleanup of block deletion
Commit fixes a bug where block references (i.e. `:block/refs`
association in the db) are lost when the page containing the referenced
block is re-loaded due to an update of its underlying file.
Description of Bug:
The bug occurs because when a file is re-loaded to the DB from disk, all existing blocks
belonging to the file are deleted via `retractEntity`, and then blocks
from the parsed file are added. If the file had only had small changes,
the new block set will be very similar to the previous one, although
with different db/ids.
However, while new blocks with "id:: " properties will assume the UUID value
of the previous version of the block, any references to that block via
UUID will *not* be restored in the DB; they are deleted with the
retractEntity command. This results in an inconsistent DB state, where references that should
exist do not.
Description of Fix:
The 'delete-blocks-fn' passed to the graph_parser has been modified as
such:
- It now accepts a list of block uuids to *retain*; graph parser will
pass the blocks parsed from the new file content.
- For any blocks which match a UUID in the retain list, instead of
deleting via retractEntity, the individual attributes are deleted via
retractAttribute (the `retract-attributes` from schema.cljs is used
for this purpose).
Why?
1. there're still a lot issues on it and there's no resource to
maintain and develop it considering we need to support it on all the
platforms.
2. it creates more bugs with Logseq Sync.
Notify users to switch to the new filename format if there're reserved
chars when syncing.
Also, this commit replace all `js/decodeURIComponent` with
`safe-decode-uri-component` to avoid UI crashes.
Fixes issues in #6970. Introduced built-in property types as there are
fewer to list as parsed than unparsed. Also removed test case that was
incorrectly introduced in #5580
Full-text search, highlights and assets alias support
It also exposes a plugin API for highlight context menu
```ts
/**
* Current it's only available for pdf viewer
* @param label - displayed name of command
* @param action - callback for the clickable item
* @param opts - clearSelection: clear highlight selection when callback invoked
*/
registerHighlightContextMenuItem: (
label: string,
action: SimpleCommandCallback,
opts?: {
clearSelection: boolean
}
) => unknown
```
* 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>
* fix: keep parsing even if some whiteboards can't be transacted
* enhance: notice parse errors
* enhance: instrument parse-and-load-error
* chore: add tests for whiteboards parsing and loading