mirror of
https://github.com/beatsad/Vault2Dify.git
synced 2026-07-22 07:46:49 +00:00
chore: release 1.0.6
This commit is contained in:
parent
1158f7dec8
commit
b845113ad8
7 changed files with 112 additions and 9 deletions
24
RELEASE_NOTES_1.0.6.md
Normal file
24
RELEASE_NOTES_1.0.6.md
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
# Vault2Dify 1.0.6
|
||||
|
||||
## Added
|
||||
|
||||
- No user-facing features in this release.
|
||||
|
||||
## Fixed
|
||||
|
||||
- Fixed the settings page heading layout so the Vault2Dify title, subtitle, and major section titles align naturally with the settings content.
|
||||
- Tightened the spacing between the Vault2Dify title and subtitle.
|
||||
- Kept the Directory mapping title aligned with the Add mapping button while preserving consistent title-to-content spacing across Connection, Directory mapping, and Sync settings.
|
||||
|
||||
## Obsidian Review
|
||||
|
||||
- Kept the fix scoped to the production settings UI and avoided prototype, sync behavior, or mapping logic changes.
|
||||
- Added regression coverage for heading alignment, subtitle spacing, and section action alignment without relying on transform or manual offset patches.
|
||||
|
||||
## Validation
|
||||
|
||||
- `git diff --check`
|
||||
- `npm run typecheck`
|
||||
- `npm test`
|
||||
- `npm run build`
|
||||
- `npm run install:test-vault`
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
{
|
||||
"id": "vault-to-dify",
|
||||
"name": "Vault2Dify",
|
||||
"version": "1.0.5",
|
||||
"version": "1.0.6",
|
||||
"minAppVersion": "1.12.7",
|
||||
"description": "Sync selected Markdown notes to a Dify Knowledge Base.",
|
||||
"author": "WenBin",
|
||||
"authorUrl": "https://github.com/BeatsAD",
|
||||
"isDesktopOnly": true
|
||||
}
|
||||
}
|
||||
4
package-lock.json
generated
4
package-lock.json
generated
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "vault-to-dify",
|
||||
"version": "1.0.5",
|
||||
"version": "1.0.6",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "vault-to-dify",
|
||||
"version": "1.0.5",
|
||||
"version": "1.0.6",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^9.39.4",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "vault-to-dify",
|
||||
"version": "1.0.5",
|
||||
"version": "1.0.6",
|
||||
"description": "Sync your Obsidian Vault to Dify Knowledge Base",
|
||||
"main": "main.js",
|
||||
"scripts": {
|
||||
|
|
|
|||
26
styles.css
26
styles.css
|
|
@ -191,6 +191,30 @@
|
|||
gap: 4px;
|
||||
}
|
||||
|
||||
.dify-sync-settings .title-line > .setting-item,
|
||||
.dify-sync-settings .heading-line > .setting-item {
|
||||
display: block;
|
||||
min-height: 0;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.dify-sync-settings .title-line > .setting-item > .setting-item-info,
|
||||
.dify-sync-settings .heading-line > .setting-item > .setting-item-info {
|
||||
width: auto;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
flex: 0 1 auto;
|
||||
}
|
||||
|
||||
.dify-sync-settings .title-line .setting-item-name,
|
||||
.dify-sync-settings .heading-line .setting-item-name {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
.dify-sync-settings .heading-text {
|
||||
display: inline-block;
|
||||
position: static;
|
||||
|
|
@ -224,7 +248,7 @@
|
|||
}
|
||||
|
||||
.dify-sync-settings .settings-subtitle {
|
||||
margin: 0.125rem 0 0;
|
||||
margin: 4px 0 0;
|
||||
max-width: min(100%, 34rem);
|
||||
color: var(--text-muted);
|
||||
font-size: 0.86rem;
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ function readTestVaultFile(relativePath) {
|
|||
`Missing external Obsidian test vault file: ${filePath}. ` +
|
||||
"Run `npm run install:test-vault` before `npm test`, or set VAULT2DIFY_TEST_VAULT to another prepared vault.",
|
||||
);
|
||||
}
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
|
@ -385,7 +385,18 @@ test("settings topbar renders localized plugin subtitle below the title", () =>
|
|||
".dify-sync-settings .title-line",
|
||||
"flex-direction: column;",
|
||||
"align-items: flex-start;",
|
||||
".dify-sync-settings .title-line > .setting-item,",
|
||||
".dify-sync-settings .heading-line > .setting-item",
|
||||
"min-height: 0;",
|
||||
"border: 0;",
|
||||
".dify-sync-settings .title-line > .setting-item > .setting-item-info,",
|
||||
".dify-sync-settings .heading-line > .setting-item > .setting-item-info",
|
||||
"flex: 0 1 auto;",
|
||||
".dify-sync-settings .title-line .setting-item-name,",
|
||||
".dify-sync-settings .heading-line .setting-item-name",
|
||||
"line-height: inherit;",
|
||||
".dify-sync-settings .settings-subtitle",
|
||||
"margin: 4px 0 0;",
|
||||
"color: var(--text-muted);",
|
||||
"overflow-wrap: anywhere;",
|
||||
".dify-sync-settings .title-line > .heading-text,",
|
||||
|
|
@ -1060,9 +1071,52 @@ test("test vault plugin styles keep natural topbar title alignment", () => {
|
|||
/\.dify-sync-settings \.title-line\s*\{[^}]*padding-left:/s,
|
||||
"Topbar title group should not be pushed right as a whole",
|
||||
);
|
||||
assert.match(
|
||||
source,
|
||||
/\.dify-sync-settings \.title-line > \.setting-item,\s*\.dify-sync-settings \.heading-line > \.setting-item\s*\{[^}]*min-height: 0;[^}]*margin: 0;[^}]*padding: 0;[^}]*border: 0;/s,
|
||||
"Title rows should locally reset Obsidian Setting spacing instead of using manual offsets",
|
||||
);
|
||||
assert.match(
|
||||
source,
|
||||
/\.dify-sync-settings \.settings-subtitle\s*\{[^}]*margin: 4px 0 0;/s,
|
||||
"Topbar subtitle should sit close below the plugin title",
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
test("section headings share spacing and align action buttons", () => {
|
||||
const mappingSectionBlock = mainSource.slice(
|
||||
mainSource.indexOf("private renderMappingSection"),
|
||||
mainSource.indexOf("private renderMainMappingPagination"),
|
||||
);
|
||||
const createReviewSectionBlock = mainSource.slice(
|
||||
mainSource.indexOf("private createReviewSection"),
|
||||
mainSource.indexOf("private createSettingName"),
|
||||
);
|
||||
|
||||
sourceContainsAll(mappingSectionBlock, [
|
||||
"this.createReviewSection(containerEl, 'mapping-title', this.plugin.t('settingsReviewMappingTitle'), (head) => {",
|
||||
"const add = new ButtonComponent(head)",
|
||||
".setButtonText(this.plugin.t('addMapping'))",
|
||||
]);
|
||||
sourceContainsAll(createReviewSectionBlock, [
|
||||
"const head = section.createDiv('section-head');",
|
||||
"const titleLine = head.createDiv('heading-line');",
|
||||
"const heading = new Setting(titleLine).setName(title).setHeading();",
|
||||
"if (renderAction) renderAction(head);",
|
||||
]);
|
||||
assert.match(
|
||||
stylesSource,
|
||||
/\.dify-sync-settings \.topbar,\s*\.dify-sync-settings \.section-head,\s*\.dify-sync-modal \.pending-mapping-head\s*\{[^}]*align-items: center;[^}]*justify-content: space-between;/s,
|
||||
"Section headings and right-side actions should align through the shared section-head flex row",
|
||||
);
|
||||
assert.match(
|
||||
stylesSource,
|
||||
/\.dify-sync-settings \.section-head\s*\{[^}]*margin-bottom: 0\.5rem;/s,
|
||||
"Major settings sections should keep a consistent title-to-content gap",
|
||||
);
|
||||
});
|
||||
|
||||
test("settings body copy and buttons use consistent regular typography outside major headings", () => {
|
||||
sourceContainsAll(stylesSource, [
|
||||
"/* Typography override: normalize dense settings copy while heading rules opt back into heavier weights. */",
|
||||
|
|
|
|||
|
|
@ -3,5 +3,6 @@
|
|||
"1.0.2": "1.13.0",
|
||||
"1.0.3": "1.13.0",
|
||||
"1.0.4": "1.13.0",
|
||||
"1.0.5": "1.12.7"
|
||||
}
|
||||
"1.0.5": "1.12.7",
|
||||
"1.0.6": "1.12.7"
|
||||
}
|
||||
Loading…
Reference in a new issue