mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-10-12 12:22:32 +00:00
fix: use standard onboarding notice placement
This commit is contained in:
@@ -360,10 +360,6 @@ body {
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
body:not(.is-mobile):has(.sls-setting) .notice:has(.sls-onboarding-invitation-action) {
|
|
||||||
margin-right: 96px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.sls-review-harness {
|
.sls-review-harness {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
|
|||||||
@@ -127,7 +127,9 @@ async function captureAndSelectMobileInvitation(): Promise<string> {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
await withObsidianPage(port, async (page) => {
|
await withObsidianPage(port, async (page) => {
|
||||||
await onboardingNotice(page).locator(".sls-onboarding-invitation-action").click({ timeout: uiTimeoutMs });
|
const invitation = onboardingNotice(page);
|
||||||
|
await invitation.locator(".sls-onboarding-invitation-action").click({ timeout: uiTimeoutMs });
|
||||||
|
await invitation.waitFor({ state: "hidden", timeout: uiTimeoutMs });
|
||||||
});
|
});
|
||||||
return screenshot;
|
return screenshot;
|
||||||
}
|
}
|
||||||
@@ -178,6 +180,21 @@ async function openOnboardingFromSettings(): Promise<void> {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function dismissVisibleNotices(): Promise<void> {
|
||||||
|
await withObsidianPage(obsidianRemoteDebuggingPort(), async (page) => {
|
||||||
|
const notices = page.locator(".notice:visible");
|
||||||
|
while ((await notices.count()) > 0) {
|
||||||
|
const noticeCount = await page.locator(".notice").count();
|
||||||
|
await notices.first().click({ position: { x: 8, y: 8 }, timeout: uiTimeoutMs });
|
||||||
|
await page.waitForFunction(
|
||||||
|
(previousCount) => document.querySelectorAll(".notice").length < previousCount,
|
||||||
|
noticeCount,
|
||||||
|
{ timeout: uiTimeoutMs }
|
||||||
|
);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
async function closeSettings(): Promise<void> {
|
async function closeSettings(): Promise<void> {
|
||||||
await withObsidianPage(obsidianRemoteDebuggingPort(), async (page) => {
|
await withObsidianPage(obsidianRemoteDebuggingPort(), async (page) => {
|
||||||
const settingsContainer = page.locator(".modal-container").filter({
|
const settingsContainer = page.locator(".modal-container").filter({
|
||||||
@@ -217,11 +234,13 @@ async function main(): Promise<void> {
|
|||||||
console.log(`Fresh Vault startup evidence: ${JSON.stringify(evidence)}`);
|
console.log(`Fresh Vault startup evidence: ${JSON.stringify(evidence)}`);
|
||||||
|
|
||||||
const desktopInvitation = await captureDesktopInvitation();
|
const desktopInvitation = await captureDesktopInvitation();
|
||||||
await openOnboardingFromSettings();
|
|
||||||
const settingsIntro = await captureAndCloseIntro("onboarding-intro-settings-desktop.png", false);
|
|
||||||
await closeSettings();
|
|
||||||
const mobileInvitation = await captureAndSelectMobileInvitation();
|
const mobileInvitation = await captureAndSelectMobileInvitation();
|
||||||
const mobileIntro = await captureAndCloseIntro("onboarding-intro-mobile.png", true);
|
const mobileIntro = await captureAndCloseIntro("onboarding-intro-mobile.png", true);
|
||||||
|
await setObsidianMobileTestMode(obsidianRemoteDebuggingPort(), false, uiTimeoutMs);
|
||||||
|
await openOnboardingFromSettings();
|
||||||
|
const settingsIntro = await captureAndCloseIntro("onboarding-intro-settings-desktop.png", false);
|
||||||
|
await dismissVisibleNotices();
|
||||||
|
await closeSettings();
|
||||||
|
|
||||||
console.log(
|
console.log(
|
||||||
`Onboarding remained opt-in and kept unconfigured startup inert. Screenshots: ${[
|
`Onboarding remained opt-in and kept unconfigured startup inert. Screenshots: ${[
|
||||||
|
|||||||
@@ -12,6 +12,10 @@ Earlier releases remain available in the 0.25 release history and the legacy rel
|
|||||||
|
|
||||||
## Unreleased
|
## Unreleased
|
||||||
|
|
||||||
|
### Improved
|
||||||
|
|
||||||
|
- Removed a custom positioning workaround from the onboarding Notice so that it follows Obsidian's standard placement and dismissal behaviour.
|
||||||
|
|
||||||
## 1.0.0
|
## 1.0.0
|
||||||
|
|
||||||
27th July, 2026
|
27th July, 2026
|
||||||
|
|||||||
Reference in New Issue
Block a user