Commit Graph

85 Commits

Author SHA1 Message Date
charlie
76ce3f72e8 fix(pdf): insert highlight blocks for the file based graph 2024-06-13 14:18:00 +08:00
charlie
eb0eff6341 fix(ux): use page uuid instead of the annotations page name 2024-06-12 15:16:54 +08:00
charlie
c38679ff45 fix(pdf): support browser to insert pdf highlight into page blocks 2024-06-12 13:45:46 +08:00
Tienson Qin
f620fe1913 fix: can't open PDF on web 2024-06-05 10:20:22 +08:00
Gabriel Horner
35e6ad120d chore: rename pdf specific properties to logseq.property.pdf
also remove deleted property ns
2024-05-16 15:27:24 -04:00
Gabriel Horner
e50d3eff21 fix: setting block properties with raw value
With this fix able to convert 2 built-ins to :default. Also cleaned
up set-block-property! which had outdated assumptions
2024-05-15 16:10:02 -04:00
Gabriel Horner
70d92c8f7a fix: pdf related properties for db graphs
Added to new property ns as file and file-path are too generic to be top-level.
Also fixed bugs in page creation
2024-05-09 13:38:31 -04:00
Gabriel Horner
24c48e7a87 fix: multiple fixes related to lookup-by-name
- only use it for user properties
- don't use create ident fn to lookup names
- fixed get-area-block-asset-url which didn't work for db graphs without
  the frontend
2024-05-02 15:16:03 -04:00
Tienson Qin
44af2213ce Merge branch 'feat/db' into refactor/db-properties-schema 2024-04-21 13:22:37 +08:00
Tienson Qin
2a7e6accb0 refactor: force outliner.tree/-del to delete all children
Except the children have been moved.
2024-04-17 17:48:59 +08:00
Tienson Qin
6eb6e60b55 Bring back namespaces/page merge/nested pages 2024-04-07 13:48:55 +08:00
Tienson Qin
08f492b849 fix: use pu/get-pid for both file && db graphs 2024-04-04 15:57:49 +08:00
Tienson Qin
60d4fca0ba wip: remove :block/name uniqueness for db based graphs
This PR also remove supports for:
1. merge pages when renaming a page to existing page
2. namespaces such as a/b/c
3. nested page such as [[a [[nested page]]]]

Pages merge might be added back depends on RTC, but it should be
decoupled from renaming, otherwise it's too complex.

