Skip to content

Commit

Permalink
Doc tables, queries, backup, nlp calendar
Browse files Browse the repository at this point in the history
and more changes
  • Loading branch information
logseq-cldwalker committed Sep 17, 2024
1 parent 2638ef6 commit 3646a01
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 8 deletions.
18 changes: 12 additions & 6 deletions db-version-changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,22 @@ High level changes:
* Previous tags should behave like before that an inline tag is entered using `Cmd-Enter`.
* NOTE: Pressing enter on a `#` input triggers a powerful [new tags](./db-version.md#new-tags) feature.
* All blocks and pages have created-at and updated-at timestamps! With this built-in dimension of time, time powered features are possible.
* The [previous tables](https://docs.logseq.com/#/page/tables) including version 2 are replaced by a shadcn based table. The new tables have inline editing like spreadsheets by default. Currently these tables are seen on pages of properties, new tags and the `All pages` page.
* The [previous tables](https://docs.logseq.com/#/page/tables) including version 2 are replaced by a shadcn based table. The new tables have inline editing like spreadsheets by default. See [here](./db-version.md#tables) for more.
* Markdown is the only supported format. Org mode file graphs will be able to convert to DB graphs.
* Zotero integration isn't planned to be a built-in feature and will hopefully moved to a plugin.
* Zotero integration isn't planned to be a built-in feature and will hopefully be moved to a plugin.

WIP changes:
* Queries are to be updated to use the new tables and have more powerful filters.
* Advanced queries are to be updated to use the new tables and `#Query`. Query filters are likely to be changed.
* Whiteboards are disabled for now and will be enabled later.
* Flashcards are disabled for now and will be enabled later.
* Exports only partially work.

Miscelleanous changes:
* Embedded pages and blocks look almost the same as other nodes. The main indicator of an embed will be an icon to the left of the block.
* Default date picker now has an input for typing a date in natural language.
* There is no re-index like in file graphs.
* For browsers, currently only one tab can be open. This is a limitation we hope to remove later.
* `All Pages` view can toggle between table and list view.

### Changes by Feature

Expand All @@ -56,24 +59,27 @@ Miscelleanous changes:
* Since block timestamps are available, they display in table view where possible.
* Some old advanced queries will no longer work and need to be rewritten. For engineers, see [this file](https://github.com/logseq/logseq/blob/feat/db/deps/db/src/logseq/db/frontend/schema.cljs) and compare `schema` with `schema-for-db-based-graph` to see what has changed.
* Some old simple queries for tasks will no longer work and must be manually converted e.g. `(priority A)` -> `(priority high)`.
* The `sort-by` query filter no longer exists. Sorting is done via the table component.
* When using the query builder, the resulting query's text is not meant to be easily read as internal ids are used for some concepts e.g. properties.

#### Namespaces
* There is partial support for namespaces but it's still a TODO to port over popular workflows.
* Pages can have hierarchy by using the `Parent` property. For example, create a page `block`. Add a `Parent` property page and create a page called `term` in it. There is now a `term > block` hierarchy.
* A namespace page like `term` above has its children pages listed on its page under the `Children` section.
* Children pages like `block` above link back to its namespace with the `Parent` property.

#### Config.edn
#### User Config

* The following config options are no longer used: `:block-hidden-properties, :favorites, :hidden, :ignored-page-references-keywords, :preferred-format, :preferred-workflow, :feature/enable-block-timestamps?, :file/name-format, :org-mode/insert-file-link?, :property/separated-by-commas, :property-pages/enabled?, :property-pages/excludelist`. See [this code](https://github.com/logseq/logseq/blob/043927031e11053a837d8289e3334368e6647bea/src/main/frontend/handler/common/config_edn.cljs#L89-L115) for more details.
* A graph's config.edn, custom.js and custom.css files are only editable within Logseq from `Settings`.
* The following config.edn options are no longer used: `:block-hidden-properties, :favorites, :hidden, :ignored-page-references-keywords, :preferred-format, :preferred-workflow, :feature/enable-block-timestamps?, :file/name-format, :org-mode/insert-file-link?, :property/separated-by-commas, :property-pages/enabled?, :property-pages/excludelist`. See [this code](https://github.com/logseq/logseq/blob/043927031e11053a837d8289e3334368e6647bea/src/main/frontend/handler/common/config_edn.cljs#L89-L115) for more details.

#### DB Graph Directories

* Graphs have a convention of `~/logseq/graphs/GRAPH-NAME` where `GRAPH-NAME` is the graph name.
* Inside a graph directory:
* `db.sqlite` - Stores all your graph's data including user configs.
* `assets/` - Stores assets like before
* `logseq/` no longer exists
* `logseq/` inside a directory no longer exists.
* It's still a TODO to sync markdown files to these graph directories.

## File Graph Changes
Expand Down
34 changes: 32 additions & 2 deletions db-version.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
## Description

This page describes DB (database) graph functionality as of Sep 11th. If you're an existing user of Logseq, you'll be interested in [changes with the db version](./db-version-changes.md).
This page describes DB (database) graph functionality as of Sep 17th. If you're an existing user of Logseq, you'll be interested in [changes with the db version](./db-version-changes.md).

NOTE: There is currently no automated graph backup for the DB version. Recommend only using this for testing purposes.
NOTE: While there is an [automated backup](#automated-backup) for DB graphs, we recommend only using this for testing purposes.

## Overview

Expand All @@ -11,7 +11,10 @@ NOTE: There is currently no automated graph backup for the DB version. Recommend
* [New Tags](#new-tags)
* [Tasks](#tasks)
* [Journals](#journals)
* [Queries](#queries)
* [Tables](#tables)
* [DB Graph Importer](#db-graph-importer)
* [Automated Backup](#automated-backup)

## Nodes

Expand Down Expand Up @@ -188,6 +191,29 @@ Since tasks are powered by properties and [new tags](#new-tags), they can be cus

A journal page has the [new tag](#new-tags) `#Journal`. Like tasks, journals can be customized by adding properties to its tag. For example, navigate to the `#Journal` page and add a property. This property now shows up on all journals!

Journals are automatically created for the current day in the Journals view. There are a couple of ways to create a journal:
* Use the `/Date picker` command to insert a specific date. The date picker is keyboard friendly as arrow keys change calendar days and `Tab` focuses the input. The input takes natural language e.g. `next week` and converts it to a date. See [the library we use](https://github.com/wanasit/chrono#readme) for other natural language examples.
* Properties with the :date property type e.g. `Deadline` create journals for their property values.
* When on a journal day, create a journal for the next day or previous day by using the keybindings `g n` or `g p` respectively.

## Queries

A [query](https://docs.logseq.com/#/page/queries) has the [new tag](#new-tags) `#Query`. Queries are created by using the `/Query` command. Like other new tags, go to the `#Query` page to see a table to manage queries. Query results are displayed with the new [tables](#tables).

## Tables

A table displays a group of nodes as rows and a node's properties as columns. A table behaves like a spreadsheet as table cells are editable by default. A node has the following special columns which are available by default: `Name`, `Created At` and `Updated At`. Tables have the following features:
* Sort rows by any column, ascending or descending.
* Filter rows by multiple columns by clicking on the filter icon. For columns with a specific property type e.g. :number and :date, there are specific filters for that type.
* Hide columns by clicking on the three dots menu and selecting `Columns visibility`.
* Drag columns to sort their order.
* Switch between `Table View` and `List View` by selecting one in the table's header. The `List View` displays nodes in an outliner with nodes grouped by pages.
* Click on the magnifying glass icon to live search a table. This is the only feature that doesn't persist when switching away from a table.

A powerful new feature of tables is the ability to create a table view. This is currently enabled for tag pages. To use it, click the `+` icon in the upper left to create a new tab in the table. Click on the tab's header to rename or delete this new view. Within this view, all of the above persisting features will save!

Tables are currently found on new tag pages, property pages, query results and the `All Pages` view.

## DB Graph Importer

The DB Graph Importer converts a file graph to a DB graph. Currently it imports markdown files and assets like images. Import of org mode files will be added later. For blocks the importer converts all uses of [new tags](#new-tags) to [page references](https://docs.logseq.com/#/page/term%2Fpage%20reference) because ~~tags are now used for new tag features while page references handle inline referencing functionality~~ this behavior is still WIP. For pages the importer imports the previous tags to a `pageTags` property. If you'd like some previous tags to behave like new tags, you can specify them in the first optional input. Using this option also results in those converted tags not being imported as `pageTags`. The importer also provides two options to convert property related pages to new tags.
Expand All @@ -208,3 +234,7 @@ All tasks are imported as new [tasks](#tasks). Some task statuses have been rema
1. `Tags to import ...` - This input converts any of your old tags to the [new tags](#new-tags). This is helpful if you've been using a particular tag like a new tag. You can also convert pages later by right clicking on a page's name.
2. `Properties whose values are imported as new tags` - This input converts property values for the specified property to the new tags. For example, in the official docs graph the [type property](https://docs.logseq.com/#/page/type) is used this way. This means that all `type` property values like [Feature](https://docs.logseq.com/#/page/feature) on [this page](https://docs.logseq.com/#/page/code%20block) would get converted to the new tag.
3. `Properties whose values are imported as parents of ...` - This input converts property values for the specified property to be [a parent of a new tag](#parent-tags). For example, in the official docs graph the [parent property](https://docs.logseq.com/#/page/parent) is used this way. This means that all `parent` property values like [Thing](https://docs.logseq.com/#/page/thing) on [this page](https://docs.logseq.com/#/page/feature) would get converted to the new tag.

## Automated Backup

An automated backup of graphs is available by clicking on the upper right three dots menu and selecting `Export Graph`. Within this modal, you can specify a folder to save backups. A backup folder can be reused across graphs as each graph gets its own folder within a backup folder. After choosing this folder, hourly backups begin. The last 12 backups are saved. This backup feature is currently only for the browser.

0 comments on commit 3646a01

Please sign in to comment.