Skip to content
This repository was archived by the owner on Jul 28, 2025. It is now read-only.

Commit a4860c3

Browse files
committed
merging
2 parents 49e51bb + 0ef0fa6 commit a4860c3

File tree

62 files changed

+741
-98
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+741
-98
lines changed

.github/ISSUE_TEMPLATE/BUG_FORM_REPORT.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,17 @@ body:
5050
label: Relevant log output
5151
description: Please copy and paste any relevant log output of Obsidian. (MacOS - cmd+opt+I. Linux/Windows - ctrl+shift+I)
5252
render: shell
53+
- type: checkboxes
54+
id: version-checkbox
55+
attributes:
56+
label: Are you using the latest version of the plugin in your Obsidian vault?
57+
options:
58+
- label: I have verified that I am on the latest version
59+
required: true
60+
- type: checkboxes
61+
id: issues-duplicates-checkbox
62+
attributes:
63+
label: Are you check if there is a similar issue?
64+
options:
65+
- label: I have verified that there are not similar issues
66+
required: true

docs/docs/changelog.md

Lines changed: 33 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
1-
# 2.5.1
1+
## 2.5.3
2+
### No longer broken
3+
- Sorting for created and modified dates working with new table version [ISSUE#368](https://github.com/RafaelGB/obsidian-db-folder/issues/368)
4+
- Destination folder for query sources fixed [ISSUE#367](https://github.com/RafaelGB/obsidian-db-folder/issues/367)
5+
## 2.5.2
6+
### No longer broken
7+
- hotfix about new rows and import csv rows. Link.file object of dataview just works if the Link is loaded first
8+
- improving coexistence with old yamls
9+
## 2.5.1
10+
### No longer broken
211
- hotfix of persist saving introduced in 2.5.0 with the change of config centinel
3-
# 2.5.0
12+
## 2.5.0
413
*Published on 2022/09/11*
514
### Shiny new things
615
- Added support for mobile devices (iOS and Android) and tablets (iPad and Android tablets) [ISSUE#27](https://github.com/RafaelGB/obsidian-db-folder/issues/27)
@@ -15,13 +24,13 @@
1524
- onBlur did not work well on empty text cells [ISSUE#352](https://github.com/RafaelGB/obsidian-db-folder/issues/352)
1625
- DnD conflicts with resize fixed [ISSUE#349](https://github.com/RafaelGB/obsidian-db-folder/issues/349)
1726
- Dark mode for principal and filters menu [ISSUE#350](https://github.com/RafaelGB/obsidian-db-folder/issues/350)
18-
# 2.4.1
27+
## 2.4.1
1928
*Published on 2022/09/09*
2029
### Visual
2130
- Search now indicate the number of avaliable rows always, not just like placeholder [ISSUE#130](https://github.com/RafaelGB/obsidian-db-folder/issues/130)
2231
### No longer broken
2332
- FINALLY, DnD columns is enabled by default and the developer config about it was removed. It does not break Obsidian DnD anymore [ISSUE#239](https://github.com/RafaelGB/obsidian-db-folder/issues/239)
24-
# 2.4.0
33+
## 2.4.0
2534
*Published on 2022/09/08*
2635
### Shiny new things
2736
- Totally renewed row context menu! Now wraps the obsidian context menu, so you can use all the plugins that add items to it(rename and delete file included as custom options too) [ISSUE#152](https://github.com/RafaelGB/obsidian-db-folder/issues/152)
@@ -36,35 +45,35 @@
3645
### No longer broken
3746
- new yaml breaker conditions added (>)
3847
- Edit a cell in a page out of the first one does not reset the pagination anymore [ISSUE#338](https://github.com/RafaelGB/obsidian-db-folder/issues/338)
39-
# 2.3.6
48+
## 2.3.6
4049
*Published on 2022/09/07*
4150
### Improved
4251
- The tab title bar with Obsidian 0.16 is optional, so the settings of the ddbb where moved to the bar of the plugin itself [ISSUE#330](https://github.com/RafaelGB/obsidian-db-folder/issues/330)
4352
### No longer broken
4453
- render of checkbox fixed [ISSUE#334](https://github.com/RafaelGB/obsidian-db-folder/issues/334)
4554
- order of multisort is persisted [ISSUE#324](https://github.com/RafaelGB/obsidian-db-folder/issues/324)
46-
# 2.3.5
55+
## 2.3.5
4756
*Published on 2022/09/05*
4857
### Shiny new things
4958
- New command & ribbon icon to generate a new database with a helpful wizard to guide you through the process [ISSUE#126](https://github.com/RafaelGB/obsidian-db-folder/issues/126)
5059
### No longer broken
5160
- Problem with saving query on yaml solved [ISSUE#325](https://github.com/RafaelGB/obsidian-db-folder/issues/325)
52-
# 2.3.4
61+
## 2.3.4
5362
*Published on 2022/09/04*
5463
### Improved
5564
- If you choose a source different of current folder, now you can select the destination of your new notes [ISSUE#318](https://github.com/RafaelGB/obsidian-db-folder/issues/318)
5665
### No longer broken
5766
- Hotfix of add a filter [ISSUE#322](https://github.com/RafaelGB/obsidian-db-folder/issues/322)
5867
- Hotfix od delete a row in some cases [ISSUE#319](https://github.com/RafaelGB/obsidian-db-folder/issues/319)
59-
# 2.3.3
68+
## 2.3.3
6069
*Published on 2022/09/02*
6170
### Shiny new things
6271
- New filter options: 'is not empty' and 'is empty' with visual improvements of auto resize [ISSUE#151](https://github.com/RafaelGB/obsidian-db-folder/issues/151)
6372
### No longer broken
6473
- Iterate between databases do not provoke blank screen anymore [ISSUE#309](https://github.com/RafaelGB/obsidian-db-folder/issues/309)
6574
- Refresh of table after change option color and rename column if is sorted [ISSUE#305](https://github.com/RafaelGB/obsidian-db-folder/issues/305)
6675
- Multi-sort respect priority now [ISSUE#299](https://github.com/RafaelGB/obsidian-db-folder/issues/299)
67-
# 2.3.2
76+
## 2.3.2
6877
*Published on 2022/09/01*
6978
### Shiny new things
7079
- Inline fields with bold ,italics or underline key is edditable now. Also you can edit those inline fields wrapped with pharentesis in the middle of a line, respecting dataview readability [ISSUE#134](https://github.com/RafaelGB/obsidian-db-folder/issues/134)
@@ -76,12 +85,12 @@
7685
### No longer broken
7786
- Enable frontmatter quotes wrapping does not break config that already has quotes [ISSUE#286](https://github.com/RafaelGB/obsidian-db-folder/issues/286)
7887
- Problem refreshing column info after modifying the label solved [ISSUE#300](https://github.com/RafaelGB/obsidian-db-folder/issues/300)
79-
# 2.3.1
88+
## 2.3.1
8089
### No longer broken
8190
- new row hide last row [ISSUE#295](https://github.com/RafaelGB/obsidian-db-folder/issues/295)
8291
- new row hide dbsettings using sliding panes [ISSUE#296](https://github.com/RafaelGB/obsidian-db-folder/issues/296)
8392
- Pagination legend supports dark mode[ISSUE#291](https://github.com/RafaelGB/obsidian-db-folder/issues/291)
84-
# 2.3.0
93+
## 2.3.0
8594
### Shiny new things
8695
- Pagination arrived! Now you can organize your ddbb in pages, and you can choose the number of items per page in the settings panel. This also affects to the performance, so theoretically you can have a ddbb with more than 10000 items. [ISSUE#116](https://github.com/RafaelGB/obsidian-db-folder/issues/116)
8796
- Autocomplete for links and tags in the editor of text column cells. Its an adaption of [Kanban plugin](https://github.com/mgmeyers/obsidian-kanban) feature, so it will be familiar to you. [ISSUE#107](https://github.com/RafaelGB/obsidian-db-folder/issues/107)
@@ -91,7 +100,7 @@
91100
- Function of obtain all fields now respect uppercase [ISSUE#269](https://github.com/RafaelGB/obsidian-db-folder/issues/269)
92101
- New rows title are now trimmed to ensure the functionality [ISSUE#279](https://github.com/RafaelGB/obsidian-db-folder/issues/279)
93102
- Now you can hide/unhide metadata columns too [ISSUE#283](https://github.com/RafaelGB/obsidian-db-folder/issues/283)
94-
# 2.2.2
103+
## 2.2.2
95104
### Shiny new things
96105
- First steps of a row context menu. You can now remove a row from a table (and also Obsidian). [ISSUE#62](https://github.com/RafaelGB/obsidian-db-folder/issues/62)
97106
### Improved
@@ -104,7 +113,7 @@
104113
- Select group folder path fixed
105114
- Date Datetime empty did not open correctly fixed [ISSUE#273](https://github.com/RafaelGB/obsidian-db-folder/issues/273)
106115
- Label column now admits numbers only [ISSUE#274](https://github.com/RafaelGB/obsidian-db-folder/issues/274)
107-
# 2.2.1
116+
## 2.2.1
108117
### Visual
109118
- Opacity of new row form with sticky first column option [ISSUE#251](https://github.com/RafaelGB/obsidian-db-folder/issues/251)
110119
### No longer broken
@@ -113,7 +122,7 @@
113122
- Global menu is avaliable again
114123
### Developers
115124
- Added an option to use DnD columns again with a toggle button. We are working on a better solution but while we are at it, at least this option is available
116-
# 2.2.0
125+
## 2.2.0
117126
### Shiny new things
118127
- Refactor of filters. With the new architecture of events (Zustand), it is now possible to use filters in a dynamic way, so they were moved to the navbar menu and the changes doe not need to refresh the page. [ISSUE#73](https://github.com/RafaelGB/obsidian-db-folder/issues/73)
119128
- Button of enable/disable filters could be use as refresh button [ISSUE#163](https://github.com/RafaelGB/obsidian-db-folder/issues/163)
@@ -123,11 +132,11 @@
123132
- Tags could be sorted and filtered with the global search now [ISSUE#260](https://github.com/RafaelGB/obsidian-db-folder/issues/260)
124133
### No longer broken
125134
- Minor bugs with global search. Now is case sensitive and sanitized
126-
# 2.1.2
135+
## 2.1.2
127136
### No longer broken
128137
- drap/drop incompatibility with Obsidian was fixed [ISSUE#239](https://github.com/RafaelGB/obsidian-db-folder/issues/239)
129138
- Split pane options was recovered [ISSUE#257](https://github.com/RafaelGB/obsidian-db-folder/issues/257)
130-
# 2.1.1 (beta)
139+
## 2.1.1 (beta)
131140
### Improved
132141
- Resizing of columns performed better. [ISSUE#241](https://github.com/RafaelGB/obsidian-db-folder/issues/241)
133142
### No longer broken
@@ -137,18 +146,18 @@
137146
- New rows accepts editions with zustand [ISSUE#254](https://github.com/RafaelGB/obsidian-db-folder/issues/254)
138147
- Minor bug updating with zustand [ISSUE#245](https://github.com/RafaelGB/obsidian-db-folder/issues/245)
139148
- new columns respect order[ISSUE#240](https://github.com/RafaelGB/obsidian-db-folder/issues/240)
140-
# 2.1.0 (beta)
149+
## 2.1.0 (beta)
141150
### Shiny new things
142151
- The dispatcher of all events was migrated to Zustand! This means a better, more stable, and more efficient way to handle events. [Zustand](https://zustand.js.org/) is a library that provides a simple, efficient, and powerful way to manage state in React. Allowing future changes as formula columns. As PoC, this version update the value of `modified` column every time a cell is changed. [ISSUE#227](https://github.com/RafaelGB/obsidian-db-folder/issues/227)
143152
### No longer broken
144153
- qoutes inside of source query are now controlled [ISSUE#233](https://github.com/RafaelGB/obsidian-db-folder/issues/233) [jcdeichmann](https://github.com/jcdeichmann)
145154
- Fix centered images of all notes [ISSUE#231](https://github.com/RafaelGB/obsidian-db-folder/issues/231)
146155
- Fix LaTeX formulas presentation incompatibility [ISSUE#228](https://github.com/RafaelGB/obsidian-db-folder/issues/228)
147156
- now is compatible with windows pane using `activeDocument`[ISSUE#199](https://github.com/RafaelGB/obsidian-db-folder/issues/199)
148-
# 2.0.1
157+
## 2.0.1
149158
### No longer broken
150159
- Fixed selection problem with datetime columns introduced in 2.0.0.
151-
# 2.0.0
160+
## 2.0.0
152161
### Shiny new things
153162
- New style for navBar & "new row" button [ISSUE#206](https://github.com/RafaelGB/obsidian-db-folder/issues/206). Now the name of your ddbb is displayed in the navBar. To change it, just edit it into the settings.
154163
### Improved
@@ -160,15 +169,15 @@
160169
- Empty calendar cells will not show placeholder message. Just when are selected. [ISSUE#159](https://github.com/RafaelGB/obsidian-db-folder/issues/159)
161170
### No longer broken
162171
- Controling the duplicated columns using the file template option to create them. [ISSUE#224](https://github.com/RafaelGB/obsidian-db-folder/issues/224)
163-
# 2.0.0-beta.4
172+
## 2.0.0-beta.4
164173
### Improved
165174
- Resizing do not move the column. It has its own slider
166175
- The plugin shows a message when the edition fails including the error message. Common causes were added to the documentation [ISSUE#196](https://github.com/RafaelGB/obsidian-db-folder/issues/196)
167176
### No longer broken
168177
- do not lose the width property when a column is renamed [ISSUE#222](https://github.com/RafaelGB/obsidian-db-folder/issues/222)
169178
- Edit inline fields are correctly saved [ISSUE#182](https://github.com/RafaelGB/obsidian-db-folder/issues/182)
170179
- Where you add/delete new columns, there was ocasions where column order was not updated and provoked unselected columns [ISSUE#102](https://github.com/RafaelGB/obsidian-db-folder/issues/102)
171-
# 2.0.0-beta.3
180+
## 2.0.0-beta.3
172181
### Improved
173182
- Delay of DnD improvements in the UI [ISSUE#214](https://github.com/RafaelGB/obsidian-db-folder/issues/214)
174183
- Resizing of column is smoother [ISSUE#210](https://github.com/RafaelGB/obsidian-db-folder/issues/210)
@@ -178,13 +187,13 @@
178187
### No longer broken
179188
- Control duplicates on tags and select columns [ISSUE#209](https://github.com/RafaelGB/obsidian-db-folder/issues/209)
180189
- Sorting works with empty cells using a custom comparator (react-table not support it yet) [ISSUE#212](https://github.com/RafaelGB/obsidian-db-folder/issues/212)
181-
# 2.0.0-beta.2
190+
## 2.0.0-beta.2
182191
### Improved
183192
- unwanted columns when populating based on all fields removed. Also the memory consumption of the table is reduced significantly [ISSUE#176](https://github.com/RafaelGB/obsidian-db-folder/issues/176)
184193
### No longer broken
185194
- empty cells can be selected again
186195
- Now table config wraps the value with quotes [ISSUE#207](https://github.com/RafaelGB/obsidian-db-folder/issues/207)
187-
# 2.0.0-beta.1
196+
## 2.0.0-beta.1
188197
### Shiny new things
189198
- new option of resizing a column. The Size is persisted. [ISSUE#50](https://github.com/RafaelGB/obsidian-db-folder/issues/50)
190199
- Performance improvements of rendering components x5 [ISSUE#189](https://github.com/RafaelGB/obsidian-db-folder/issues/189)
@@ -197,7 +206,7 @@
197206
- Material-ui migrated from Material-UI to MUI ( compatibility with React 18.x )
198207
- Refactor of all components to be adapted to React 18.x
199208
- Size of plugin from 16mb to 5mb
200-
# 1.8.2
209+
## 1.8.2
201210
### No longer broken
202211
- Hotfix of critical mapping bug [ISSUE#190](https://github.com/RafaelGB/obsidian-db-folder/issues/190)
203212
## 1.8.1

docs/docs/features/Formulas.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
## Formulas on dbfolder
2+
You can use formulas to create dynamic values in your database.
3+
The formula is a javascript code that will be executed when the row is loaded.
4+
5+
## How to use
6+
The code can be written in the column settings or in the note's metadata.
7+
8+
### Exposed variables
9+
- `row` : the row object
10+
- `db` : the database object with predefined functions that can be used in the formula
11+
- `config` : the table's config information
12+
13+
To use an exposed variable, use the `${}` syntax. For example, to get the value of the `Name` column, you can use `${row.Name}`.
14+
15+
### Exposed functions
16+
The root object `db` has the following functions:
17+
- `js` : execute a javascript function that you previously defined in the `js` folder of your table. (I.E.: `db.js.myFunction( arg1, arg2)`)
18+

docs/docs/features/Properties.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
- **Time**: this property accepts time with the format `YYYY-MM-DD hh:mm AM/PM` ;
88
- **Select**: this property accepts from a list of options you define. Colors are attributed automatically, though you can change them in the column setting. Furthermore, when removing the select option in the setting, it is also removed from the note's metadata ;
99
- **Tags**: similar to the previous property, but instead of only selecting one option, you can select multiples options per cell ;
10+
- **Formulas**: property that accepts js code to return dynamic values in function of your code. See the [Formulas](/docs/features/Formulas) section for more details.
1011
- **Image**: you can embed images in the `text` property in this format `![[image]]`. Make sure to enable `media links` in the column setting and adjust the dimensions too ;
1112
- **Created time**: this column can be added only once from the database settings and will display the created time of the row ;
1213
- **Modified time**: this column can be added only once from the database settings and will display the last modified time of the row ;
1314
- **Tasks**: this column can be added only once from the database settings and will display the task of the given file. You can also choose to hide the completed tasks in the column settings ;
1415
- **Inlinks**: this column can be added only once from the database settings and will display the files that have links to the select file ;
1516
- **Outlinks**: this column can be added only once from the database settings and will display the files that have links from the select file.
16-
1717
> You can change from one property type to another, and if the format is right, it will be recognized by the plugin.
1818
1919
## YAML & Dataview Inline Fields

docs/mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ nav:
99
- Properties: "features/Properties.md"
1010
- Notes: "features/Notes.md"
1111
- Viewing data: "features/Viewing data.md"
12+
- Formulas: "features/Formulas.md"
1213
- About: "about.md"
1314
- FAQ: "faq.md"
1415
- Media:

manifest-beta.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"id": "dbfolder",
33
"name": "DB Folder",
4-
"version": "2.5.1",
4+
"version": "2.5.3",
55
"minAppVersion": "0.15.9",
66
"description": "Folder with the capability to store and retrieve data from a folder like database",
77
"author": "RafaelGB",

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"id": "dbfolder",
33
"name": "DB Folder",
4-
"version": "2.5.1",
4+
"version": "2.5.3",
55
"minAppVersion": "0.15.9",
66
"description": "Folder with the capability to store and retrieve data from a folder like database",
77
"author": "RafaelGB",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "obsidian-dbfolder",
3-
"version": "2.5.1",
3+
"version": "2.5.3",
44
"description": "This is a sample plugin for Obsidian (https://obsidian.md)",
55
"main": "main.js",
66
"scripts": {

src/DatabaseView.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { obtainFormulasFromFolder } from "automations/AutomationsHelper";
12
import { DatabaseColumn } from "cdm/DatabaseModel";
23
import { ViewEvents } from "cdm/EmitterModel";
34
import {
@@ -44,6 +45,7 @@ export class DatabaseView extends TextFileView implements HoverParent {
4445
columns: Array<TableColumn>;
4546
shadowColumns: Array<TableColumn>;
4647
initial: InitialType;
48+
formulas: Record<string, unknown>;
4749

4850
constructor(leaf: WorkspaceLeaf, plugin: DBFolderPlugin) {
4951
super(leaf);
@@ -151,7 +153,6 @@ export class DatabaseView extends TextFileView implements HoverParent {
151153
);
152154
let yamlColumns: Record<string, DatabaseColumn> =
153155
this.diskConfig.yaml.columns;
154-
this.diskConfig.yaml.config;
155156
// Complete the columns with the metadata columns
156157
yamlColumns = await obtainMetadataColumns(
157158
yamlColumns,
@@ -167,6 +168,10 @@ export class DatabaseView extends TextFileView implements HoverParent {
167168
);
168169

169170
this.initial = obtainInitialType(this.columns);
171+
172+
this.formulas = await obtainFormulasFromFolder(
173+
this.diskConfig.yaml.config
174+
);
170175
// Define table properties
171176
this.shadowColumns = this.columns.filter((col) => col.skipPersist);
172177
const tableProps: TableDataType = {

src/Settings.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import { DatabaseSettings } from "cdm/SettingsModel";
1414
import editing_engine_settings_section from "settings/EditingEngineSection";
1515
import rows_settings_section from "settings/RowsSection";
1616
import csv_settings_section from "settings/CSVSection";
17+
import automation_settings_section from "settings/AutomationSection";
1718

1819
export type SettingRetriever = <K extends keyof DatabaseSettings>(
1920
key: K,
@@ -91,6 +92,8 @@ export class SettingsManager {
9192
rows_settings_section.run(settingHandlerResponse);
9293
/** Editing engine section */
9394
editing_engine_settings_section.run(settingHandlerResponse);
95+
/** Automation section */
96+
automation_settings_section.run(settingHandlerResponse);
9497
if (!settingHandlerResponse.local) {
9598
/** Media section */
9699
media_settings_section(settingHandlerResponse);

0 commit comments

Comments
 (0)