Namespaces and nested pages have been contributed some critical bugs
that lead data-loss, they're so complex together with page alias,
it's just impossible to have a good test coverage and ensure the app
is stable, especially when page rename and RTC.
2024-04-04 15:57:48 +08:00
Tienson Qin
8d6916cfd7 wip: fix property-related tests 2024-04-01 12:24:41 +08:00
Tienson Qin
958507262e Merge branch 'feat/db' into refactor/db-properties-schema 2024-03-29 15:51:28 +08:00
Tienson Qin
cda9ac3e26 fix: display class properties 2024-03-29 10:02:29 +08:00
Tienson Qin
8d31f94b24 Remove :block/uuid and :block/name for properties 2024-03-28 17:37:28 +08:00
Gabriel Horner
9c5309da47 enhance: frontend consistently uses :db/ident
for fetching built-in properties instead of :block/name
2024-03-27 20:36:48 -04:00
Gabriel Horner
9b8540921e enhance: more property helper fns uses db-ident
instead of name
2024-03-25 16:34:51 -04:00
Tienson Qin
5efb1536c2 fix: replace all onmousedown/up with onpointerdown/up
onMouseDown can't be used in dropdown trigger
2024-03-12 15:50:27 +08:00
Andelf
329818e4c4 fix(db): css assets loading
- move make-asset-url to assets-handler
- handle assets for db-based graph in add-style-if-exists!
2024-03-11 18:38:48 +08:00
Tienson Qin
036f1b5ab7 feat: /todo/other-status and /urgent/other-priority to set property 2024-01-19 02:36:23 +08:00
Tienson Qin
e4f16d21d9 fix: api-insert-new-block! calls 2024-01-11 02:27:42 +08:00
Tienson Qin
baefeaad5b fix: use page-handler/<create! if possible 2024-01-11 00:54:19 +08:00
Tienson Qin
9194a671fd Move outliner core to its own dep 2024-01-03 18:02:48 +08:00
Tienson Qin
b7d9098e80 Move gp-util and gp-config to the common dep 2024-01-03 16:38:05 +08:00
Tienson Qin
f342303e6a Add initial tests on property handler 2023-11-30 00:34:04 +08:00
Gabriel Horner
097a59d9c6 Merge branch 'master' into feat/db 2023-10-12 15:36:49 -04:00
Tienson Qin
9f0eec2402 fix: whiteboard not working because of properties 2023-10-12 21:17:31 +08:00
charlie
1c1a07db4e fix(pdf): missing the initial ref highlight block sometimes 2023-10-11 17:35:33 +09:00
Gabriel Horner
4b0100cb25 chore: cleanup page-property file based ns
All of frontend.util.page-property was file based except for one line.
Moved that ns to a file-based ns and moved the line out to the more
appropriate property-handler
2023-10-02 15:59:43 -04:00
Gabriel Horner
0483e60eeb fix: disallow db version from creating deprecated title property
also add fixmes for other known properties conversions
2023-09-28 18:01:16 -04:00
Gabriel Horner
4d819ac1b3 fix: slides and aliased page navigation for db version
Update a few fixmes for properties.
Also add built-in prop which we've documented for slides.
Also show hide for built-ins properties as built-ins also use it
2023-09-25 15:29:24 -04:00
Tienson Qin
15cb78fbf7 fix: add pre-configured properties when creating a new db graph 2023-08-02 01:49:23 +08:00
Tienson Qin
db5e0a6571 handle pdf annotation properties 2023-08-01 21:23:00 +08:00
Tienson Qin
3ec4c6bedd remove handler.editor.property 2023-08-01 13:59:06 +08:00
Gabriel Horner
9628fc52b9 Split out property related fns
in order to make editor ns more maintainable
2023-05-04 13:50:09 +08:00
Andelf
65eb6d3380 fix(fs): image renaming op when resizing pdf hl area (#9122)
* fix(fs): image renaming op when resizing pdf hl area
Fix #9120
2023-04-20 15:15:32 +08:00
Tienson Qin
bc635eaf4b fix: internal blocks paste 2023-03-29 18:41:04 +08:00
charlie
22dfa621e4 enhance(pdf): UI lag for the case of large highlights data 2023-03-09 09:15:33 +08:00
Adam
6f45107408 fix: incorrect page title when 'hls__' is opened (#8697)
* dev: move 'hls-file?' to pdf-utils
* dev: use 'hls-file?' instead of string comparison
* fix: window title when hls file opened
2023-02-28 15:10:33 +08:00
Junyi Du
07fb4e64c0 fix: hls page name in page ref 2023-02-20 19:50:59 +08:00
Charlie
55b5149f4a Enhance/pdf enhancements (#8616)
- Improve interactions about the popup modal from the PDF viewer toolbar
- Persist highlights data with multiple-lines text format (for friendly Git diff)
- Blink the text highlight when scrolling to position
- Open the PDF viewer in the system Window
2023-02-20 15:58:43 +08:00
charlie
6d210e6371 fix(pdf): not persist highlights data when load hls file error 2023-02-09 23:24:06 +08:00
charlie
e70d76589b enhance(pdf): make the weblink pdf filename to be human-readable for the annotations page 2023-01-12 21:04:12 +08:00
Charlie
401c416484 feat:pdf highlight drag & drop (#8103)
* refactor(pdf): names
* improve(pdf): support highlight region draggable
* improve(pdf): unused class of pdf container
* improve(pdf): unused class of pdf container
* fix(pdf): ensure highlight block ref exists when draging to editor & whiteboard region

Co-authored-by: Bad3r <bad3r@protonmail.com>
Co-authored-by: Andelf <andelf@gmail.com>
2023-01-12 01:25:10 +08:00
Charlie
dd2ef163ba Enhance/PDF viewer (#7369)
* fix(pdf): WIP potential memory leaks
* enhance(pdf): sync page number in highlights metafile
* enhance(pdf): support preview highlight area image in a lightbox
* fix: clojurescript unit tests
* fix(pdf): page number overflow when more digits
2022-11-17 20:31:08 +08:00
Tienson Qin
53265f6c34 fix: make sure that highlight content exists 2022-10-12 22:11:02 +08:00
Charlie
d53ac94bfc Enhance/pdf improvements (#6475)
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
    ```
2022-10-09 20:44:18 +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