From d6971084476c9c5f459a1dedd5a7556cde4fdecb Mon Sep 17 00:00:00 2001 From: Andy Chen <44120813+achen5671@users.noreply.github.com> Date: Thu, 15 Aug 2024 13:08:39 -0400 Subject: [PATCH 01/15] relative positioning for checkbox (#10953) --- packages/ui/src/primitives/tailwind/Checkbox/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/ui/src/primitives/tailwind/Checkbox/index.tsx b/packages/ui/src/primitives/tailwind/Checkbox/index.tsx index 0471955ebd..bbb2ed64c4 100644 --- a/packages/ui/src/primitives/tailwind/Checkbox/index.tsx +++ b/packages/ui/src/primitives/tailwind/Checkbox/index.tsx @@ -47,7 +47,7 @@ const Checkbox = ({ className, containerClassName, label, value, onChange, disab } return ( -
+
Date: Thu, 15 Aug 2024 13:09:16 -0400 Subject: [PATCH 02/15] new viewmode setting (#10976) --- .../editor/panels/Assets/container/index.tsx | 47 ++++++++++++--- .../editor/panels/Files/container/index.tsx | 57 ------------------- .../src/primitives/tailwind/Slider/index.tsx | 2 +- 3 files changed, 41 insertions(+), 65 deletions(-) diff --git a/packages/ui/src/components/editor/panels/Assets/container/index.tsx b/packages/ui/src/components/editor/panels/Assets/container/index.tsx index 75977e7330..75677ce558 100644 --- a/packages/ui/src/components/editor/panels/Assets/container/index.tsx +++ b/packages/ui/src/components/editor/panels/Assets/container/index.tsx @@ -50,16 +50,18 @@ import { FiRefreshCcw } from 'react-icons/fi' import { HiDotsVertical } from 'react-icons/hi' import { HiMagnifyingGlass, HiOutlineFolder, HiOutlinePlusCircle } from 'react-icons/hi2' import { IoIosArrowDown, IoIosArrowForward } from 'react-icons/io' -import { IoArrowBack } from 'react-icons/io5' +import { IoArrowBack, IoSettingsSharp } from 'react-icons/io5' import { twMerge } from 'tailwind-merge' import Button from '../../../../../primitives/tailwind/Button' import Input from '../../../../../primitives/tailwind/Input' import LoadingView from '../../../../../primitives/tailwind/LoadingView' +import Slider from '../../../../../primitives/tailwind/Slider' import Tooltip from '../../../../../primitives/tailwind/Tooltip' import { ContextMenu } from '../../../../tailwind/ContextMenu' import InfiniteScroll from '../../../../tailwind/InfiniteScroll' +import { Popup } from '../../../../tailwind/Popup' +import InputGroup from '../../../input/Group' import DeleteFileModal from '../../Files/browserGrid/DeleteFileModal' -import { ViewModeSettings } from '../../Files/container' import { FileIcon } from '../../Files/icon' import { FileUploadProgress } from '../../Files/upload/FileUploadProgress' import { AssetIconMap } from '../icons' @@ -125,6 +127,37 @@ function mapCategoriesHelper(collapsedCategories: { [key: string]: boolean }) { return result } +const ViewModeSettings = () => { + const { t } = useTranslation() + + const viewModeSettings = useHookstate(getMutableState(FilesViewModeSettings)) + + return ( + + From b271989ad4d7c8a792a67abbd39b198c8468c745 Mon Sep 17 00:00:00 2001 From: Andy Chen <44120813+achen5671@users.noreply.github.com> Date: Fri, 16 Aug 2024 10:39:27 -0400 Subject: [PATCH 14/15] studio: remove sidebar variant (#10952) * create sidebarbutton component * add sidebar button * auto * update import --- .../editor/src/components/toolbar/Toolbar.tsx | 6 ++-- .../tailwind/SidebarButton/index.tsx | 36 +++++++++++++++++++ .../src/primitives/tailwind/Button/index.tsx | 5 ++- 3 files changed, 41 insertions(+), 6 deletions(-) create mode 100644 packages/ui/src/components/tailwind/SidebarButton/index.tsx diff --git a/packages/editor/src/components/toolbar/Toolbar.tsx b/packages/editor/src/components/toolbar/Toolbar.tsx index 4ecf87012e..798b785122 100644 --- a/packages/editor/src/components/toolbar/Toolbar.tsx +++ b/packages/editor/src/components/toolbar/Toolbar.tsx @@ -34,6 +34,7 @@ import { GLTFModifiedState } from '@etherealengine/engine/src/gltf/GLTFDocumentS import { getMutableState, getState, useHookstate, useMutableState } from '@etherealengine/hyperflux' import { useFind } from '@etherealengine/spatial/src/common/functions/FeathersHooks' import { ContextMenu } from '@etherealengine/ui/src/components/tailwind/ContextMenu' +import { SidebarButton } from '@etherealengine/ui/src/components/tailwind/SidebarButton' import Button from '@etherealengine/ui/src/primitives/tailwind/Button' import { t } from 'i18next' import React from 'react' @@ -201,10 +202,9 @@ export default function Toolbar() {
{toolbarMenu.map(({ name, action, hotkey }, index) => (
- +
))}
diff --git a/packages/ui/src/components/tailwind/SidebarButton/index.tsx b/packages/ui/src/components/tailwind/SidebarButton/index.tsx new file mode 100644 index 0000000000..22cddb0dc1 --- /dev/null +++ b/packages/ui/src/components/tailwind/SidebarButton/index.tsx @@ -0,0 +1,36 @@ +/* +CPAL-1.0 License + +The contents of this file are subject to the Common Public Attribution License +Version 1.0. (the "License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at +https://github.com/EtherealEngine/etherealengine/blob/dev/LICENSE. +The License is based on the Mozilla Public License Version 1.1, but Sections 14 +and 15 have been added to cover use of software over a computer network and +provide for limited attribution for the Original Developer. In addition, +Exhibit A has been modified to be consistent with Exhibit B. + +Software distributed under the License is distributed on an "AS IS" basis, +WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the +specific language governing rights and limitations under the License. + +The Original Code is Ethereal Engine. + +The Original Developer is the Initial Developer. The Initial Developer of the +Original Code is the Ethereal Engine team. + +All portions of the code written by the Ethereal Engine team are Copyright © 2021-2023 +Ethereal Engine. All Rights Reserved. +*/ + +import Button from '@etherealengine/ui/src/primitives/tailwind/Button' +import React from 'react' +import { twMerge } from 'tailwind-merge' + +export function SidebarButton({ children, className, ...rest }) { + return ( + + ) +} diff --git a/packages/ui/src/primitives/tailwind/Button/index.tsx b/packages/ui/src/primitives/tailwind/Button/index.tsx index 8daeef8fec..e43206985d 100644 --- a/packages/ui/src/primitives/tailwind/Button/index.tsx +++ b/packages/ui/src/primitives/tailwind/Button/index.tsx @@ -32,7 +32,7 @@ export interface ButtonProps extends React.HTMLAttributes { endIcon?: ReactNode children?: ReactNode size?: 'small' | 'medium' | 'large' - variant?: 'primary' | 'secondary' | 'outline' | 'danger' | 'success' | 'transparent' | 'sidebar' + variant?: 'primary' | 'secondary' | 'outline' | 'danger' | 'success' | 'transparent' disabled?: boolean fullWidth?: boolean rounded?: 'partial' | 'full' | 'none' @@ -59,8 +59,7 @@ const variants = { outline: 'border border-solid border-theme-primary bg-theme-surface-main dark:bg-theme-highlight text-theme-primary', danger: 'bg-red-500', success: 'bg-teal-700', - transparent: 'bg-transparent dark:bg-transparent', - sidebar: 'bg-[#141619]' + transparent: 'bg-transparent dark:bg-transparent' } const Button = React.forwardRef( From 1bf288234eaf7c853b3648a0a55dffa68a54c342 Mon Sep 17 00:00:00 2001 From: Kyle Baran Date: Fri, 16 Aug 2024 08:24:00 -0700 Subject: [PATCH 15/15] Updated scene name regex (#10980) Underscores are not allowed at all, and hyphens can't be the end character. Updated invalidSceneName text to reflect this. Resolves IR-3952 --- packages/client-core/i18n/en/editor.json | 2 +- packages/common/src/regex/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/client-core/i18n/en/editor.json b/packages/client-core/i18n/en/editor.json index cbd6e57567..d02eab69e9 100755 --- a/packages/client-core/i18n/en/editor.json +++ b/packages/client-core/i18n/en/editor.json @@ -72,7 +72,7 @@ "unknownStatus": "Unknown Status", "CORS": "Possibly a CORS error", "urlFetchError": "Failed to fetch \"{{url}}\"", - "invalidSceneName": "Scene name must be 4-64 characters long, using only alphanumeric characters, hyphens, and underscores." + "invalidSceneName": "Scene name must be 4-64 characters long, using only alphanumeric characters and hyphens, and begin and end with an alphanumeric." }, "viewport": { "title": "Viewport", diff --git a/packages/common/src/regex/index.ts b/packages/common/src/regex/index.ts index 610dd4ebc6..2b89670699 100644 --- a/packages/common/src/regex/index.ts +++ b/packages/common/src/regex/index.ts @@ -29,7 +29,7 @@ Ethereal Engine. All Rights Reserved. export const VALID_FILENAME_REGEX = /^(?!.*[\s_<>:"/\\|?*\u0000-\u001F].*)[^\s_<>:"/\\|?*\u0000-\u001F]{1,64}$/ // eslint-disable-next-line no-control-regex export const WINDOWS_RESERVED_NAME_REGEX = /^(con|prn|aux|nul|com\d|lpt\d)$/i -export const VALID_SCENE_NAME_REGEX = /^[a-zA-Z0-9][a-zA-Z0-9-]{2,62}[a-zA-Z0-9_\-]$/ +export const VALID_SCENE_NAME_REGEX = /^[a-zA-Z0-9][a-zA-Z0-9-]{2,62}[a-zA-Z0-9]$/ export const VALID_HEIRARCHY_SEARCH_REGEX = /[.*+?^${}()|[\]\\]/g /**