mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-18 14:56:59 +08:00
feat(core): add a two-step confirm page to create new journal (#13240)
close AF-2750; <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Introduced a new workspace journals page with date-based navigation, placeholder UI, and the ability to create daily journals directly from the page. * Added a "Today" button for quick navigation to the current day's journal when viewing other dates. * **Improvements** * Enhanced the journal document title display with improved date formatting and flexible styling. * Expanded the active state for the journal sidebar button to cover all journal-related routes. * Updated journal navigation to open existing entries directly or navigate to filtered journal listings. * **Bug Fixes** * Improved date handling and navigation logic for journal entries to ensure accurate redirection and creation flows. * **Style** * Added new styles for the workspace journals page, including headers, placeholders, and buttons. * **Localization** * Added English translations for journal placeholder text and create journal prompts. * **Tests** * Added confirmation steps in journal creation flows to improve test reliability. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -15,8 +15,14 @@ export async function open404Page(page: Page) {
|
||||
await page.goto(`${coreUrl}/404`);
|
||||
}
|
||||
|
||||
export async function confirmCreateJournal(page: Page) {
|
||||
const confirmButton = page.getByTestId('confirm-create-journal-button');
|
||||
await confirmButton.click();
|
||||
}
|
||||
|
||||
export async function openJournalsPage(page: Page) {
|
||||
await page.getByTestId('slider-bar-journals-button').click();
|
||||
await confirmCreateJournal(page);
|
||||
await expect(
|
||||
page.locator('.doc-title-container:has-text("Today")')
|
||||
).toBeVisible();
|
||||
|
||||
Reference in New Issue
Block a user