Commit Graph

500 Commits

Author SHA1 Message Date
6a2e0b3ad3 fix: bad visibility for last explorer item (#478)
* fix: bad visibility for last explorer item

* feat(explorer): add pseudo element for observer
2023-09-17 22:04:44 +02:00
a9cdd5ff27 Merge pull request #479 from benschlegel/explorer-config
feat(explorer): add config for custom sort/map/filter functions
2023-09-17 21:36:04 +02:00
e67f409ec1 Merge pull request #479 from benschlegel/explorer-config
feat(explorer): add config for custom sort/map/filter functions
2023-09-17 21:36:04 +02:00
a1f2551c16 docs: fix examples 2023-09-17 21:32:23 +02:00
4afb099bf3 docs: fix examples 2023-09-17 21:32:23 +02:00
d889775951 fix: darkmode scroll bars (#480) 2023-09-17 10:29:20 -07:00
7ac772fca8 fix: darkmode scroll bars (#480) 2023-09-17 10:29:20 -07:00
c2ac5dcfd0 fix(explorer): filter function in ExplorerNode 2023-09-17 15:51:08 +02:00
94a04ab1c9 fix(explorer): filter function in ExplorerNode 2023-09-17 15:51:08 +02:00
b8fbb64cad fix: display name for file nodes 2023-09-17 12:41:06 +02:00
9358f73f1c fix: display name for file nodes 2023-09-17 12:41:06 +02:00
e3306cc475 feat: black magic
add config for `order` array, which determines the order in which all passed config functions for explorer will get executed in.

functions will now dynamically be called on `fileTree` via array accessor (e.g. fileTree["sort"].call(...)) with corresponding function from options being passed to call)
2023-09-16 21:58:38 +02:00
f7029012df feat: black magic
add config for `order` array, which determines the order in which all passed config functions for explorer will get executed in.

functions will now dynamically be called on `fileTree` via array accessor (e.g. fileTree["sort"].call(...)) with corresponding function from options being passed to call)
2023-09-16 21:58:38 +02:00
e112fdad2b fix: create deep copy of file passed into tree 2023-09-16 19:45:21 +02:00
fea352849c fix: create deep copy of file passed into tree 2023-09-16 19:45:21 +02:00
0ed17307cf feat(explorer): implement map fn argument
Add a function for mapping over all FileNodes as an option for `Explorer`
2023-09-16 19:35:27 +02:00
3d8c470c0d feat(explorer): implement map fn argument
Add a function for mapping over all FileNodes as an option for `Explorer`
2023-09-16 19:35:27 +02:00
4ba45f9577 feat(explorer): integrate filter option 2023-09-16 19:18:59 +02:00
31d16fbd2c feat(explorer): integrate filter option 2023-09-16 19:18:59 +02:00
9ad51c46d0 fix: use correct import for QuartzPluginData 2023-09-16 17:47:44 +02:00
036a33f70b fix: use correct import for QuartzPluginData 2023-09-16 17:47:44 +02:00
3ea0d50293 feat: implement filter function for explorer 2023-09-16 17:28:58 +02:00
58aea1cb07 feat: implement filter function for explorer 2023-09-16 17:28:58 +02:00
5d9d681152 feat(explorer): add config to support custom sort fn 2023-09-16 12:40:19 +02:00
c7d3474ba8 feat(explorer): add config to support custom sort fn 2023-09-16 12:40:19 +02:00
515ac8d9a1 feat: implement file explorer component (closes #201) (#452)
* feat: add basic explorer structure„

* feat: integrate new component/plugin

* feat: add basic explorer structure

* feat: add sort to FileNodes

* style: improve style for explorer

* refactor: remove unused explorer plugin

* refactor: clean explorer structure, fix base (toc)

* refactor: clean css, respect displayClass

* style: add styling to chevron

* refactor: clean up debug statements

* refactor: remove unused import

* fix: clicking folder icon sometimes turns invisible

* refactor: clean css

* feat(explorer): add config for title

* feat: add config for folder click behavior

* fix: `no-pointer` not being set for all elements

new approach, have one `no-pointer` class, that removes pointer events and one `clickable` class on the svg and button (everything that can normally be clicked). then, find all children with `clickable` and toggle `no-pointer`

* fix: bug where nested folders got incorrect height

this fixes the bug where nested folders weren't calculating their total height correctly. done by adding class to main container of all children and calculating total

* feat: introduce `folderDefaultState` config

* feat: store depth for explorer nodes

* feat: implement option for collapsed state + bug fixes

folderBehavior: "link" still has bad styling, but major bugs with pointers fixed (not clean yet, but working)

* fix: default folder icon rotation

* fix: hitbox problem with folder links, fix style

* fix: redirect url for nested folders

* fix: inconsistent behavior with 'collapseFolders' opt

* chore: add comments to `ExplorerNode`

* feat: save explorer state to local storage (not clean)

* feat: rework `getFolders()`, fix localstorage read + write

* feat: set folder state from localStorage

needs serious refactoring but functional (except folder icon orientation)

* fix: folder icon orientation after local storage

* feat: add config for `useSavedState`

* refactor: clean `explorer.inline.ts`

remove unused functions, comments, unused code, add types to EventHandler

* refactor: clean explorer

merge `isSvg` paths, remove console logs

* refactor: add documentation, remove unused funcs

* feat: rework folder collapse logic

use grids instead of jank scuffed solution with calculating total heights

* refactor: remove depth arg from insert

* feat: restore collapse functionality to clicks

allow folder icon + folder label to collapse folders again

* refactor: remove `pointer-event` jank

* feat: improve svg viewbox + remove unused props

* feat: use css selector to toggle icon

rework folder icon to work purely with css instead of JS manipulation

* refactor: remove unused cfg

* feat: move TOC to right sidebar

* refactor: clean css

* style: fix overflow + overflow margin

* fix: use `resolveRelative` to resolve file paths

* fix: `defaultFolderState` config option

* refactor: rename import, rename `folderLi` + ul

* fix: use `QuartzPluginData` type

* docs: add explorer documentation
2023-09-15 09:39:16 -07:00
91f9ae2d71 feat: implement file explorer component (closes #201) (#452)
* feat: add basic explorer structure„

* feat: integrate new component/plugin

* feat: add basic explorer structure

* feat: add sort to FileNodes

* style: improve style for explorer

* refactor: remove unused explorer plugin

* refactor: clean explorer structure, fix base (toc)

* refactor: clean css, respect displayClass

* style: add styling to chevron

* refactor: clean up debug statements

* refactor: remove unused import

* fix: clicking folder icon sometimes turns invisible

* refactor: clean css

* feat(explorer): add config for title

* feat: add config for folder click behavior

* fix: `no-pointer` not being set for all elements

new approach, have one `no-pointer` class, that removes pointer events and one `clickable` class on the svg and button (everything that can normally be clicked). then, find all children with `clickable` and toggle `no-pointer`

* fix: bug where nested folders got incorrect height

this fixes the bug where nested folders weren't calculating their total height correctly. done by adding class to main container of all children and calculating total

* feat: introduce `folderDefaultState` config

* feat: store depth for explorer nodes

* feat: implement option for collapsed state + bug fixes

folderBehavior: "link" still has bad styling, but major bugs with pointers fixed (not clean yet, but working)

* fix: default folder icon rotation

* fix: hitbox problem with folder links, fix style

* fix: redirect url for nested folders

* fix: inconsistent behavior with 'collapseFolders' opt

* chore: add comments to `ExplorerNode`

* feat: save explorer state to local storage (not clean)

* feat: rework `getFolders()`, fix localstorage read + write

* feat: set folder state from localStorage

needs serious refactoring but functional (except folder icon orientation)

* fix: folder icon orientation after local storage

* feat: add config for `useSavedState`

* refactor: clean `explorer.inline.ts`

remove unused functions, comments, unused code, add types to EventHandler

* refactor: clean explorer

merge `isSvg` paths, remove console logs

* refactor: add documentation, remove unused funcs

* feat: rework folder collapse logic

use grids instead of jank scuffed solution with calculating total heights

* refactor: remove depth arg from insert

* feat: restore collapse functionality to clicks

allow folder icon + folder label to collapse folders again

* refactor: remove `pointer-event` jank

* feat: improve svg viewbox + remove unused props

* feat: use css selector to toggle icon

rework folder icon to work purely with css instead of JS manipulation

* refactor: remove unused cfg

* feat: move TOC to right sidebar

* refactor: clean css

* style: fix overflow + overflow margin

* fix: use `resolveRelative` to resolve file paths

* fix: `defaultFolderState` config option

* refactor: rename import, rename `folderLi` + ul

* fix: use `QuartzPluginData` type

* docs: add explorer documentation
2023-09-15 09:39:16 -07:00
4b177ed03e feat: display tag in graph view (#466)
* feat: tags in graph view

* fix: revert changing graph forces

* fix: run prettier
2023-09-13 20:55:59 -07:00
14cbbdb8a2 feat: display tag in graph view (#466)
* feat: tags in graph view

* fix: revert changing graph forces

* fix: run prettier
2023-09-13 20:55:59 -07:00
0a6e9c3f86 feat: note transclusion (#475)
* basic transclude

* feat: note transclusion
2023-09-13 11:28:53 -07:00
cce389c81d feat: note transclusion (#475)
* basic transclude

* feat: note transclusion
2023-09-13 11:28:53 -07:00
4387044cc7 fix: 404 page styling for nested pages (closes #458) 2023-09-12 21:29:57 -07:00
60a3c54339 fix: 404 page styling for nested pages (closes #458) 2023-09-12 21:29:57 -07:00
425592d09a fix: links to index not showing in graph (closes #450) 2023-09-06 22:24:15 -07:00
2525bfbab5 fix: links to index not showing in graph (closes #450) 2023-09-06 22:24:15 -07:00
c9ddec07aa feat: 404 page emitter 2023-09-06 21:02:21 -07:00
8d6029b7b8 feat: 404 page emitter 2023-09-06 21:02:21 -07:00
50da33ea4d feat(search): add arrow key navigation (#442)
* feat(search): add arrow navigation

* chore: format

* refactor: simplify arrow navigation

* chore: remove comment

* feat: rework arrow navigation to work without state

* feat: make pressing enter work with arrow navigation

* fix: remove unused css class

* chore: correct comment

* refactor(search): use optional chaining
2023-09-03 09:32:46 -07:00
7e42be8e46 feat(search): add arrow key navigation (#442)
* feat(search): add arrow navigation

* chore: format

* refactor: simplify arrow navigation

* chore: remove comment

* feat: rework arrow navigation to work without state

* feat: make pressing enter work with arrow navigation

* fix: remove unused css class

* chore: correct comment

* refactor(search): use optional chaining
2023-09-03 09:32:46 -07:00
f257e2a948 fix: clipboard button visible in search (#445) 2023-09-03 09:06:05 -07:00
8c354f6261 fix: clipboard button visible in search (#445) 2023-09-03 09:06:05 -07:00
c7cd941e5f feat: pluralize things in lists 2023-09-02 18:07:26 -07:00
505673acd7 feat: pluralize things in lists 2023-09-02 18:07:26 -07:00
53dd86727b fix(search): matches getting highlighted in title (#440) 2023-09-01 14:12:32 -07:00
23f43045c4 fix(search): matches getting highlighted in title (#440) 2023-09-01 14:12:32 -07:00
fa0629716f feat: Implement search for tags (#436)
* Quartz sync: Aug 29, 2023, 10:17 PM

* style: add basic style to tags in search

* feat: add SearchType + tags to search preview

* feat: support multiple matches

* style(search): add style to matching tags

* feat(search): add content to preview for tag search

* fix: only display tags on tag search

* feat: support basic + tag search

* refactor: extract common `fillDocument`, format

* feat: add hotkey to search for tags

* chore: remove logs

* fix: dont render empty `<ul>` if tags not present

* fix(search-tag): make case insensitive

* refactor: clean `hideSearch` and `showSearch`

* feat: trim content similar to `description.ts`

* fix(search-tag): hotkey for windows

* perf: re-use main index for tag search
2023-09-01 10:09:58 -07:00
90dac31216 feat: Implement search for tags (#436)
* Quartz sync: Aug 29, 2023, 10:17 PM

* style: add basic style to tags in search

* feat: add SearchType + tags to search preview

* feat: support multiple matches

* style(search): add style to matching tags

* feat(search): add content to preview for tag search

* fix: only display tags on tag search

* feat: support basic + tag search

* refactor: extract common `fillDocument`, format

* feat: add hotkey to search for tags

* chore: remove logs

* fix: dont render empty `<ul>` if tags not present

* fix(search-tag): make case insensitive

* refactor: clean `hideSearch` and `showSearch`

* feat: trim content similar to `description.ts`

* fix(search-tag): hotkey for windows

* perf: re-use main index for tag search
2023-09-01 10:09:58 -07:00
e815256517 fix: correct graph labels for index.md nodes (#431) 2023-08-28 10:00:49 -07:00
c35cd422c6 fix: correct graph labels for index.md nodes (#431) 2023-08-28 10:00:49 -07:00
3233d5b08a Fix search bar after navigate (#424) 2023-08-26 17:19:45 -07:00