Skip to content

Commit 997db70

Browse files
100% son --> child
1 parent 3042e77 commit 997db70

File tree

7 files changed

+38
-38
lines changed

7 files changed

+38
-38
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,10 @@ When you open a note from either the `CLUSTERS` or `ORPHANS` folder the `Cluster
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-
![brother](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)
8686

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

9090
![orphan](https://github.com/lorens-osman-dev/cluster/blob/assets/disc.svg)
9191

@@ -95,7 +95,7 @@ When you open a note from either the `CLUSTERS` or `ORPHANS` folder the `Cluster
9595
![delete](https://github.com/lorens-osman-dev/cluster/blob/assets/trash-2.svg)
9696

9797
- This button deletes current note.
98-
- If the current note has no brothers the containing folder will be deleted.
98+
- If the current note has no siblings the containing folder will be deleted.
9999
- If the current note has children the children will be deleted along with their own folders.
100100
- If the current note is `cluster` all the cluster's files and folders will be deleted.
101101

@@ -117,7 +117,7 @@ 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 brother command.
120+
- Set `Ctrl+Shift+B` hotkey to New sibling command.
121121
- Set `Ctrl+Shift+S` hotkey to New child command.
122122
- Set `Ctrl+Shift+C` hotkey to New cluster command.
123123
- Set `Ctrl+Shift+D` hotkey to Delete active note command.

src/createFamily/buttons.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,8 @@ function appendOrRemoveChild(appObject: App, file: TFile, obsidianContainer: any
120120
const childBtn = makeButton(appObject, "Child", "childBtn", `Create Child for current [${file.basename}] note`)
121121
setIcon(childBtn, "baby")
122122

123-
const brotherBtn = makeButton(appObject, "Brother", "brotherBtn", `Create Brother for current [${file.basename}] note`)
124-
setIcon(brotherBtn, "git-compare")
123+
const siblingBtn = makeButton(appObject, "Sibling", "siblingBtn", `Create Sibling for current [${file.basename}] note`)
124+
setIcon(siblingBtn, "git-compare")
125125

126126
const orphanBtn = makeButton(appObject, "Orphan", "orphanBtn", `Create New Orphan note in [ORPHANS] folder`)
127127
setIcon(orphanBtn, "disc")
@@ -147,7 +147,7 @@ function appendOrRemoveChild(appObject: App, file: TFile, obsidianContainer: any
147147
// Append Buttons to buttonsLineContainer
148148
buttonsLineContainer?.appendChild(clusterBtn)
149149
buttonsLineContainer?.appendChild(childBtn)
150-
buttonsLineContainer?.appendChild(brotherBtn)
150+
buttonsLineContainer?.appendChild(siblingBtn)
151151
buttonsLineContainer?.appendChild(orphanBtn)
152152
buttonsLineContainer?.appendChild(deleteBtn)
153153

@@ -167,7 +167,7 @@ function appendOrRemoveChild(appObject: App, file: TFile, obsidianContainer: any
167167
//@ts-ignore
168168
extraButtonsContainer.style.backgroundColor = Vars.buttonsLineContainerBG_orphans
169169
buttonsLineContainer?.removeChild(childBtn)
170-
buttonsLineContainer?.removeChild(brotherBtn)
170+
buttonsLineContainer?.removeChild(siblingBtn)
171171
}
172172

173173
// Append the buttonsLineContainer after obsidianHeaderEl
@@ -192,9 +192,9 @@ function makeButton(appObject: App, type: string, className: string, tooltipMsg:
192192
createClustersAndOrphansFolder(appObject);
193193
new familyModal(appObject, U.NewFileLocation.NewTab, "newChild", undefined).open()
194194
}
195-
else if (type == "Brother") {
195+
else if (type == "Sibling") {
196196
createClustersAndOrphansFolder(appObject);
197-
new familyModal(appObject, U.NewFileLocation.NewTab, "newBrother", undefined).open();
197+
new familyModal(appObject, U.NewFileLocation.NewTab, "newSibling", undefined).open();
198198
}
199199
else if (type == "Orphan") {
200200
createClustersAndOrphansFolder(appObject);

src/createFamily/familyModal.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export default class familyModal extends Modal {
5858
this.inputEl.addClasses(["prompt-input", "inputDelete"])
5959
this.modalEl.appendChild(svgElements().noThing());
6060
const text = document.createElement('div');
61-
text.innerText = `Child ?! Brother ?! of what??\nNo active file in the work space, Press ESC`
61+
text.innerText = `Child ?! Sibling ?! of what??\nNo active file in the work space, Press ESC`
6262
text.addClass("nothingMsg")
6363

6464
this.modalEl.appendChild(text);
@@ -71,9 +71,9 @@ export default class familyModal extends Modal {
7171
} else if (this.createType == "newChild") {
7272
this.inputEl.placeholder = `Type the child name of [${getActiveFile.basename}] note`;
7373
this.modalEl.appendChild(svgElements().child());
74-
} else if (this.createType == "newBrother") {
75-
this.inputEl.placeholder = `Type the brother name of [${getActiveFile.basename}] note`;
76-
this.modalEl.appendChild(svgElements().brother());
74+
} else if (this.createType == "newSibling") {
75+
this.inputEl.placeholder = `Type the sibling name of [${getActiveFile.basename}] note`;
76+
this.modalEl.appendChild(svgElements().sibling());
7777
} else if (this.createType == "newOrphan") {
7878
this.inputEl.placeholder = `Type the new Orphan name`;
7979
this.modalEl.appendChild(svgElements().orphan());
@@ -197,14 +197,14 @@ export default class familyModal extends Modal {
197197
}
198198

199199
}
200-
//-make Brother to the current active file
201-
else if (this.createType == "newBrother") {
200+
//-make Sibling to the current active file
201+
else if (this.createType == "newSibling") {
202202
if (getActiveFile!.path.startsWith(clusters)) {
203-
// the next if statement to prevent make brother to a cluster
203+
// the next if statement to prevent make Sibling to a cluster
204204
if (currentActiveFileName!.endsWith("-cluster")) {
205-
new Notice(`You cant make Brother to a cluster.\nCreate new cluster instead`);
205+
new Notice(`You cant make Sibling to a cluster.\nCreate new cluster instead`);
206206
} else {
207-
const result = await templates(getActiveFile, "brother");
207+
const result = await templates(getActiveFile, "sibling");
208208

209209
if (result.state == true) {
210210
const siblingNameFromInput = this.inputEl.value.trim();
@@ -213,11 +213,11 @@ export default class familyModal extends Modal {
213213
return
214214
}
215215
this.setFolder(getActiveFile!.parent!, "");
216-
this.createNewNote(appObject, siblingNameFromInput, result.brotherTemplate);
216+
this.createNewNote(appObject, siblingNameFromInput, result.siblingTemplate);
217217
}
218218
}
219219
} else {
220-
new Notice("Create new brother should not work outside [CLUSTERS] folder")
220+
new Notice("Create new sibling should not work outside [CLUSTERS] folder")
221221
}
222222
}
223223
//-make newOrphan

src/createFamily/svg.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,17 +48,17 @@ export default function svgElements() {
4848

4949
return con;
5050
},
51-
brother: function () {
51+
sibling: function () {
5252
// 1 - Container Element
5353
const con = document.createElement('div');
54-
con.classList.add("inputMsgCon", "brother");
54+
con.classList.add("inputMsgCon", "sibling");
5555

5656
// 2 - SVG Element
5757
setIcon(con, "git-compare")
5858

5959
// 3 - Text Element
6060
const text = document.createElement('div');
61-
text.innerText = "Create Brother";
61+
text.innerText = "Create Sibling";
6262
text.classList.add("textMsg");
6363

6464
// Append Text element to the container

src/createFamily/templates.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export async function templates(activeFile: TFile, type: string) {
66
state: false,
77
clusterChildTemplate: undefined as unknown as string,
88
normalChildTemplate: undefined as unknown as string,
9-
brotherTemplate: undefined as unknown as string,
9+
siblingTemplate: undefined as unknown as string,
1010
}
1111

1212
if (type == "clusterChild") {
@@ -101,7 +101,7 @@ generation: ${generationFromActiveFilePath + 1}
101101

102102
return result
103103
})
104-
} else if (type == "brother") {
104+
} else if (type == "sibling") {
105105

106106
U.bigIF.ELSE(() => {
107107
const frontmatterProperties = this.app.metadataCache.getFileCache(activeFile).frontmatter;
@@ -144,7 +144,7 @@ generation: ${generationFromActiveFilePath + 1}
144144

145145
])
146146
result.state = true
147-
result.brotherTemplate =
147+
result.siblingTemplate =
148148
`---
149149
tags:
150150
- ${clusterTagName}
@@ -247,16 +247,16 @@ When you open a note from either the \`CLUSTERS\` or \`ORPHANS\` folder the \`C
247247
- A new folder with the same name of current note will be created for all \`child\` notes of the current note.
248248

249249
![pic](data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9IiNkZmRmZGYiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBjbGFzcz0ibHVjaWRlIGx1Y2lkZS1naXQtY29tcGFyZSI+PGNpcmNsZSBjeD0iMTgiIGN5PSIxOCIgcj0iMyIvPjxjaXJjbGUgY3g9IjYiIGN5PSI2IiByPSIzIi8+PHBhdGggZD0iTTEzIDZoM2EyIDIgMCAwIDEgMiAydjciLz48cGF0aCBkPSJNMTEgMThIOGEyIDIgMCAwIDEtMi0yVjkiLz48L3N2Zz4=)
250-
- This button creates a new note beside the current note, we call it \`brother\` note.
251-
- \`brother\` note means the new created note will copy the parent link, the cluster's tag and the generation property from current note.
250+
- This button creates a new note beside the current note, we call it \`sibling\` note.
251+
- \`sibling\` note means the new created note will copy the parent link, the cluster's tag and the generation property from current note.
252252

253253
![pic](data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9IiNkZmRmZGYiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBjbGFzcz0ibHVjaWRlIGx1Y2lkZS1kaXNjIj48Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSIxMCIvPjxjaXJjbGUgY3g9IjEyIiBjeT0iMTIiIHI9IjIiLz48L3N2Zz4=)
254254
- This button creates a new note inside \`ORPHANS\` folder.
255255
- \`orphan\` note has no parent link and no hierarchy.
256256

257257
![pic](data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9IiNkZmRmZGYiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBjbGFzcz0ibHVjaWRlIGx1Y2lkZS10cmFzaC0yIj48cGF0aCBkPSJNMyA2aDE4Ii8+PHBhdGggZD0iTTE5IDZ2MTRjMCAxLTEgMi0yIDJIN2MtMSAwLTItMS0yLTJWNiIvPjxwYXRoIGQ9Ik04IDZWNGMwLTEgMS0yIDItMmg0YzEgMCAyIDEgMiAydjIiLz48bGluZSB4MT0iMTAiIHgyPSIxMCIgeTE9IjExIiB5Mj0iMTciLz48bGluZSB4MT0iMTQiIHgyPSIxNCIgeTE9IjExIiB5Mj0iMTciLz48L3N2Zz4=)
258258
- This button deletes current note.
259-
- If the current note has no brothers the containing folder will be deleted.
259+
- If the current note has no siblings the containing folder will be deleted.
260260
- If the current note has children the children will be deleted along with their own folders.
261261
- If the current note is \`cluster\` all the cluster's files and folders will be deleted.
262262

@@ -276,7 +276,7 @@ When you open a note from either the \`CLUSTERS\` or \`ORPHANS\` folder the \`C
276276

277277
### ⚙️ PC Recommendation
278278

279-
- Set \` Ctrl+Shift+B \` hotkey to New brother command.
279+
- Set \` Ctrl+Shift+B \` hotkey to New sibling command.
280280
- Set \` Ctrl+Shift+S \` hotkey to New child command.
281281
- Set \` Ctrl+Shift+C \` hotkey to New cluster command.
282282
- Set \` Ctrl+Shift+D \` hotkey to Delete active note command.

src/mainParts/addCommands.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,14 @@ export function addCommands(plugin: Plugin) {
3535
},
3636
});
3737
plugin.addCommand({
38-
id: "New-Brother",
39-
name: "New brother",
38+
id: "New-Sibling",
39+
name: "New sibling",
4040
callback: () => {
4141
createClustersAndOrphansFolder(plugin.app);
4242
new familyModal(
4343
plugin.app,
4444
NewFileLocation.NewTab,
45-
"newBrother",
45+
"newSibling",
4646
undefined,
4747
).open();
4848
},

src/mainParts/fileMenu.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,20 +54,20 @@ export function fileMenu(plugin: Plugin, SimpleFocus: SimpleFocusClass) {
5454
});
5555
});
5656
}
57-
//- brother menu
57+
//- sibling menu
5858
if (
5959
(file instanceof TFile && file.path.startsWith(clusters))
6060
&&
6161
!(file instanceof TFile && file.parent instanceof TFolder && file.parent.name == clusters)
6262
) {
6363
menu.addItem((item) => {
6464
item
65-
.setTitle("New brother")
65+
.setTitle("New sibling")
6666
.setIcon("git-compare")
6767
.onClick(async () => {
6868
createClustersAndOrphansFolder(plugin.app);
6969
const graphActiveFile = file
70-
new familyModal(plugin.app, NewFileLocation.NewTab, "newBrother", graphActiveFile).open();
70+
new familyModal(plugin.app, NewFileLocation.NewTab, "newSibling", graphActiveFile).open();
7171
});
7272
});
7373
}

0 commit comments

Comments
 (0)