Change default project name to 'untitled' (#5998)

* Change default project name to 'untitled'

* A snapshot a day keeps the bugs away! 📷🐛

* A snapshot a day keeps the bugs away! 📷🐛

* A snapshot a day keeps the bugs away! 📷🐛

* A snapshot a day keeps the bugs away! 📷🐛

* A snapshot a day keeps the bugs away! 📷🐛

* A snapshot a day keeps the bugs away! 📷🐛

* A snapshot a day keeps the bugs away! 📷🐛

* A snapshot a day keeps the bugs away! 📷🐛

* A snapshot a day keeps the bugs away! 📷🐛

* Clean up

* More renaming

* Fix test

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
Pierre Jacquier
2025-04-03 14:38:52 -04:00
committed by GitHub
parent 65e08bea92
commit 716ed3acb3
8 changed files with 14 additions and 14 deletions

View File

@ -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()

View File

@ -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 }) => {

View File

@ -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()
})
}

View File

@ -351,7 +351,7 @@ const extrudeDefaultPlane = async (
},
},
project: {
default_project_name: 'project-$nnn',
default_project_name: 'untitled',
},
text_editor: {
text_wrapping: true,

View File

@ -23,7 +23,7 @@ export const TEST_SETTINGS: DeepPartial<Settings> = {
camera_projection: 'perspective',
},
project: {
default_project_name: 'project-$nnn',
default_project_name: 'untitled',
directory: '',
},
text_editor: {

View File

@ -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'
)
})

View File

@ -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()

View File

@ -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'