Skip to content

Commit

Permalink
- Rename tooltip from Download to Export.
Browse files Browse the repository at this point in the history
- Lose the Open in Editor button when running.
- Group New Create Buttons.
- Settings should be Properties.
- Remove the Edit Description menu entry and shortcut.
  • Loading branch information
jdunkerley committed Mar 6, 2025
1 parent 0ef479b commit 878036c
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 48 deletions.
6 changes: 3 additions & 3 deletions app/common/src/text/english.json
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,6 @@
"startTrial": "Start Trial",
"trialDescription": "Start a $0-day free trial",
"downgradeDescription": "Looking for downgrade options?",
"settings": "Settings",
"cloud": "Cloud",
"local": "Local",
"category": "Category",
Expand Down Expand Up @@ -356,9 +355,11 @@
"newFolder": "New Folder",
"newProject": "New Project",
"uploadFiles": "Import",
"downloadFiles": "Download",
"downloadFiles": "Export",
"newDatalink": "New Datalink",
"newDatalinkOnlyCloud": "New Datalink - only available in the cloud",
"newSecret": "New Secret",
"newSecretOnlyCloud": "New Secret - only available in the cloud",
"newLabel": "New Label",
"newEmptyProject": "New Project",

Expand Down Expand Up @@ -815,7 +816,6 @@
"uploadToCloudShortcut": "Upload to Cloud",
"renameShortcut": "Rename",
"editShortcut": "Edit",
"editDescriptionShortcut": "Edit Description",
"snapshotShortcut": "Snapshot",
"deleteShortcut": "Delete",
"undeleteShortcut": "Restore From Trash",
Expand Down
1 change: 0 additions & 1 deletion app/gui/src/dashboard/components/MenuEntry.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ export const ACTION_TO_TEXT_ID: Readonly<
uploadToCloud: 'uploadToCloudShortcut',
rename: 'renameShortcut',
edit: 'editShortcut',
editDescription: 'editDescriptionShortcut',
snapshot: 'snapshotShortcut',
delete: 'deleteShortcut',
undelete: 'undeleteShortcut',
Expand Down
19 changes: 0 additions & 19 deletions app/gui/src/dashboard/components/dashboard/ProjectIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/** @file An interactive button indicating the status of a project. */
import * as reactQuery from '@tanstack/react-query'

import ArrowUpIcon from '#/assets/arrow_up.svg'
import PlayIcon from '#/assets/play.svg'
import StopIcon from '#/assets/stop.svg'

Expand Down Expand Up @@ -83,7 +82,6 @@ export default function ProjectIcon(props: ProjectIconProps) {

const openProject = projectHooks.useOpenProject()
const closeProject = projectHooks.useCloseProject()
const openProjectTab = projectHooks.useOpenEditor()

const { user } = authProvider.useFullUserSession()
const { getText } = textProvider.useText()
Expand Down Expand Up @@ -163,9 +161,6 @@ export default function ProjectIcon(props: ProjectIconProps) {
const doCloseProject = useEventCallback(() => {
closeProject({ ...item, type: backend.type })
})
const doOpenProjectTab = useEventCallback(() => {
openProjectTab(item.id)
})

const getTooltip = (defaultTooltip: string) =>
disabledTooltip ?? userOpeningProjectTooltip ?? defaultTooltip
Expand Down Expand Up @@ -241,20 +236,6 @@ export default function ProjectIcon(props: ProjectIconProps) {
)}
/>
</div>

{!isOtherUserUsingProject && !isRunningInBackground && (
<ariaComponents.Button
size="large"
variant="icon"
extraClickZone="xsmall"
icon={ArrowUpIcon}
aria-label={getTooltip(getText('openInEditor'))}
isDisabled={isDisabled}
tooltipPlacement="right"
onPress={doOpenProjectTab}
testId="switch-to-project"
/>
)}
</div>
)
}
Expand Down
1 change: 0 additions & 1 deletion app/gui/src/dashboard/configurations/inputBindings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ export const BINDINGS = inputBindings.defineBindings({
rename: { name: 'Rename', bindings: ['Mod+R'], icon: PenIcon },
edit: { name: 'Edit', bindings: ['Mod+E'], icon: PenIcon },
snapshot: { name: 'Snapshot', bindings: ['Mod+S'], icon: CameraIcon },
editDescription: { name: 'Edit Description', bindings: ['Mod+Shift+E'], icon: PenIcon },
delete: {
name: 'Delete',
bindings: ['OsDelete'],
Expand Down
15 changes: 0 additions & 15 deletions app/gui/src/dashboard/layouts/AssetContextMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -372,21 +372,6 @@ export default function AssetContextMenu(props: AssetContextMenuProps) {
}}
/>
)}
{isCloud && (
<ContextMenuEntry
hidden={hidden}
action="editDescription"
label={getText('editDescriptionShortcut')}
doAction={() => {
setIsAssetPanelTemporarilyVisible(true)
setAssetPanelProps({
backend,
item: asset,
spotlightOn: 'description',
})
}}
/>
)}
{isCloud && (
<ContextMenuEntry
hidden={hidden}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ function AssetPropertiesInternal(props: AssetPropertiesInternalProps) {
level={2}
className="h-side-panel-heading py-side-panel-heading-y text-lg leading-snug"
>
{getText('settings')}
{getText('properties')}
</Heading>
<table>
<tbody>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,13 +220,30 @@ export function DriveBarToolbar(props: DriveBarToolbarProps) {

<div className="flex h-row items-center gap-4 rounded-full border-0.5 border-primary/20 px-[11px]">
<Button
variant="icon"
size="medium"
icon={AddFolderIcon}
aria-label={getText('newFolder')}
onPress={() => newFolder(currentDirectoryId)}
/>

variant="icon"
size="medium"
icon={AddFolderIcon}
aria-label={getText('newFolder')}
onPress={() => newFolder(currentDirectoryId)}
/>
{!isCloud && (
<Button
isDisabled={true}
variant="icon"
size="medium"
icon={AddKeyIcon}
aria-label={getText('newSecretOnlyCloud')}
/>
)}
{!isCloud && (
<Button
isDisabled={true}
variant="icon"
size="medium"
icon={AddDatalinkIcon}
aria-label={getText('newDatalinkOnlyCloud')}
/>
)}
{isCloud && (
<DialogTrigger>
<Button
Expand All @@ -244,7 +261,6 @@ export function DriveBarToolbar(props: DriveBarToolbarProps) {
/>
</DialogTrigger>
)}

{isCloud && (
<DialogTrigger>
<Button
Expand All @@ -260,6 +276,9 @@ export function DriveBarToolbar(props: DriveBarToolbarProps) {
/>
</DialogTrigger>
)}
</div>

<div className="flex h-row items-center gap-4 rounded-full border-0.5 border-primary/20 px-[11px]">
<Button
variant="icon"
size="medium"
Expand Down

0 comments on commit 878036c

Please sign in to comment.