diff --git a/e2e/playwright/fixtures/homePageFixture.ts b/e2e/playwright/fixtures/homePageFixture.ts index 891c66a84..07044ae37 100644 --- a/e2e/playwright/fixtures/homePageFixture.ts +++ b/e2e/playwright/fixtures/homePageFixture.ts @@ -96,7 +96,7 @@ export class HomePageFixture { await expect(this.projectSection).not.toHaveText('Loading your Projects...') } - createAndGoToProject = async (projectTitle = 'project-$nnn') => { + createAndGoToProject = async (projectTitle = 'untitled') => { await this.projectsLoaded() await this.projectButtonNew.click() await this.projectTextName.click() diff --git a/e2e/playwright/native-file-menu.spec.ts b/e2e/playwright/native-file-menu.spec.ts index affb8d6ae..fbd19a0a2 100644 --- a/e2e/playwright/native-file-menu.spec.ts +++ b/e2e/playwright/native-file-menu.spec.ts @@ -24,7 +24,7 @@ test.describe('Native file menu', { tag: ['@electron'] }, () => { const actualArgument = await cmdBar.cmdBarElement .getByTestId('cmd-bar-arg-value') .inputValue() - const expectedArgument = 'project-$nnn' + const expectedArgument = 'untitled' expect(actualArgument).toBe(expectedArgument) }) test('File.Open project', async ({ tronApp, cmdBar, page }) => { diff --git a/e2e/playwright/projects.spec.ts b/e2e/playwright/projects.spec.ts index efba3c04e..247d46c2a 100644 --- a/e2e/playwright/projects.spec.ts +++ b/e2e/playwright/projects.spec.ts @@ -828,7 +828,7 @@ test.describe(`Project management commands`, () => { const commandButton = page.getByRole('button', { name: 'Commands' }) const commandOption = page.getByRole('option', { name: 'rename project' }) const projectNameOption = page.getByRole('option', { name: projectName }) - const projectRenamedName = `project-000` + const projectRenamedName = `untitled` // const projectMenuButton = page.getByTestId('project-sidebar-toggle') const commandContinueButton = page.getByRole('button', { name: 'Continue', @@ -941,7 +941,7 @@ test.describe(`Project management commands`, () => { const commandButton = page.getByRole('button', { name: 'Commands' }) const commandOption = page.getByRole('option', { name: 'rename project' }) const projectNameOption = page.getByRole('option', { name: projectName }) - const projectRenamedName = `project-000` + const projectRenamedName = `untitled` const commandContinueButton = page.getByRole('button', { name: 'Continue', }) @@ -1139,7 +1139,7 @@ test(`Create a few projects using the default project name`, async ({ await test.step(`Create project ${i}`, async () => { await homePage.expectState({ projectCards: Array.from({ length: i }, (_, i) => ({ - title: `project-${i.toString().padStart(3, '0')}`, + title: i === 0 ? 'untitled' : `untitled-${i}`, fileCount: 1, })).toReversed(), sortBy: 'last-modified-desc', @@ -1323,9 +1323,9 @@ test( }) await test.step('Check we can still create a project', async () => { - await createProject({ name: 'project-000', page, returnHome: true }) + await createProject({ name: 'new-project', page, returnHome: true }) await expect( - page.getByTestId('project-link').filter({ hasText: 'project-000' }) + page.getByTestId('project-link').filter({ hasText: 'new-project' }) ).toBeVisible() }) } diff --git a/e2e/playwright/snapshot-tests.spec.ts b/e2e/playwright/snapshot-tests.spec.ts index 63b9dbb92..064b5fac1 100644 --- a/e2e/playwright/snapshot-tests.spec.ts +++ b/e2e/playwright/snapshot-tests.spec.ts @@ -351,7 +351,7 @@ const extrudeDefaultPlane = async ( }, }, project: { - default_project_name: 'project-$nnn', + default_project_name: 'untitled', }, text_editor: { text_wrapping: true, diff --git a/e2e/playwright/storageStates.ts b/e2e/playwright/storageStates.ts index f09a53002..dd9fe5918 100644 --- a/e2e/playwright/storageStates.ts +++ b/e2e/playwright/storageStates.ts @@ -23,7 +23,7 @@ export const TEST_SETTINGS: DeepPartial = { camera_projection: 'perspective', }, project: { - default_project_name: 'project-$nnn', + default_project_name: 'untitled', directory: '', }, text_editor: { diff --git a/e2e/playwright/testing-settings.spec.ts b/e2e/playwright/testing-settings.spec.ts index 8cd4241e0..2a331e538 100644 --- a/e2e/playwright/testing-settings.spec.ts +++ b/e2e/playwright/testing-settings.spec.ts @@ -57,7 +57,7 @@ test.describe('Testing settings', () => { expect(storedSettings.settings?.modeling?.mouse_controls).toBe('zoo') expect(storedSettings.settings?.project?.directory).toBe('') expect(storedSettings.settings?.project?.default_project_name).toBe( - 'project-$nnn' + 'untitled' ) }) diff --git a/rust/kcl-lib/src/settings/types/mod.rs b/rust/kcl-lib/src/settings/types/mod.rs index 4077cccc8..6abe8cc99 100644 --- a/rust/kcl-lib/src/settings/types/mod.rs +++ b/rust/kcl-lib/src/settings/types/mod.rs @@ -9,7 +9,7 @@ use serde::{Deserialize, Serialize}; use validator::{Validate, ValidateRange}; const DEFAULT_THEME_COLOR: f64 = 264.5; -const DEFAULT_PROJECT_NAME_TEMPLATE: &str = "project-$nnn"; +const DEFAULT_PROJECT_NAME_TEMPLATE: &str = "untitled"; /// User specific settings for the app. /// These live in `user.toml` in the app's configuration directory. @@ -603,7 +603,7 @@ mouseControls = "KittyCAD" showDebugPanel = true [settings.projects] -defaultProjectName = "project-$nnn" +defaultProjectName = "untitled" [settings.textEditor] textWrapping = true @@ -860,7 +860,7 @@ projectDirectory = "/Users/macinatormax/Documents/kittycad-modeling-projects""#; }, project: ProjectSettings { directory: "/Users/macinatormax/Documents/kittycad-modeling-projects".into(), - default_project_name: "project-$nnn".to_string().into() + default_project_name: "untitled".to_string().into() }, command_bar: CommandBarSettings { include_settings: true.into() diff --git a/src/lib/constants.ts b/src/lib/constants.ts index d6c3b1940..2dd583287 100644 --- a/src/lib/constants.ts +++ b/src/lib/constants.ts @@ -11,7 +11,7 @@ export const MAX_PADDING = 7 * This is used as a template for new projects, with $nnn being replaced by an index * This is available for users to edit as a setting. */ -export const DEFAULT_PROJECT_NAME = 'project-$nnn' +export const DEFAULT_PROJECT_NAME = 'untitled' export const DEFAULT_PROJECT_KCL_FILE = 'main.kcl' /** Name given the temporary "project" in the browser version of the app */ export const BROWSER_PROJECT_NAME = 'browser'