mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-15 13:41:52 +00:00
fix(editor): remove the fixation of created-by and created-time (#12260)
close: BS-3474, BS-3153 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Enhanced property addition to support specifying both type and name for new properties across databases and views. - Added context menu for selecting property type when adding new columns in table headers. - Introduced `addToGroup` functions to various group-by configurations for consistent grouping behavior. - **Bug Fixes** - Improved grouping logic to treat empty arrays as ungrouped in multi-member group configurations. - Refined grouping behavior to respect explicit group addition settings. - Ensured grouping operations only occur when both group key and row ID are present. - **Tests** - Updated test expectations to align with revised default column naming conventions. - Adjusted test utilities to accommodate the updated property addition method. - Improved typing simulation in column type selection for more reliable test execution. - **Improvements** - Introduced a new root component rendering on the share page to enhance UI integration. - Refined default property naming logic for clearer and more consistent column titles. - Simplified created-time and created-by property configurations for better maintainability. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -79,8 +79,12 @@ export async function selectColumnType(
|
||||
const typeMenu = page.locator('affine-menu').getByText('Type');
|
||||
await page.waitForTimeout(100);
|
||||
await typeMenu.hover();
|
||||
await page.mouse.move(0, 0);
|
||||
await page.waitForTimeout(100);
|
||||
await page.keyboard.type(columnType);
|
||||
for (const char of columnType.split('')) {
|
||||
await page.keyboard.type(char);
|
||||
await page.waitForTimeout(10);
|
||||
}
|
||||
await page.waitForTimeout(100);
|
||||
for (let i = 0; i < nth; i++) {
|
||||
await page.keyboard.press('ArrowDown');
|
||||
|
||||
@@ -65,7 +65,7 @@ test.describe('column operations', () => {
|
||||
await initDatabaseDynamicRowWithData(page, '123', true);
|
||||
await pressEscape(page);
|
||||
const { text: title1 } = await getDatabaseHeaderColumn(page, 1);
|
||||
expect(title1).toBe('Column 1');
|
||||
expect(title1).toBe('Column');
|
||||
|
||||
const selected = getDatabaseCell(page, {
|
||||
rowIndex: 0,
|
||||
|
||||
@@ -90,7 +90,7 @@ test('edit column title', async ({ page }) => {
|
||||
expect(await column.innerText()).toBe('1');
|
||||
|
||||
await undoByClick(page);
|
||||
expect(await column.innerText()).toBe('Column 1');
|
||||
expect(await column.innerText()).toBe('Column');
|
||||
});
|
||||
|
||||
test('should modify the value when the input loses focus', async ({ page }) => {
|
||||
@@ -359,7 +359,7 @@ test('should title column support quick renaming', async ({ page }) => {
|
||||
expect(await textElement.innerText()).toBe('123');
|
||||
|
||||
await undoByClick(page);
|
||||
expect(await textElement.innerText()).toBe('Column 1');
|
||||
expect(await textElement.innerText()).toBe('Column');
|
||||
await textElement.click();
|
||||
await waitNextFrame(page);
|
||||
await selectAllByKeyboard(page);
|
||||
|
||||
@@ -392,7 +392,9 @@ export async function initKanbanViewState(
|
||||
return rowId;
|
||||
});
|
||||
config.columns.forEach(column => {
|
||||
const columnId = datasource.propertyAdd('end', column.type);
|
||||
const columnId = datasource.propertyAdd('end', {
|
||||
type: column.type,
|
||||
});
|
||||
if (!columnId) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user