Skip to content

Commit 7d259f0

Browse files
Add views section, templates, bulk actions and more export features
1 parent ba3ca39 commit 7d259f0

File tree

2 files changed

+63
-22
lines changed

2 files changed

+63
-22
lines changed

db-version-changes.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ Miscelleanous changes:
6767

6868
* Using terms from the [previous tasks](https://docs.logseq.com/#/page/tasks), a task marker, priority and deadline are respectively now `Status`, `Priority` and `Deadline` properties on a task.
6969
* [Scheduled](https://docs.logseq.com/#/page/tasks/block/deadline%20and%20scheduled) has been deprecated.
70-
* Recurring tasks aren't ported and are a TODO.
7170
* Logbook timestamps have been deprecated.
7271
* Tasks are no longer created by typing keywords like `TODO` but instead with commands like '/todo'.
7372
* Read more about the [new tasks](./db-version.md#tasks).
@@ -111,6 +110,10 @@ Miscelleanous changes:
111110
* A graph's config.edn, custom.js and custom.css files are only editable within Logseq from `Settings`.
112111
* 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.
113112

113+
#### Search
114+
* When search modal first opens, recently updated pages display at the top.
115+
* Tags can be created from the modal as described in [new tags](./db-version.md#new-tags).
116+
114117
#### DB Graph Directories
115118

116119
* Graphs have a convention of `~/logseq/graphs/GRAPH-NAME` where `GRAPH-NAME` is the graph name.

db-version.md

Lines changed: 59 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,11 @@ NOTE: While there is an [automated backup](#automated-backup) for DB graphs, we
1515
* [Queries](#queries)
1616
* [Cards](#cards)
1717
* [Assets](#assets)
18+
* [Templates](#templates)
1819
* [More New Tags](#more-new-tags)
19-
* [Tables](#tables)
20+
* [Bulk Actions](#bulk-actions)
21+
* [Views](#views)
22+
* [Tables](#tables)
2023
* [DB Graph Importer](#db-graph-importer)
2124
* [Automated Backup](#automated-backup)
2225
* [Export and Import](#export-and-import)
@@ -259,7 +262,7 @@ A [(simple) query](https://docs.logseq.com/#/page/queries) and [advanced query](
259262
* Type a simple query in a block and then type the `/Query` command to run the query.
260263
* Type the `/Advanced Query` command to create an advanced query.
261264

262-
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).
265+
Like other new tags, go to the `#Query` page to see a table to manage queries. Query results are displayed in a [view](#views).
263266

264267
### Cards
265268

@@ -282,6 +285,12 @@ You can rate them using 4 levels to arrange their next review date.
282285

283286
An asset has the new tag `#Asset`. Assets are created by dragging and dropping a file onto a block. They can also be batch uploaded by going to the `#Asset` page and clicking the `+` icon from the `Tagged Nodes` table. Asset files are stored under a graph's `assets/` directory. Manage assets from the `#Asset` page's `Tagged Nodes` section. The `Gallery View` is a helpful way to view assets.
284287

288+
### Template
289+
290+
A template has the new tag `#Template`. A template allows for block(s) and their children to be easily copied. To create a template, write the name of the template in a new block and tag the block with `#Template`. Then add children blocks (however many levels deep) under the template block. To insert a copy of a template, use the `/Template` command.
291+
292+
When creating a template block, there is an optional `Apply template to tags` property to use. This property provides interesting automation whenever a [tagged node](#tagged-node) is created for a configured tag. For example, create a template and configure the property to apply to `#Journal`. Now whenever a journal page is created, the template gets applied at the top of the page. If a tag is configured with multiple templates, the templates are applied in succession. When a tagged node is a block instead of a page e.g. `#Task`, the template is applied as the first child of the block. Templates can apply to built-in and user tags.
293+
285294
### More New Tags
286295

287296
Here are more new tags that are built-in, most of which are created with `/` commands:
@@ -292,28 +301,53 @@ Here are more new tags that are built-in, most of which are created with `/` com
292301

293302
Like other tags, go to their tag pages to view and manage all of them in one place. Also like other tags, extend any tag by adding more properties to it. For example, add an author property to `#Quote` to optionally add authors to quotes.
294303

295-
## Tables
304+
## Bulk Actions
305+
306+
Bulk actions are a powerful way to make changes across nodes. When multiple nodes are selected, bulk actions can be taken on them. To select nodes in a block context, use a mouse or the shift + arrow keys. Once nodes are selected, a bulk action header appears above the blocks. The bulk action header can be closed with `Esc`. The following bulk actions are available in the header:
307+
* `Tag`: Click on `#` icon to add/update/remove [new tags](#new-tags) for selected nodes.
308+
* `Copy`: Copy the block or page title of selected nodes.
309+
* `Set Property`: Add or update a [property](#properties) for selected nodes.
310+
* `Unset Property`: Remove a [property](#properties) for selected nodes.
311+
* `Delete`: Click on the trash icon to delete selected nodes.
312+
* `Three dots menu`: Click on the three dots icon to invoke additional actions to apply to selected nodes. These actions mostly consist of ones that are available when right clicking on a block.
313+
314+
Nodes can also be selected and have bulk actions in [tables](#tables).
315+
316+
## Views
317+
318+
Views are a powerful way to visualize a group of nodes in different ways. A view can switch between the following view types: `Table View`, `List View` or `Gallery View`. Most views default to the [Table View](#tables). The `List View` displays nodes in an outliner with nodes grouped by pages. The `Gallery View` is useful for viewing blocks as square tiles, especially for assets.
319+
320+
Views are used in a number of features including queries, (un)linked references, property and tag pages and `All pages`. For all these features except queries, multiple views can be created. Regardless of which view type you're in, a view's header has these common actions from left to right:
321+
322+
* `View name`: A view's name is editable by clicking on it and renaming it. A view can also be deleted from here.
323+
* `New view`: Click on `+` to create a new view. Since a view is fairly customizable, this is useful for creating different views on the same nodes and to view a specific subgroup of nodes with filters.
324+
* `Filter`: Filter nodes by any properties/columns by clicking on the filter icon.
325+
* Multiple filters can be created and applied.
326+
* By default, only rows that match all filters display (AND the filters). To match on any filter (OR filters), change the dropdown on the right to `Match any filter`.
327+
* There are different operators to filter values for every property value type e.g. `Date` and `DateTime`. For example, string values can have `is` or `is not` operators while numbers can also have `<, >, <=, >= and between` operators.
328+
* `Search`: Live search a view by clicking on the magnifying glass icon. This is the only feature that doesn't persist when switching away from a view.
329+
* `View type`: Click on the view type name to switch between different types.
330+
* `Three dots menu`: Click on the three dots menu to invoke additional actions. Some actions are specific to a view type. The following actions are common across view types:
331+
* `Group by`: Group by a column/property and its values i.e. a different group for each property value. The different groups are vertically stacked.
332+
* Nodes can be grouped by all property types except for `DateTime`.
333+
* While each group is displayed as a different view, they all obey the same view-level configuration.
334+
* `Export EDN`: Exports the currently viewable nodes to your clipboard as [EDN Data](#edn-data-export). The exported nodes are affected by `Search` or `Filter` usage.
335+
* `New node`: Click on the `+` icon to create a new node in the view. Different features will behave differently for this. For example, when clicked from a tag or property page, the new node will have that tag or property added to it.
336+
337+
NOTE: All actions that alter what you see are saved except for `Search`!
338+
339+
### Tables
296340

297341
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:
298-
* Sort rows by multiples columns, sorting each by ascending or descending. Click on the sort icon to remove a sorting.
299-
* Filter rows by multiple columns by clicking on the filter icon.
300-
* Multiple filters can be applied. By default, only rows that match all filters display (AND the filters). To match on any filter (OR filters), change the dropdown on the right to `Match any filter`.
301-
* For columns with a specific property type e.g. :number and :date, there are specific filters for that type.
302-
* Group rows by a column by clicking on the three dots menu and selecting `Group by`.
303-
* Rows can be grouped by all property types except `DateTime`.
304-
* While each group is displayed as a different table, they all obey the same column configurations.
305-
* Switch between `Table View`, `List View` or `Gallery View` by selecting one in the table's header. The `List View` displays nodes in an outliner with nodes grouped by pages. The `Gallery View` is useful for viewing blocks as square tiles, especially for assets.
306-
* 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.
307-
* Click `+ New` at the bottom of a table to create a new block. If in a property or tags table, the newly created block will be associated with the respective property or tag.
308-
* Columns can be configured in a number of ways:
309-
* Hide columns by clicking on the three dots menu and selecting `Columns visibility`.
342+
343+
* `Sort`: Click on a column to sort it by ascending or descending. Multiples sorts can be applied. Click on the sort icon in the header to remove a sort.
344+
* `Columns visibility`: Under the three dots menu, this menu can toggle the visibility of any column.
345+
* `+ New`: At the bottom of the table, this creates a new node, like the `+` icon in the view header.
346+
* Column actions:
347+
* Click on column(s) and select `Pin` to ensure they appear first.
310348
* Drag columns to sort their order.
311-
* Pin column(s) to ensure they appear first.
312349
* Resize columns by dragging the resize handle at a column header's border.
313-
314-
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!
315-
316-
Tables are currently found on new tag pages, property pages, query results and the `All Pages` view.
350+
* Bulk actions: When rows in the table are selected, bulk actions appear in the table header. All the bulk actions [described above](#bulk-actions) are available except for the `Three dots menu`.
317351

318352
## DB Graph Importer
319353

@@ -368,7 +402,8 @@ To export a DB graph, click on the three dots menu in the upper right corner, se
368402
1. `Export SQLite DB` - Export graph as a [SQLite](https://sqlite.org/) .db file.
369403
2. `Export both SQLite DB and assets` - Export graph as a .zip file containing the DB file and the graph's assets.
370404
3. `Export debug transit file` - Export graph as a transit file to be shared with the Logseq team for debugging. Any personal sensitive data is removed.
371-
4. `Export public pages` - Export graph in order to publish it on the web. See https://docs.logseq.com/#/page/publishing for more.
405+
4. `Export EDN file` - Export graph as EDN described in [EDN Data Export](#edn-data-export).
406+
5. `Export public pages` - Export graph in order to publish it on the web. See https://docs.logseq.com/#/page/publishing for more.
372407

373408
To import a DB graph, click on the three dots menu in the upper right corner, selecting `Export graph` and then choose one of the following options:
374409

@@ -377,6 +412,7 @@ To import the exported .sqlite file, click on the three dots menu in the upper r
377412
1. `SQLite` - Import using the SQLite DB file from export.
378413
2. `File to DB graph` - Import a markdown graph. See the [db graph importer](#db-graph-importer) for more on it.
379414
3. `Debug Transit` - Import a debug transit file from export.
415+
4. `EDN to DB graph` - Import a DB graph that was exported as EDN into a new DB graph.
380416

381417
### EDN Data Export
382418

@@ -387,6 +423,8 @@ Exported EDN data allows any DB graph content to be shared between users as text
387423
* `Export graph's tags and properties EDN data` - Run this command to copy the entire graph's tags and properties. This is useful for sharing your workflows with others without sharing your graph-specific data. This is an example of a workflow that was not possible with file graphs.
388424
* `Import EDN data` - Run this command to import any of the above exported data. If importing a block, you must have focus on the block you want to import into.
389425

426+
This feature is also available for the whole graph using the `Export EDN file` and `EDN to DB graph` options described above.
427+
390428
For developers, this shareable EDN data can also be used in scripts to create or modify existing graphs. For example, a page's data could be passed to [this script](https://github.com/logseq/logseq/blob/feat/db/deps/db/script/create_graph.cljs) to create a new DB graph with that page.
391429

392430

0 commit comments

Comments
 (0)