Skip to content

Commit ecee49f

Browse files
v3.0.2
1 parent a80f652 commit ecee49f

File tree

6 files changed

+19
-45
lines changed

6 files changed

+19
-45
lines changed

README.md

Lines changed: 7 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -68,31 +68,31 @@ When you open a note from either the `CLUSTERS` or `ORPHANS` folder the `Cluster
6868

6969
![ORPHANS Buttons](https://github.com/lorens-osman-dev/cluster/blob/assets/orphans-buttons.png?raw=true)
7070

71-
![cluster](https://github.com/lorens-osman-dev/cluster/blob/assets/cluster.svg)
71+
![cluster](https://github.com/lorens-osman-dev/cluster/blob/assets/cluster.svg?raw=true)
7272

7373
- This button creates new note inside `CLUSTERS` folder and the note's name will followed by `-cluster` added to the end.
7474
- We refer to this note as the `cluster`, and it's the main note.
7575
- The `cluster` has a generation value of `0` as property .
7676
- The `cluster` has a tag called `Cluster`. All main notes (also known as `cluster`) will have this `Cluster` tag.
7777

78-
![baby](https://github.com/lorens-osman-dev/cluster/blob/assets/babdc.svg)
78+
![baby](https://github.com/lorens-osman-dev/cluster/blob/assets/babdc.svg?raw=true)
7979

8080
- This button creates a new note linked to the current note, we call it `child` note.
8181
- `child` note means the new created note will contains link to the current note and tag with cluster's name.
8282
- The generation property of the `child` note will be the current note's generation +1
8383
- A new folder with the same name of current note will be created for all `child` notes of the current note.
8484

85-
![Sibling](https://github.com/lorens-osman-dev/cluster/blob/assets/git-compare.svg)
85+
![Sibling](https://github.com/lorens-osman-dev/cluster/blob/assets/git-compare.svg?raw=true)
8686

8787
- This button creates a new note beside the current note, we call it `sibling` note.
8888
- `sibling` note means the new created note will copy the parent link, the cluster's tag and the generation property from current note.
8989

90-
![orphan](https://github.com/lorens-osman-dev/cluster/blob/assets/disc.svg)
90+
![orphan](https://github.com/lorens-osman-dev/cluster/blob/assets/disc.svg?raw=true)
9191

9292
- This button creates a new note inside `ORPHANS` folder.
9393
- `orphan` note has no parent link and no hierarchy.
9494

95-
![delete](https://github.com/lorens-osman-dev/cluster/blob/assets/trash-2.svg)
95+
![delete](https://github.com/lorens-osman-dev/cluster/blob/assets/trash-2.svg?raw=true)
9696

9797
- This button deletes current note.
9898
- If the current note has no siblings the containing folder will be deleted.
@@ -117,36 +117,10 @@ When you open a note from either the `CLUSTERS` or `ORPHANS` folder the `Cluster
117117

118118
### ⚙️ PC Recommendation
119119

120-
- Set `Ctrl+Shift+B` hotkey to New sibling command.
121-
- Set `Ctrl+Shift+S` hotkey to New child command.
122-
- Set `Ctrl+Shift+C` hotkey to New cluster command.
120+
- Set `Ctrl+Shift+S` hotkey to New sibling command.
121+
- Set `Ctrl+Shift+C` hotkey to New child command.
123122
- Set `Ctrl+Shift+D` hotkey to Delete active note command.
124123

125-
## HELP !
126-
127-
**The Challenge**:
128-
129-
Currently, the Cluster plugin for each `child` note creates a subfolder with the same name as the `parent` note, following these steps :
130-
131-
1. create folder with same name of the `parent` note if is not exist.
132-
2. Create the `child` note within the newly created folder.
133-
134-
**Benefits:**
135-
136-
- Maintains a consistent file structure.
137-
138-
**Drawbacks:**
139-
140-
- Crowded file navigation pane ("file-explorer"). Each `parent` note with `child` notes creates a folder with the same name as `parent`, resulting in a cluttered file structure (see image below).
141-
142-
<img src="./assets/imags/Frame 1.png" >
143-
144-
**The goal is to make new "file-explorer" like**
145-
146-
<img src="./assets/imags/sdfs.png" >
147-
148-
**we welcome any GitHub pull requests (PRs) contributions.**
149-
150124
---
151125

152126
If you like this plugin, feel free to support the development by buying a coffee:

bump.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import type { ForegroundColorName, BackgroundColorName } from "chalk";
55
type Msg = [string, ForegroundColorName | 'white', BackgroundColorName | null];
66

77
// Define the package semver and app version
8-
const packageSemver = "3.0.1"; // Replace with your desired package semver
8+
const packageSemver = "3.0.2"; // Replace with your desired package semver
99
const appVersion = "1.8.4"; // Replace with your desired app version
1010

1111
// Paths to the JSON files

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"id": "cluster",
33
"name": "Cluster",
4-
"version": "3.0.1",
4+
"version": "3.0.2",
55
"minAppVersion": "1.8.4",
66
"description": "Make the notes clustering simpler on mobile devices and work well on PCs ether, Notes Clustering is the process of creating hierarchical notes structures.",
77
"author": "Lorens Osman",

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
{
22
"name": "cluster",
3-
"version": "3.0.1",
3+
"version": "3.0.2",
44
"description": "This is a sample plugin for Obsidian (https://obsidian.md)",
55
"main": "main.js",
66
"scripts": {
77
"dev": "node esbuild.config.mjs",
88
"build": "tsc -noEmit -skipLibCheck && node esbuild.config.mjs production",
9-
"sass": "sass -w ./src/style/style.scss:./styles.css "
9+
"sass": "sass -w ./src/style/style.scss:./styles.css ",
10+
"bump": "tsx bump.ts"
1011
},
1112
"keywords": [],
1213
"author": "",

src/createFamily/buttons.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,11 @@ function appendOrRemoveChild(appObject: App, file: TFile, obsidianContainer: any
112112
const selfName = file.basename
113113
const siblings = file.parent?.children
114114
const isThereChildrenFolder = siblings?.find((item) => item instanceof TFolder && item.name === selfName) as TFolder
115-
if (isThereChildrenFolder) {
116-
if (!file.basename.endsWith("-cluster")) {
117-
buttonsLineContainer.addClasses(["mergeFileFolder"])
118-
}
119-
if (file.basename.endsWith("-cluster")) {
120-
buttonsLineContainer.addClasses(["mergeFileFolderCluster"])
121-
}
115+
if (isThereChildrenFolder && !file.basename.endsWith("-cluster")) {
116+
buttonsLineContainer.addClasses(["mergeFileFolder"])
117+
}
118+
if (file.basename.endsWith("-cluster")) {
119+
buttonsLineContainer.addClasses(["mergeFileFolderCluster"])
122120
}
123121

124122
const extraButtonsContainer = document.createElement('div');

versions.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@
1111
"2.0.6": "1.7.4",
1212
"2.0.9": "1.7.7",
1313
"3.0.0": "1.8.4",
14-
"3.0.1": "1.8.4"
14+
"3.0.1": "1.8.4",
15+
"3.0.2": "1.8.4"
1516
}

0 commit comments

Comments
 (0)