2023-08-31 08:17:52 -04:00
|
|
|
import { Popover, Transition } from '@headlessui/react'
|
2025-04-01 15:31:19 -07:00
|
|
|
import { useSelector } from '@xstate/react'
|
2025-04-01 23:54:26 -07:00
|
|
|
import { Fragment, useContext, useMemo } from 'react'
|
|
|
|
import { Link, useLocation, useNavigate } from 'react-router-dom'
|
|
|
|
import type { SnapshotFrom } from 'xstate'
|
|
|
|
|
|
|
|
import type { ActionButtonProps } from '@src/components/ActionButton'
|
|
|
|
import { ActionButton } from '@src/components/ActionButton'
|
|
|
|
import { CustomIcon } from '@src/components/CustomIcon'
|
|
|
|
import { Logo } from '@src/components/Logo'
|
|
|
|
import { useLspContext } from '@src/components/LspProvider'
|
|
|
|
import { MachineManagerContext } from '@src/components/MachineManagerProvider'
|
|
|
|
import Tooltip from '@src/components/Tooltip'
|
|
|
|
import { useAbsoluteFilePath } from '@src/hooks/useAbsoluteFilePath'
|
|
|
|
import usePlatform from '@src/hooks/usePlatform'
|
|
|
|
import { APP_NAME } from '@src/lib/constants'
|
|
|
|
import { isDesktop } from '@src/lib/isDesktop'
|
|
|
|
import { copyFileShareLink } from '@src/lib/links'
|
|
|
|
import { PATHS } from '@src/lib/paths'
|
|
|
|
import {
|
|
|
|
codeManager,
|
|
|
|
engineCommandManager,
|
|
|
|
kclManager,
|
|
|
|
} from '@src/lib/singletons'
|
|
|
|
import { type IndexLoaderData } from '@src/lib/types'
|
|
|
|
import { useToken } from '@src/machines/appMachine'
|
|
|
|
import { commandBarActor } from '@src/machines/commandBarMachine'
|
2023-08-18 10:27:01 -04:00
|
|
|
|
|
|
|
const ProjectSidebarMenu = ({
|
|
|
|
project,
|
2023-10-16 13:28:41 -04:00
|
|
|
file,
|
2024-05-20 14:59:59 -04:00
|
|
|
enableMenu = false,
|
2023-08-18 10:27:01 -04:00
|
|
|
}: {
|
2024-05-20 14:59:59 -04:00
|
|
|
enableMenu?: boolean
|
2023-10-16 13:28:41 -04:00
|
|
|
project?: IndexLoaderData['project']
|
|
|
|
file?: IndexLoaderData['file']
|
2023-08-18 10:27:01 -04:00
|
|
|
}) => {
|
2024-08-25 12:56:11 -07:00
|
|
|
// Make room for traffic lights on desktop left side.
|
|
|
|
// TODO: make sure this doesn't look like shit on Linux or Windows
|
|
|
|
const trafficLightsOffset =
|
|
|
|
isDesktop() && window.electron.os.isMac ? 'ml-20' : ''
|
2024-03-08 17:59:14 -05:00
|
|
|
return (
|
2024-08-25 12:56:11 -07:00
|
|
|
<div
|
|
|
|
className={
|
|
|
|
'!no-underline h-full mr-auto max-h-min min-h-12 min-w-max flex items-center gap-2 ' +
|
|
|
|
trafficLightsOffset
|
|
|
|
}
|
|
|
|
>
|
2024-05-20 14:59:59 -04:00
|
|
|
<AppLogoLink project={project} file={file} />
|
|
|
|
{enableMenu ? (
|
2024-03-08 17:59:14 -05:00
|
|
|
<ProjectMenuPopover project={project} file={file} />
|
2024-05-20 14:59:59 -04:00
|
|
|
) : (
|
|
|
|
<span
|
|
|
|
className="hidden select-none cursor-default text-sm text-chalkboard-110 dark:text-chalkboard-20 whitespace-nowrap lg:block"
|
|
|
|
data-testid="project-name"
|
|
|
|
>
|
|
|
|
{project?.name ? project.name : APP_NAME}
|
|
|
|
</span>
|
2024-03-08 17:59:14 -05:00
|
|
|
)}
|
|
|
|
</div>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
2024-05-20 14:59:59 -04:00
|
|
|
function AppLogoLink({
|
|
|
|
project,
|
|
|
|
file,
|
|
|
|
}: {
|
|
|
|
project?: IndexLoaderData['project']
|
|
|
|
file?: IndexLoaderData['file']
|
|
|
|
}) {
|
|
|
|
const { onProjectClose } = useLspContext()
|
|
|
|
const wrapperClassName =
|
|
|
|
"relative h-full grid place-content-center group p-1.5 before:block before:content-[''] before:absolute before:inset-0 before:bottom-2.5 before:z-[-1] before:bg-primary before:rounded-b-sm"
|
|
|
|
const logoClassName = 'w-auto h-4 text-chalkboard-10'
|
|
|
|
|
2024-08-16 07:15:42 -04:00
|
|
|
return isDesktop() ? (
|
2024-05-20 14:59:59 -04:00
|
|
|
<Link
|
|
|
|
data-testid="app-logo"
|
|
|
|
onClick={() => {
|
|
|
|
onProjectClose(file || null, project?.path || null, false)
|
2024-12-06 14:56:53 -08:00
|
|
|
kclManager.switchedFiles = true
|
2024-05-20 14:59:59 -04:00
|
|
|
}}
|
2024-08-09 02:47:25 -04:00
|
|
|
to={PATHS.HOME}
|
2024-05-20 14:59:59 -04:00
|
|
|
className={wrapperClassName + ' hover:before:brightness-110'}
|
|
|
|
>
|
|
|
|
<Logo className={logoClassName} />
|
|
|
|
<span className="sr-only">{APP_NAME}</span>
|
|
|
|
</Link>
|
|
|
|
) : (
|
|
|
|
<div className={wrapperClassName} data-testid="app-logo">
|
|
|
|
<Logo className={logoClassName} />
|
|
|
|
<span className="sr-only">{APP_NAME}</span>
|
|
|
|
</div>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
2025-01-23 10:25:21 -05:00
|
|
|
const commandsSelector = (state: SnapshotFrom<typeof commandBarActor>) =>
|
|
|
|
state.context.commands
|
|
|
|
|
2024-03-08 17:59:14 -05:00
|
|
|
function ProjectMenuPopover({
|
|
|
|
project,
|
|
|
|
file,
|
|
|
|
}: {
|
|
|
|
project?: IndexLoaderData['project']
|
|
|
|
file?: IndexLoaderData['file']
|
|
|
|
}) {
|
2024-07-18 14:29:15 -04:00
|
|
|
const platform = usePlatform()
|
|
|
|
const location = useLocation()
|
|
|
|
const navigate = useNavigate()
|
|
|
|
const filePath = useAbsoluteFilePath()
|
2025-01-31 14:47:08 -05:00
|
|
|
const token = useToken()
|
2024-10-25 19:28:10 -04:00
|
|
|
const machineManager = useContext(MachineManagerContext)
|
2025-01-23 10:25:21 -05:00
|
|
|
const commands = useSelector(commandBarActor, commandsSelector)
|
2024-10-25 19:28:10 -04:00
|
|
|
|
2024-03-11 17:50:31 -07:00
|
|
|
const { onProjectClose } = useLspContext()
|
2025-04-07 16:28:11 -04:00
|
|
|
const insertCommandInfo = { name: 'Insert', groupId: 'code' }
|
2024-07-11 18:10:47 -04:00
|
|
|
const exportCommandInfo = { name: 'Export', groupId: 'modeling' }
|
2024-08-04 00:51:30 -04:00
|
|
|
const makeCommandInfo = { name: 'Make', groupId: 'modeling' }
|
2025-02-03 10:03:41 -05:00
|
|
|
const shareCommandInfo = { name: 'share-file-link', groupId: 'code' }
|
2024-07-11 18:10:47 -04:00
|
|
|
const findCommand = (obj: { name: string; groupId: string }) =>
|
2024-04-04 19:15:26 -04:00
|
|
|
Boolean(
|
2025-01-23 10:25:21 -05:00
|
|
|
commands.find((c) => c.name === obj.name && c.groupId === obj.groupId)
|
2024-04-04 19:15:26 -04:00
|
|
|
)
|
2024-10-25 19:28:10 -04:00
|
|
|
const machineCount = machineManager.machines.length
|
2024-03-04 16:06:43 -05:00
|
|
|
|
2024-07-18 14:29:15 -04:00
|
|
|
// We filter this memoized list so that no orphan "break" elements are rendered.
|
|
|
|
const projectMenuItems = useMemo<(ActionButtonProps | 'break')[]>(
|
|
|
|
() =>
|
|
|
|
[
|
|
|
|
{
|
|
|
|
id: 'settings',
|
|
|
|
Element: 'button',
|
|
|
|
children: (
|
|
|
|
<>
|
|
|
|
<span className="flex-1">Project settings</span>
|
|
|
|
<kbd className="hotkey">{`${platform === 'macos' ? '⌘' : 'Ctrl'}${
|
2024-08-16 07:15:42 -04:00
|
|
|
isDesktop() ? '' : '⬆'
|
2024-07-18 14:29:15 -04:00
|
|
|
},`}</kbd>
|
|
|
|
</>
|
|
|
|
),
|
|
|
|
onClick: () => {
|
2024-08-09 02:47:25 -04:00
|
|
|
const targetPath = location.pathname.includes(PATHS.FILE)
|
|
|
|
? filePath + PATHS.SETTINGS_PROJECT
|
|
|
|
: PATHS.HOME + PATHS.SETTINGS_PROJECT
|
|
|
|
navigate(targetPath)
|
2024-07-18 14:29:15 -04:00
|
|
|
},
|
|
|
|
},
|
|
|
|
'break',
|
2025-04-07 16:28:11 -04:00
|
|
|
{
|
|
|
|
id: 'insert',
|
|
|
|
Element: 'button',
|
|
|
|
children: (
|
|
|
|
<>
|
|
|
|
<span>Insert from project file</span>
|
|
|
|
{!findCommand(insertCommandInfo) && (
|
|
|
|
<Tooltip
|
|
|
|
position="right"
|
|
|
|
wrapperClassName="!max-w-none min-w-fit"
|
|
|
|
>
|
|
|
|
Awaiting engine connection
|
|
|
|
</Tooltip>
|
|
|
|
)}
|
|
|
|
</>
|
|
|
|
),
|
|
|
|
disabled: !findCommand(insertCommandInfo),
|
|
|
|
onClick: () =>
|
|
|
|
commandBarActor.send({
|
|
|
|
type: 'Find and select command',
|
|
|
|
data: insertCommandInfo,
|
|
|
|
}),
|
|
|
|
},
|
2024-07-18 14:29:15 -04:00
|
|
|
{
|
|
|
|
id: 'export',
|
|
|
|
Element: 'button',
|
|
|
|
children: (
|
|
|
|
<>
|
|
|
|
<span>Export current part</span>
|
|
|
|
{!findCommand(exportCommandInfo) && (
|
2024-07-24 23:33:31 -04:00
|
|
|
<Tooltip
|
|
|
|
position="right"
|
|
|
|
wrapperClassName="!max-w-none min-w-fit"
|
|
|
|
>
|
2024-07-18 14:29:15 -04:00
|
|
|
Awaiting engine connection
|
|
|
|
</Tooltip>
|
|
|
|
)}
|
|
|
|
</>
|
|
|
|
),
|
|
|
|
disabled: !findCommand(exportCommandInfo),
|
|
|
|
onClick: () =>
|
2025-01-23 10:25:21 -05:00
|
|
|
commandBarActor.send({
|
2024-07-18 14:29:15 -04:00
|
|
|
type: 'Find and select command',
|
|
|
|
data: exportCommandInfo,
|
|
|
|
}),
|
|
|
|
},
|
2024-08-04 00:51:30 -04:00
|
|
|
{
|
|
|
|
id: 'make',
|
|
|
|
Element: 'button',
|
2024-08-16 07:15:42 -04:00
|
|
|
className: !isDesktop() ? 'hidden' : '',
|
2024-08-04 00:51:30 -04:00
|
|
|
children: (
|
|
|
|
<>
|
|
|
|
<span>Make current part</span>
|
|
|
|
{!findCommand(makeCommandInfo) && (
|
|
|
|
<Tooltip
|
|
|
|
position="right"
|
|
|
|
wrapperClassName="!max-w-none min-w-fit"
|
|
|
|
>
|
|
|
|
Awaiting engine connection
|
|
|
|
</Tooltip>
|
|
|
|
)}
|
|
|
|
</>
|
|
|
|
),
|
|
|
|
disabled: !findCommand(makeCommandInfo) || machineCount === 0,
|
|
|
|
onClick: () => {
|
2025-01-23 10:25:21 -05:00
|
|
|
commandBarActor.send({
|
2024-08-04 00:51:30 -04:00
|
|
|
type: 'Find and select command',
|
|
|
|
data: makeCommandInfo,
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
Add ability to create and open URLs to create files (#4166)
* Rename `homeMachine` and accessories to `projectsMachine`
* Separate out `/home` route from `projectsMachine`
* Add logic to navigate out from deleted or renamed project
* Show a warning in the command palette for deleting a project
* Make it navigate when you create a project
* Update "New project" button to use command bar flow
Closes #2585
* More explicit warning message text
* Make projects watching code not run in web
* Tests first version: nested loops
* Tests second version: flattened
* Remove console logs
* Fix tsc
* @jtran feedback, use the type guard util
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* Fix tests that relied on one-click, no-navigation project creation
* Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)"
This reverts commit 7545b61b49dd35cbd229aa5c35273d52e5db8739.
* Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)"
This reverts commit 3d2e48732c588b9964502b6590da139c1a0d91b0.
* Add a mask to the state indicator to client-side scale test
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* Fix lint
* Fix tsc
* Add menu item to share link to file
* Forward query params while redirecting to /home or /file
* Add (broken) event logic and command triggering logic
* Fix a couple stray tests that still relied on the old way of creating projects
* De-flake another text that could be thrown off by toast-based selectors
* FMT
* Dumb test error because I was rushing
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* Ahhh more flaky toasts, they're everywhere!
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* Side quest: Only register commands once, power their disabled status while selecting commands via optional actor
* Get query-triggered command working in browser too
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* Tests always run on localhost, don't expect the prod origin
* rerun CI
* wip
* wip
* Everything's pretty much done but url.zoo.dev has been broken and we need to think about how to test reliably
* Merge branch 'main' into franknoirot/4088/create-file-url
* Add useCreateFileLinkQuery on Home page
* Get primary user flow working on desktop
* Rework to open browser app first, then send along to the desktop app if asked
* Styling updates to OpenInDesktopAppHandler
* Clean up unecessary file
* Merge branch 'main' into franknoirot/4088/create-file-url
* Separate creating `createFileUrl` and shortlink so it is unit testable
* Add E2E test for importing file from URL
* Add a couple component tests for OpenInDesktopAppHandler
* Fix the "existing project" user flow
* Add E2E test for "add to existing project" user flow
* Undo mistaken or unecessary changes
* Lints, fmt, tsc
* Fix unit test
* Fix broken rename and delete project commands
Something about the `optionsFromContext` config no longer works with file I/O-related commands. I suspect this has to do with our read/write loop patching
* Fix unit test, use kebab-case for url query param
* Use dev urls everywhere when configured that way
I think we were just using some constants that ended up returning bad
values for dev, it seemed to return a working shortlink when I went
through the flow.
* Clean up unneeded PROD_TOKEN
* Fix browser command flow, because we had made the projectMachine desktop-only on main
* Make the test executor a bit more patient (#5004)
* Fix so that all artifact commands are returned regardless of caching (#5005)
* Fix so that all artifact commands are returned regardless of caching
* Add some more docs and fix up old ones
* Add new lint to disallow use of confusing isNaN (#4999)
* Point-and-click Sweep (first PR) (#4989)
* Refactor 'Delete selection' as actor
Will fix #4662
* WIP logging
* WIP: working Solid3dGetExtrusionFaceInfo for loft
* Working wall deletion of loft
* Add offset plane deletion
* Add feature tree deletion of shell
* Clean up
* Revert "Clean up"
This reverts commit 214763cc2bdf6227d8d8abda0f600f4ec5399327.
* Clean up rust changes, taking the sketch with the most paths
* Working cap selection and deletion
* Clean up
* Add test for loft and offset plane deletion via selection
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-macos-8-cores)
* Set reenter: false as it was originally
* Passing test
* Add shell deletion via feature tree test
* Revert the migration to promise actor
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* Trigger CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* Trigger CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* Trigger CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* Trigger CI
* Use cmd.id as solid_id after latest engine merge
* Add feature tree deletion of offset plane and fix lint
* Add feature tree deletion of loft
* Clean up
* Better comment
* Lint fix
* Remove sketch sorting
* WIP: sweep point-and-click
* Working sweep
* Add test
* Make sweep a development command
* Fix tsc error
* Clean up for review
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Upgrade typescript-eslint from 5.62.0 to 8.19.1 and remove eslint-config-react-app (#5006)
* Fix lost lints and add new ones (#5011)
* Add eslint-plugin-jsx-a11y dependency
* Add jsx-a11y lint
* Add eslint-plugin-react-hooks dependency
* Add react hooks lints
* Ignore new react hooks lint in tests
* Add eslint-plugin-testing-library dependency
* Add testing-library lint
* Fix yarn lint to use all files recursively
* Developer workflow: added auto generated workspace file from vitest extension in vscode (#4997)
* chore: added auto generated workspace file from vitest extension in vscode
* fix: auto fmt fixes
* Change Dependabot PRs to always be made on Mondays (#5025)
* Add packages to Dependabot updates (#5024)
* Bump @lezer/generator from 1.7.1 to 1.7.2 (#5018)
Bumps [@lezer/generator](https://github.com/lezer-parser/generator) from 1.7.1 to 1.7.2.
- [Changelog](https://github.com/lezer-parser/generator/blob/main/CHANGELOG.md)
- [Commits](https://github.com/lezer-parser/generator/compare/1.7.1...1.7.2)
---
updated-dependencies:
- dependency-name: "@lezer/generator"
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump handlebars from 6.2.0 to 6.3.0 in /src/wasm-lib (#5012)
Bumps [handlebars](https://github.com/sunng87/handlebars-rust) from 6.2.0 to 6.3.0.
- [Release notes](https://github.com/sunng87/handlebars-rust/releases)
- [Changelog](https://github.com/sunng87/handlebars-rust/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sunng87/handlebars-rust/compare/v6.2.0...v6.3.0)
---
updated-dependencies:
- dependency-name: handlebars
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump syn from 2.0.95 to 2.0.96 in /src/wasm-lib (#5015)
Bumps [syn](https://github.com/dtolnay/syn) from 2.0.95 to 2.0.96.
- [Release notes](https://github.com/dtolnay/syn/releases)
- [Commits](https://github.com/dtolnay/syn/compare/2.0.95...2.0.96)
---
updated-dependencies:
- dependency-name: syn
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Fix artifact types to be more accurate (#5022)
* Fix Cargo.lock to not have changes (#5034)
* Upgrade all wasm-bindgen dependencies together (#5037)
* Disable auto-updater on non-versioned builds (#5042)
* turns on helix from edge (#5036)
* updates for new lib
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* autocomplete
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* bump version
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* bump all the things
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* new samples
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* docs
Signed-off-by: Jess Frazelle <github@jessfraz.com>
---------
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* ci: Add yarn test of packages/codemirror-lang-kcl (#5035)
* ci: Add yarn test of packages/codemirror-lang-kcl
* Fix CI error running tests
* Fix postcss config error
* Bump xstate from 5.17.4 to 5.19.2 (#5027)
* Hook up chamfer UI with AST-mod (#4694)
* button
* config
* hook up with ast
* cmd bar test
* button states fix and test
* little naming fix
* xState action to actor
* remove button state test updates
* fixture-based approach
* nightly
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Update src/lib/toolbar.ts
Co-authored-by: Frank Noirot <frank@zoo.dev>
---------
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
Co-authored-by: Frank Noirot <frank@zoo.dev>
* Remove Redundant Fillet Button State Test (#5009)
delete obsolete test
* Bump @types/node from 20.14.9 to 22.10.6 in /packages/codemirror-lsp-client (#5041)
* custom axis and origin example for helix (#5057)
* custom axis and origin for helix
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* empty
---------
Signed-off-by: Jess Frazelle <github@jessfraz.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Bump typescript from 5.7.2 to 5.7.3 (#5021)
Bumps [typescript](https://github.com/microsoft/TypeScript) from 5.7.2 to 5.7.3.
- [Release notes](https://github.com/microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](https://github.com/microsoft/TypeScript/compare/v5.7.2...v5.7.3)
---
updated-dependencies:
- dependency-name: typescript
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Refactor: break out `copyFileShareLink` into standalone function
* Add "Share file" to command palette
* Update dumb use of site URL instead of prod app URL
* fmt
* @lf94 nit
* @pierremtb spinner feedback
* Hide share link command and disable menu item for now
* Just comment out the command config for now
---------
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Jess Frazelle <github@jessfraz.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: 49lf <ircsurfer33@gmail.com>
Co-authored-by: Adam Sunderland <iterion@gmail.com>
Co-authored-by: Adam Sunderland <adam@kittycad.io>
Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
Co-authored-by: Kevin Nadro <nadr0@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
Co-authored-by: max <margorskyi@gmail.com>
2025-01-23 19:18:27 -05:00
|
|
|
{
|
|
|
|
id: 'share-link',
|
|
|
|
Element: 'button',
|
2025-04-21 15:08:51 -04:00
|
|
|
children: 'Share part via Zoo link',
|
2025-02-11 16:06:24 -05:00
|
|
|
disabled: !findCommand(shareCommandInfo),
|
Add ability to create and open URLs to create files (#4166)
* Rename `homeMachine` and accessories to `projectsMachine`
* Separate out `/home` route from `projectsMachine`
* Add logic to navigate out from deleted or renamed project
* Show a warning in the command palette for deleting a project
* Make it navigate when you create a project
* Update "New project" button to use command bar flow
Closes #2585
* More explicit warning message text
* Make projects watching code not run in web
* Tests first version: nested loops
* Tests second version: flattened
* Remove console logs
* Fix tsc
* @jtran feedback, use the type guard util
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* Fix tests that relied on one-click, no-navigation project creation
* Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)"
This reverts commit 7545b61b49dd35cbd229aa5c35273d52e5db8739.
* Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)"
This reverts commit 3d2e48732c588b9964502b6590da139c1a0d91b0.
* Add a mask to the state indicator to client-side scale test
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* Fix lint
* Fix tsc
* Add menu item to share link to file
* Forward query params while redirecting to /home or /file
* Add (broken) event logic and command triggering logic
* Fix a couple stray tests that still relied on the old way of creating projects
* De-flake another text that could be thrown off by toast-based selectors
* FMT
* Dumb test error because I was rushing
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* Ahhh more flaky toasts, they're everywhere!
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* Side quest: Only register commands once, power their disabled status while selecting commands via optional actor
* Get query-triggered command working in browser too
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* Tests always run on localhost, don't expect the prod origin
* rerun CI
* wip
* wip
* Everything's pretty much done but url.zoo.dev has been broken and we need to think about how to test reliably
* Merge branch 'main' into franknoirot/4088/create-file-url
* Add useCreateFileLinkQuery on Home page
* Get primary user flow working on desktop
* Rework to open browser app first, then send along to the desktop app if asked
* Styling updates to OpenInDesktopAppHandler
* Clean up unecessary file
* Merge branch 'main' into franknoirot/4088/create-file-url
* Separate creating `createFileUrl` and shortlink so it is unit testable
* Add E2E test for importing file from URL
* Add a couple component tests for OpenInDesktopAppHandler
* Fix the "existing project" user flow
* Add E2E test for "add to existing project" user flow
* Undo mistaken or unecessary changes
* Lints, fmt, tsc
* Fix unit test
* Fix broken rename and delete project commands
Something about the `optionsFromContext` config no longer works with file I/O-related commands. I suspect this has to do with our read/write loop patching
* Fix unit test, use kebab-case for url query param
* Use dev urls everywhere when configured that way
I think we were just using some constants that ended up returning bad
values for dev, it seemed to return a working shortlink when I went
through the flow.
* Clean up unneeded PROD_TOKEN
* Fix browser command flow, because we had made the projectMachine desktop-only on main
* Make the test executor a bit more patient (#5004)
* Fix so that all artifact commands are returned regardless of caching (#5005)
* Fix so that all artifact commands are returned regardless of caching
* Add some more docs and fix up old ones
* Add new lint to disallow use of confusing isNaN (#4999)
* Point-and-click Sweep (first PR) (#4989)
* Refactor 'Delete selection' as actor
Will fix #4662
* WIP logging
* WIP: working Solid3dGetExtrusionFaceInfo for loft
* Working wall deletion of loft
* Add offset plane deletion
* Add feature tree deletion of shell
* Clean up
* Revert "Clean up"
This reverts commit 214763cc2bdf6227d8d8abda0f600f4ec5399327.
* Clean up rust changes, taking the sketch with the most paths
* Working cap selection and deletion
* Clean up
* Add test for loft and offset plane deletion via selection
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-macos-8-cores)
* Set reenter: false as it was originally
* Passing test
* Add shell deletion via feature tree test
* Revert the migration to promise actor
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* Trigger CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* Trigger CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* Trigger CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* Trigger CI
* Use cmd.id as solid_id after latest engine merge
* Add feature tree deletion of offset plane and fix lint
* Add feature tree deletion of loft
* Clean up
* Better comment
* Lint fix
* Remove sketch sorting
* WIP: sweep point-and-click
* Working sweep
* Add test
* Make sweep a development command
* Fix tsc error
* Clean up for review
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Upgrade typescript-eslint from 5.62.0 to 8.19.1 and remove eslint-config-react-app (#5006)
* Fix lost lints and add new ones (#5011)
* Add eslint-plugin-jsx-a11y dependency
* Add jsx-a11y lint
* Add eslint-plugin-react-hooks dependency
* Add react hooks lints
* Ignore new react hooks lint in tests
* Add eslint-plugin-testing-library dependency
* Add testing-library lint
* Fix yarn lint to use all files recursively
* Developer workflow: added auto generated workspace file from vitest extension in vscode (#4997)
* chore: added auto generated workspace file from vitest extension in vscode
* fix: auto fmt fixes
* Change Dependabot PRs to always be made on Mondays (#5025)
* Add packages to Dependabot updates (#5024)
* Bump @lezer/generator from 1.7.1 to 1.7.2 (#5018)
Bumps [@lezer/generator](https://github.com/lezer-parser/generator) from 1.7.1 to 1.7.2.
- [Changelog](https://github.com/lezer-parser/generator/blob/main/CHANGELOG.md)
- [Commits](https://github.com/lezer-parser/generator/compare/1.7.1...1.7.2)
---
updated-dependencies:
- dependency-name: "@lezer/generator"
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump handlebars from 6.2.0 to 6.3.0 in /src/wasm-lib (#5012)
Bumps [handlebars](https://github.com/sunng87/handlebars-rust) from 6.2.0 to 6.3.0.
- [Release notes](https://github.com/sunng87/handlebars-rust/releases)
- [Changelog](https://github.com/sunng87/handlebars-rust/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sunng87/handlebars-rust/compare/v6.2.0...v6.3.0)
---
updated-dependencies:
- dependency-name: handlebars
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump syn from 2.0.95 to 2.0.96 in /src/wasm-lib (#5015)
Bumps [syn](https://github.com/dtolnay/syn) from 2.0.95 to 2.0.96.
- [Release notes](https://github.com/dtolnay/syn/releases)
- [Commits](https://github.com/dtolnay/syn/compare/2.0.95...2.0.96)
---
updated-dependencies:
- dependency-name: syn
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Fix artifact types to be more accurate (#5022)
* Fix Cargo.lock to not have changes (#5034)
* Upgrade all wasm-bindgen dependencies together (#5037)
* Disable auto-updater on non-versioned builds (#5042)
* turns on helix from edge (#5036)
* updates for new lib
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* autocomplete
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* bump version
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* bump all the things
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* new samples
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* docs
Signed-off-by: Jess Frazelle <github@jessfraz.com>
---------
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* ci: Add yarn test of packages/codemirror-lang-kcl (#5035)
* ci: Add yarn test of packages/codemirror-lang-kcl
* Fix CI error running tests
* Fix postcss config error
* Bump xstate from 5.17.4 to 5.19.2 (#5027)
* Hook up chamfer UI with AST-mod (#4694)
* button
* config
* hook up with ast
* cmd bar test
* button states fix and test
* little naming fix
* xState action to actor
* remove button state test updates
* fixture-based approach
* nightly
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Update src/lib/toolbar.ts
Co-authored-by: Frank Noirot <frank@zoo.dev>
---------
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
Co-authored-by: Frank Noirot <frank@zoo.dev>
* Remove Redundant Fillet Button State Test (#5009)
delete obsolete test
* Bump @types/node from 20.14.9 to 22.10.6 in /packages/codemirror-lsp-client (#5041)
* custom axis and origin example for helix (#5057)
* custom axis and origin for helix
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* empty
---------
Signed-off-by: Jess Frazelle <github@jessfraz.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Bump typescript from 5.7.2 to 5.7.3 (#5021)
Bumps [typescript](https://github.com/microsoft/TypeScript) from 5.7.2 to 5.7.3.
- [Release notes](https://github.com/microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](https://github.com/microsoft/TypeScript/compare/v5.7.2...v5.7.3)
---
updated-dependencies:
- dependency-name: typescript
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Refactor: break out `copyFileShareLink` into standalone function
* Add "Share file" to command palette
* Update dumb use of site URL instead of prod app URL
* fmt
* @lf94 nit
* @pierremtb spinner feedback
* Hide share link command and disable menu item for now
* Just comment out the command config for now
---------
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Jess Frazelle <github@jessfraz.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: 49lf <ircsurfer33@gmail.com>
Co-authored-by: Adam Sunderland <iterion@gmail.com>
Co-authored-by: Adam Sunderland <adam@kittycad.io>
Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
Co-authored-by: Kevin Nadro <nadr0@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
Co-authored-by: max <margorskyi@gmail.com>
2025-01-23 19:18:27 -05:00
|
|
|
onClick: async () => {
|
|
|
|
await copyFileShareLink({
|
2025-01-31 14:47:08 -05:00
|
|
|
token: token ?? '',
|
Add ability to create and open URLs to create files (#4166)
* Rename `homeMachine` and accessories to `projectsMachine`
* Separate out `/home` route from `projectsMachine`
* Add logic to navigate out from deleted or renamed project
* Show a warning in the command palette for deleting a project
* Make it navigate when you create a project
* Update "New project" button to use command bar flow
Closes #2585
* More explicit warning message text
* Make projects watching code not run in web
* Tests first version: nested loops
* Tests second version: flattened
* Remove console logs
* Fix tsc
* @jtran feedback, use the type guard util
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* Fix tests that relied on one-click, no-navigation project creation
* Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)"
This reverts commit 7545b61b49dd35cbd229aa5c35273d52e5db8739.
* Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)"
This reverts commit 3d2e48732c588b9964502b6590da139c1a0d91b0.
* Add a mask to the state indicator to client-side scale test
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* Fix lint
* Fix tsc
* Add menu item to share link to file
* Forward query params while redirecting to /home or /file
* Add (broken) event logic and command triggering logic
* Fix a couple stray tests that still relied on the old way of creating projects
* De-flake another text that could be thrown off by toast-based selectors
* FMT
* Dumb test error because I was rushing
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* Ahhh more flaky toasts, they're everywhere!
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
* Side quest: Only register commands once, power their disabled status while selecting commands via optional actor
* Get query-triggered command working in browser too
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
* Tests always run on localhost, don't expect the prod origin
* rerun CI
* wip
* wip
* Everything's pretty much done but url.zoo.dev has been broken and we need to think about how to test reliably
* Merge branch 'main' into franknoirot/4088/create-file-url
* Add useCreateFileLinkQuery on Home page
* Get primary user flow working on desktop
* Rework to open browser app first, then send along to the desktop app if asked
* Styling updates to OpenInDesktopAppHandler
* Clean up unecessary file
* Merge branch 'main' into franknoirot/4088/create-file-url
* Separate creating `createFileUrl` and shortlink so it is unit testable
* Add E2E test for importing file from URL
* Add a couple component tests for OpenInDesktopAppHandler
* Fix the "existing project" user flow
* Add E2E test for "add to existing project" user flow
* Undo mistaken or unecessary changes
* Lints, fmt, tsc
* Fix unit test
* Fix broken rename and delete project commands
Something about the `optionsFromContext` config no longer works with file I/O-related commands. I suspect this has to do with our read/write loop patching
* Fix unit test, use kebab-case for url query param
* Use dev urls everywhere when configured that way
I think we were just using some constants that ended up returning bad
values for dev, it seemed to return a working shortlink when I went
through the flow.
* Clean up unneeded PROD_TOKEN
* Fix browser command flow, because we had made the projectMachine desktop-only on main
* Make the test executor a bit more patient (#5004)
* Fix so that all artifact commands are returned regardless of caching (#5005)
* Fix so that all artifact commands are returned regardless of caching
* Add some more docs and fix up old ones
* Add new lint to disallow use of confusing isNaN (#4999)
* Point-and-click Sweep (first PR) (#4989)
* Refactor 'Delete selection' as actor
Will fix #4662
* WIP logging
* WIP: working Solid3dGetExtrusionFaceInfo for loft
* Working wall deletion of loft
* Add offset plane deletion
* Add feature tree deletion of shell
* Clean up
* Revert "Clean up"
This reverts commit 214763cc2bdf6227d8d8abda0f600f4ec5399327.
* Clean up rust changes, taking the sketch with the most paths
* Working cap selection and deletion
* Clean up
* Add test for loft and offset plane deletion via selection
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-macos-8-cores)
* Set reenter: false as it was originally
* Passing test
* Add shell deletion via feature tree test
* Revert the migration to promise actor
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* Trigger CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* Trigger CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* Trigger CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* Trigger CI
* Use cmd.id as solid_id after latest engine merge
* Add feature tree deletion of offset plane and fix lint
* Add feature tree deletion of loft
* Clean up
* Better comment
* Lint fix
* Remove sketch sorting
* WIP: sweep point-and-click
* Working sweep
* Add test
* Make sweep a development command
* Fix tsc error
* Clean up for review
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Upgrade typescript-eslint from 5.62.0 to 8.19.1 and remove eslint-config-react-app (#5006)
* Fix lost lints and add new ones (#5011)
* Add eslint-plugin-jsx-a11y dependency
* Add jsx-a11y lint
* Add eslint-plugin-react-hooks dependency
* Add react hooks lints
* Ignore new react hooks lint in tests
* Add eslint-plugin-testing-library dependency
* Add testing-library lint
* Fix yarn lint to use all files recursively
* Developer workflow: added auto generated workspace file from vitest extension in vscode (#4997)
* chore: added auto generated workspace file from vitest extension in vscode
* fix: auto fmt fixes
* Change Dependabot PRs to always be made on Mondays (#5025)
* Add packages to Dependabot updates (#5024)
* Bump @lezer/generator from 1.7.1 to 1.7.2 (#5018)
Bumps [@lezer/generator](https://github.com/lezer-parser/generator) from 1.7.1 to 1.7.2.
- [Changelog](https://github.com/lezer-parser/generator/blob/main/CHANGELOG.md)
- [Commits](https://github.com/lezer-parser/generator/compare/1.7.1...1.7.2)
---
updated-dependencies:
- dependency-name: "@lezer/generator"
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump handlebars from 6.2.0 to 6.3.0 in /src/wasm-lib (#5012)
Bumps [handlebars](https://github.com/sunng87/handlebars-rust) from 6.2.0 to 6.3.0.
- [Release notes](https://github.com/sunng87/handlebars-rust/releases)
- [Changelog](https://github.com/sunng87/handlebars-rust/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sunng87/handlebars-rust/compare/v6.2.0...v6.3.0)
---
updated-dependencies:
- dependency-name: handlebars
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump syn from 2.0.95 to 2.0.96 in /src/wasm-lib (#5015)
Bumps [syn](https://github.com/dtolnay/syn) from 2.0.95 to 2.0.96.
- [Release notes](https://github.com/dtolnay/syn/releases)
- [Commits](https://github.com/dtolnay/syn/compare/2.0.95...2.0.96)
---
updated-dependencies:
- dependency-name: syn
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Fix artifact types to be more accurate (#5022)
* Fix Cargo.lock to not have changes (#5034)
* Upgrade all wasm-bindgen dependencies together (#5037)
* Disable auto-updater on non-versioned builds (#5042)
* turns on helix from edge (#5036)
* updates for new lib
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* autocomplete
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* bump version
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* bump all the things
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* new samples
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* docs
Signed-off-by: Jess Frazelle <github@jessfraz.com>
---------
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* ci: Add yarn test of packages/codemirror-lang-kcl (#5035)
* ci: Add yarn test of packages/codemirror-lang-kcl
* Fix CI error running tests
* Fix postcss config error
* Bump xstate from 5.17.4 to 5.19.2 (#5027)
* Hook up chamfer UI with AST-mod (#4694)
* button
* config
* hook up with ast
* cmd bar test
* button states fix and test
* little naming fix
* xState action to actor
* remove button state test updates
* fixture-based approach
* nightly
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Update src/lib/toolbar.ts
Co-authored-by: Frank Noirot <frank@zoo.dev>
---------
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
Co-authored-by: Frank Noirot <frank@zoo.dev>
* Remove Redundant Fillet Button State Test (#5009)
delete obsolete test
* Bump @types/node from 20.14.9 to 22.10.6 in /packages/codemirror-lsp-client (#5041)
* custom axis and origin example for helix (#5057)
* custom axis and origin for helix
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* empty
---------
Signed-off-by: Jess Frazelle <github@jessfraz.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Bump typescript from 5.7.2 to 5.7.3 (#5021)
Bumps [typescript](https://github.com/microsoft/TypeScript) from 5.7.2 to 5.7.3.
- [Release notes](https://github.com/microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](https://github.com/microsoft/TypeScript/compare/v5.7.2...v5.7.3)
---
updated-dependencies:
- dependency-name: typescript
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Refactor: break out `copyFileShareLink` into standalone function
* Add "Share file" to command palette
* Update dumb use of site URL instead of prod app URL
* fmt
* @lf94 nit
* @pierremtb spinner feedback
* Hide share link command and disable menu item for now
* Just comment out the command config for now
---------
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Jess Frazelle <github@jessfraz.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: 49lf <ircsurfer33@gmail.com>
Co-authored-by: Adam Sunderland <iterion@gmail.com>
Co-authored-by: Adam Sunderland <adam@kittycad.io>
Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
Co-authored-by: Kevin Nadro <nadr0@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
Co-authored-by: max <margorskyi@gmail.com>
2025-01-23 19:18:27 -05:00
|
|
|
code: codeManager.code,
|
|
|
|
name: project?.name || '',
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
2024-08-04 00:51:30 -04:00
|
|
|
'break',
|
2024-07-18 14:29:15 -04:00
|
|
|
{
|
|
|
|
id: 'go-home',
|
|
|
|
Element: 'button',
|
|
|
|
children: 'Go to Home',
|
2024-08-16 07:15:42 -04:00
|
|
|
className: !isDesktop() ? 'hidden' : '',
|
2024-07-18 14:29:15 -04:00
|
|
|
onClick: () => {
|
|
|
|
onProjectClose(file || null, project?.path || null, true)
|
2024-12-06 14:56:53 -08:00
|
|
|
kclManager.switchedFiles = true
|
2024-07-18 14:29:15 -04:00
|
|
|
},
|
|
|
|
},
|
|
|
|
].filter(
|
|
|
|
(props) =>
|
|
|
|
props === 'break' ||
|
|
|
|
(typeof props !== 'string' && !props.className?.includes('hidden'))
|
|
|
|
) as (ActionButtonProps | 'break')[],
|
|
|
|
[
|
|
|
|
platform,
|
|
|
|
findCommand,
|
2025-01-23 10:25:21 -05:00
|
|
|
commandBarActor.send,
|
2024-07-18 14:29:15 -04:00
|
|
|
engineCommandManager,
|
|
|
|
onProjectClose,
|
2024-08-16 07:15:42 -04:00
|
|
|
isDesktop,
|
2024-07-18 14:29:15 -04:00
|
|
|
]
|
|
|
|
)
|
|
|
|
|
2024-03-08 17:59:14 -05:00
|
|
|
return (
|
2023-08-18 10:27:01 -04:00
|
|
|
<Popover className="relative">
|
|
|
|
<Popover.Button
|
2025-01-02 16:10:07 -05:00
|
|
|
className="gap-1 rounded-sm h-9 mr-auto max-h-min min-w-max border-0 py-1 px-2 flex items-center focus-visible:outline-appForeground dark:hover:bg-chalkboard-90"
|
2023-08-18 10:27:01 -04:00
|
|
|
data-testid="project-sidebar-toggle"
|
|
|
|
>
|
2023-10-16 13:28:41 -04:00
|
|
|
<div className="flex flex-col items-start py-0.5">
|
2023-10-17 12:31:14 -04:00
|
|
|
<span className="hidden text-sm text-chalkboard-110 dark:text-chalkboard-20 whitespace-nowrap lg:block">
|
2024-08-16 07:15:42 -04:00
|
|
|
{isDesktop() && file?.name
|
|
|
|
? file.name.slice(
|
|
|
|
file.name.lastIndexOf(window.electron.path.sep) + 1
|
|
|
|
)
|
2023-12-18 06:15:26 -05:00
|
|
|
: APP_NAME}
|
2023-10-16 13:28:41 -04:00
|
|
|
</span>
|
2024-08-16 07:15:42 -04:00
|
|
|
{isDesktop() && project?.name && (
|
2023-10-17 12:31:14 -04:00
|
|
|
<span className="hidden text-xs text-chalkboard-70 dark:text-chalkboard-40 whitespace-nowrap lg:block">
|
2023-10-16 13:28:41 -04:00
|
|
|
{project.name}
|
|
|
|
</span>
|
|
|
|
)}
|
|
|
|
</div>
|
2024-07-18 14:29:15 -04:00
|
|
|
<CustomIcon
|
|
|
|
name="caretDown"
|
|
|
|
className="w-4 h-4 text-chalkboard-70 dark:text-chalkboard-40 ui-open:rotate-180"
|
|
|
|
/>
|
2023-08-18 10:27:01 -04:00
|
|
|
</Popover.Button>
|
|
|
|
|
2023-08-31 08:17:52 -04:00
|
|
|
<Transition
|
|
|
|
enter="duration-100 ease-out"
|
2024-07-18 14:29:15 -04:00
|
|
|
enterFrom="opacity-0 -translate-y-2"
|
|
|
|
enterTo="opacity-100 translate-y-0"
|
2023-08-31 08:17:52 -04:00
|
|
|
as={Fragment}
|
|
|
|
>
|
2023-10-16 13:28:41 -04:00
|
|
|
<Popover.Panel
|
2025-02-07 13:19:56 -05:00
|
|
|
className={`z-10 absolute top-full left-0 mt-1 pb-1 w-52 bg-chalkboard-10 dark:bg-chalkboard-90
|
2024-07-18 14:29:15 -04:00
|
|
|
border border-solid border-chalkboard-20 dark:border-chalkboard-90 rounded
|
|
|
|
shadow-lg`}
|
2023-10-16 13:28:41 -04:00
|
|
|
>
|
|
|
|
{({ close }) => (
|
2024-07-18 14:29:15 -04:00
|
|
|
<ul className="relative flex flex-col items-stretch content-stretch p-0.5">
|
|
|
|
{projectMenuItems.map((props, index) => {
|
|
|
|
if (props === 'break') {
|
|
|
|
return index !== projectMenuItems.length - 1 ? (
|
|
|
|
<li key={`break-${index}`} className="contents">
|
|
|
|
<hr className="border-chalkboard-20 dark:border-chalkboard-80" />
|
|
|
|
</li>
|
|
|
|
) : null
|
|
|
|
}
|
|
|
|
|
|
|
|
const { id, className, children, ...rest } = props
|
|
|
|
return (
|
|
|
|
<li key={id} className="contents">
|
|
|
|
<ActionButton
|
|
|
|
{...rest}
|
|
|
|
className={
|
|
|
|
'relative !font-sans flex items-center gap-2 rounded-sm py-1.5 px-2 cursor-pointer hover:bg-chalkboard-20 dark:hover:bg-chalkboard-80 border-none text-left ' +
|
|
|
|
className
|
|
|
|
}
|
|
|
|
onMouseUp={() => {
|
|
|
|
close()
|
|
|
|
}}
|
|
|
|
>
|
|
|
|
{children}
|
|
|
|
</ActionButton>
|
|
|
|
</li>
|
|
|
|
)
|
|
|
|
})}
|
|
|
|
</ul>
|
2023-10-16 13:28:41 -04:00
|
|
|
)}
|
2023-08-31 08:17:52 -04:00
|
|
|
</Popover.Panel>
|
|
|
|
</Transition>
|
2023-08-18 10:27:01 -04:00
|
|
|
</Popover>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
export default ProjectSidebarMenu
|