From d48145b412ef2822fad4f3554125d6c59910060b Mon Sep 17 00:00:00 2001 From: Nikki Sharpley Date: Mon, 17 Jul 2023 17:59:09 -0400 Subject: [PATCH 01/11] update text to use uniform variables --- src/react-components/input/Button.scss | 8 +-- src/react-components/input/InputField.scss | 3 +- src/react-components/input/RadioInput.scss | 4 +- src/react-components/input/TextInput.scss | 24 +++++---- .../layout/LoadingScreenLayout.scss | 3 +- src/react-components/layout/Page.scss | 19 ++++--- src/react-components/room/ContentMenu.scss | 5 +- src/react-components/room/RoomEntryModal.scss | 3 +- src/react-components/styles/global.scss | 2 + src/react-components/styles/theme.scss | 51 ++++++++++--------- 10 files changed, 71 insertions(+), 51 deletions(-) diff --git a/src/react-components/input/Button.scss b/src/react-components/input/Button.scss index ca3bb71701..87283b1d45 100644 --- a/src/react-components/input/Button.scss +++ b/src/react-components/input/Button.scss @@ -25,21 +25,21 @@ :local(.basic), :local(.transparent) { - color: theme.$text4-color; + color: theme.$text2-color; border: 2px solid theme.$basic-border-color; background-color: theme.$basic-color; svg { - color: theme.$text4-color; + color: theme.$text2-color; } &:hover { - color: theme.$text4-color-hover; + color: theme.$text2-color-hover; background-color: theme.$basic-color-hover; } &:active { - color: theme.$text4-color-pressed; + color: theme.$text2-color-pressed; background-color: theme.$basic-color-pressed; } } diff --git a/src/react-components/input/InputField.scss b/src/react-components/input/InputField.scss index 226bef9bee..27d38b67e0 100644 --- a/src/react-components/input/InputField.scss +++ b/src/react-components/input/InputField.scss @@ -31,6 +31,7 @@ align-self: flex-start; } -:local(.info), :local(.error) { +:local(.info), +:local(.error) { font-size: 10px; } diff --git a/src/react-components/input/RadioInput.scss b/src/react-components/input/RadioInput.scss index 12190d09ab..92c5a447a2 100644 --- a/src/react-components/input/RadioInput.scss +++ b/src/react-components/input/RadioInput.scss @@ -77,10 +77,12 @@ :local(.label) { font-size: theme.$font-size-sm; font-weight: theme.$font-weight-bold; + color: theme.$text1-color; } :local(.description) { margin-top: 4px; font-size: theme.$font-size-xs; font-weight: theme.$font-weight-regular; -} \ No newline at end of file + color: theme.$text2-color; +} diff --git a/src/react-components/input/TextInput.scss b/src/react-components/input/TextInput.scss index b7e5c34929..bef6bcb84b 100644 --- a/src/react-components/input/TextInput.scss +++ b/src/react-components/input/TextInput.scss @@ -11,7 +11,7 @@ $input-height: 40px; color: theme.$text1-color; overflow: hidden; - &:focus-within { + &:focus-within { border-color: theme.$input-outline-color; box-shadow: 0 0 0 2px theme.$input-outline-color; } @@ -22,7 +22,8 @@ $input-height: 40px; height: 100%; } -:local(.before-input), :local(.after-input) { +:local(.before-input), +:local(.after-input) { display: flex; height: $input-height; align-items: center; @@ -35,11 +36,10 @@ $input-height: 40px; border-width: 0; min-height: auto; border: none; - + &:hover { - border:none; + border: none; } - :global(.keyboard-user) &:focus { border-width: 0; @@ -50,7 +50,7 @@ $input-height: 40px; border-top-left-radius: theme.$border-radius-regular; border-bottom-left-radius: theme.$border-radius-regular; } - + &:last-child { margin-left: 1px; box-shadow: inset 0 0 0 3px theme.$outline-color, 1px 0 0 2px theme.$outline-color; @@ -58,13 +58,13 @@ $input-height: 40px; border-bottom-right-radius: theme.$border-radius-regular; } } - } - :local(.icon-button), & > svg { + :local(.icon-button), + & > svg { padding: 0; margin-left: 8px; - + &:last-child { margin-right: 8px; } @@ -92,7 +92,7 @@ $input-height: 40px; :local(.invalid) { border-color: theme.$error-color !important; - &:focus-within { + &:focus-within { box-shadow: 0 0 0 2px theme.$error-color; } } @@ -108,6 +108,10 @@ $input-height: 40px; &:focus { box-shadow: none; } + + &::placeholder { + color: theme.$text3-color; + } } :local(.invalid-icon) { diff --git a/src/react-components/layout/LoadingScreenLayout.scss b/src/react-components/layout/LoadingScreenLayout.scss index 97a68881cb..41ce395652 100644 --- a/src/react-components/layout/LoadingScreenLayout.scss +++ b/src/react-components/layout/LoadingScreenLayout.scss @@ -12,10 +12,11 @@ bottom: 0; top: 0; background: theme.$loading-screen-background; + color: theme.$text1-color; font-size: theme.$font-size-sm; - @media(min-width: theme.$breakpoint-lg) and (min-height: theme.$breakpoint-vr) { + @media (min-width: theme.$breakpoint-lg) and (min-height: theme.$breakpoint-vr) { font-size: theme.$font-size-md; } } diff --git a/src/react-components/layout/Page.scss b/src/react-components/layout/Page.scss index d11bafde22..451f81190c 100644 --- a/src/react-components/layout/Page.scss +++ b/src/react-components/layout/Page.scss @@ -4,19 +4,24 @@ box-sizing: border-box; } -html, body, :global(#root), :global(#ui-root), :global(.home-root) { +html, +body, +:global(#root), +:global(#ui-root), +:global(.home-root) { margin: 0; - height:100%; + height: 100%; } body { background: theme.$background1-color; - color: theme.$text1-color; } -:global(#root), :global(#ui-root), :global(.home-root) { - display:flex; - flex-direction:column; +:global(#root), +:global(#ui-root), +:global(.home-root) { + display: flex; + flex-direction: column; } h1 { @@ -32,7 +37,7 @@ main { order: -1; flex: 1; - @media(min-width: theme.$breakpoint-lg) { + @media (min-width: theme.$breakpoint-lg) { order: 0; display: flex; flex-direction: column; diff --git a/src/react-components/room/ContentMenu.scss b/src/react-components/room/ContentMenu.scss index 790fd788f9..45ea5b6526 100644 --- a/src/react-components/room/ContentMenu.scss +++ b/src/react-components/room/ContentMenu.scss @@ -11,8 +11,9 @@ border-radius: 12px; pointer-events: auto; padding: 4px; + color: theme.$text1-color; - @media(min-width: theme.$breakpoint-lg) { + @media (min-width: theme.$breakpoint-lg) { top: 24px; right: 24px; } @@ -76,4 +77,4 @@ :local(.disabled) { pointer-events: none; background-color: theme.$transparent; -} \ No newline at end of file +} diff --git a/src/react-components/room/RoomEntryModal.scss b/src/react-components/room/RoomEntryModal.scss index bb1168ef44..56b7920d68 100644 --- a/src/react-components/room/RoomEntryModal.scss +++ b/src/react-components/room/RoomEntryModal.scss @@ -28,13 +28,14 @@ h5 { font-size: theme.$font-size-xs; - color: theme.$grey; + color: theme.$text3-color; margin-bottom: 4px; } p { font-size: theme.$font-size-sm; text-align: center; + color: theme.$text1-color; @media (min-width: theme.$breakpoint-lg) and (min-height: theme.$breakpoint-vr) { font-size: 20px; diff --git a/src/react-components/styles/global.scss b/src/react-components/styles/global.scss index 2a21ededdc..599f0b3cff 100644 --- a/src/react-components/styles/global.scss +++ b/src/react-components/styles/global.scss @@ -196,6 +196,7 @@ body { height: 100%; overflow: auto; overscroll-behavior-y: none; + color: var(--text1-color); } body[data-theme="light"], @@ -637,6 +638,7 @@ small, strong { font-size: theme.$font-size-xs; font-weight: theme.$font-weight-bold; + color: theme.$text2-color; } small { diff --git a/src/react-components/styles/theme.scss b/src/react-components/styles/theme.scss index 38a2cc3435..dd0e111edb 100644 --- a/src/react-components/styles/theme.scss +++ b/src/react-components/styles/theme.scss @@ -1,3 +1,4 @@ +// Breakpoints // default below 576px (Portrait Phones) $breakpoint-sm: 576px; // Landscape Phones $breakpoint-md: 768px; // Tablets @@ -6,6 +7,31 @@ $breakpoint-xl: 1200px; // Large Desktops $breakpoint-xxl: 1600px; // Extra Large Desktops $breakpoint-vr: 600px; // Standalone VR Browsers +// Font styles +$font-size-xs: 10px; +$font-size-sm: 12px; +$font-size-md: 14px; +$font-size-lg: 20px; +$font-size-xl: 24px; +$font-size-2xl: 28px; + +$font-weight-regular: 400; +$font-weight-medium: 500; +$font-weight-bold: 700; + +// Border styles +$border-radius-regular: 8px; +$border-radius-small: 6px; + +// Spacing +$spacing-2xs: 4px; +$spacing-xs: 8px; +$spacing-sm: 12px; +$spacing-md: 16px; +$spacing-lg: 20px; +$spacing-xl: 24px; + +// Utility colors $transparent: transparent; $transparent-hover: rgba(0, 0, 0, 0.08); $transparent-pressed: rgba(0, 0, 0, 0.12); @@ -67,29 +93,6 @@ $discord-text2-color: #a3a3a3; $discord-text3-color: rgb(127, 127, 127); $discord-text4-color: rgb(64, 64, 64); -$font-size-xs: 10px; -$font-size-sm: 12px; -$font-size-md: 14px; -$font-size-lg: 20px; -$font-size-xl: 24px; -$font-size-2xl: 28px; - -$font-weight-regular: 400; -$font-weight-medium: 500; -$font-weight-bold: 700; - -$border-radius-regular: 8px; -$border-radius-small: 6px; - -$outline-width: 3px; - -$spacing-2xs: 4px; -$spacing-xs: 8px; -$spacing-sm: 12px; -$spacing-md: 16px; -$spacing-lg: 20px; -$spacing-xl: 24px; - // Theme SCSS Variables: // Reference these variables in the Hubs codebase. // The CSS variables they reference are defined in ./global.scss such that they are only included on the page once. @@ -272,7 +275,7 @@ $tile-button-bg-color-hover: var(--tile-button-bg-color-hover); $tile-button-bg-color-pressed: var(--tile-button-bg-color-pressed); $tile-button-border-color: var(--tile-button-border-color); -// Lilypad compatible variables (to eventually replace the above) +// Mozilla Lilypad compatible variables /** PRIMARY INTERACTION From 379cfd52eaf85ff7db8a1ec72d0c9d9efe6e4cb6 Mon Sep 17 00:00:00 2001 From: Nikki Sharpley Date: Mon, 17 Jul 2023 18:04:22 -0400 Subject: [PATCH 02/11] update label and description --- src/react-components/input/InputField.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/react-components/input/InputField.scss b/src/react-components/input/InputField.scss index 27d38b67e0..972d9ba87c 100644 --- a/src/react-components/input/InputField.scss +++ b/src/react-components/input/InputField.scss @@ -27,7 +27,7 @@ :local(.info) { margin-top: 8px; - color: theme.$text3-color; + color: theme.$text2-color; align-self: flex-start; } From 7f48ae3299eebaf3661386f950162ef6cd6fbc36 Mon Sep 17 00:00:00 2001 From: Nikki Sharpley Date: Mon, 17 Jul 2023 19:12:58 -0400 Subject: [PATCH 03/11] update toggle --- src/react-components/input/ToggleInput.scss | 1 - src/react-components/styles/global.scss | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/react-components/input/ToggleInput.scss b/src/react-components/input/ToggleInput.scss index 38fc75647a..dd5daa297f 100644 --- a/src/react-components/input/ToggleInput.scss +++ b/src/react-components/input/ToggleInput.scss @@ -28,7 +28,6 @@ margin-left: 16px; display: flex; flex-direction: column; - color: theme.$text2-color; } :local(.label) { diff --git a/src/react-components/styles/global.scss b/src/react-components/styles/global.scss index 599f0b3cff..7f6a54cc6b 100644 --- a/src/react-components/styles/global.scss +++ b/src/react-components/styles/global.scss @@ -176,7 +176,7 @@ --toolbar-label-accent4: var(--accent4-color); --toolbar-label-accent5: var(--accent5-color); - --tile-text-color: var(--text4-color); + --tile-text-color: var(--text2-color); --tile-bg-color: var(--secondary-color); --tile-bg-color-hover: var(--secondary-color-hover); --tile-bg-color-pressed: var(--secondary-color-pressed); @@ -638,7 +638,6 @@ small, strong { font-size: theme.$font-size-xs; font-weight: theme.$font-weight-bold; - color: theme.$text2-color; } small { From 313bc74d29f2813203a4041ce127cf1367124a24 Mon Sep 17 00:00:00 2001 From: John Shaughnessy Date: Tue, 18 Jul 2023 14:48:36 -0400 Subject: [PATCH 04/11] Add type-checked media creation function --- src/bit-systems/object-spawner.ts | 6 +++--- src/load-media-on-paste-or-drop.ts | 7 +++---- src/utils/chat-commands.ts | 4 ++-- src/utils/create-networked-entity.ts | 5 +++++ src/utils/networking-types.ts | 3 ++- 5 files changed, 15 insertions(+), 10 deletions(-) diff --git a/src/bit-systems/object-spawner.ts b/src/bit-systems/object-spawner.ts index 46bc6f0c07..7c6713974d 100644 --- a/src/bit-systems/object-spawner.ts +++ b/src/bit-systems/object-spawner.ts @@ -4,7 +4,7 @@ import { FloatyObject, Held, HeldRemoteRight, Interacted, ObjectSpawner } from " import { FLOATY_OBJECT_FLAGS } from "../systems/floaty-object-system"; import { sleep } from "../utils/async-utils"; import { coroutine } from "../utils/coroutine"; -import { createNetworkedEntity } from "../utils/create-networked-entity"; +import { createNetworkedMedia } from "../utils/create-networked-entity"; import { EntityID } from "../utils/networking-types"; import { setMatrixWorld } from "../utils/three-utils"; import { animateScale, waitForMediaLoaded } from "./media-loading"; @@ -15,8 +15,8 @@ export enum OBJECT_SPAWNER_FLAGS { } function* spawnObjectJob(world: HubsWorld, spawner: EntityID) { - const spawned = createNetworkedEntity(world, "media", { - src: APP.getString(ObjectSpawner.src[spawner]), + const spawned = createNetworkedMedia(world, { + src: APP.getString(ObjectSpawner.src[spawner])!, recenter: false, resize: false, animateLoad: false, diff --git a/src/load-media-on-paste-or-drop.ts b/src/load-media-on-paste-or-drop.ts index 4d354d5f0e..9c47f90696 100644 --- a/src/load-media-on-paste-or-drop.ts +++ b/src/load-media-on-paste-or-drop.ts @@ -1,4 +1,4 @@ -import { createNetworkedEntity } from "./utils/create-networked-entity"; +import { createNetworkedMedia } from "./utils/create-networked-entity"; import { upload, parseURL } from "./utils/media-utils"; import { guessContentType } from "./utils/media-url-utils"; import { AElement } from "aframe"; @@ -23,7 +23,7 @@ export function spawnFromUrl(text: string) { console.warn(`Could not parse URL. Ignoring pasted text:\n${text}`); return; } - const eid = createNetworkedEntity(APP.world, "media", { + const eid = createNetworkedMedia(APP.world, { src: text, recenter: true, resize: !qsTruthy("noResize"), @@ -62,12 +62,11 @@ export async function spawnFromFileList(files: FileList) { recenter: true, resize: !qsTruthy("noResize"), animateLoad: true, - fileId: null, isObjectMenuTarget: true }; }); - const eid = createNetworkedEntity(APP.world, "media", params); + const eid = createNetworkedMedia(APP.world, params); const avatarPov = (document.querySelector("#avatar-pov-node")! as AElement).object3D; const obj = APP.world.eid2obj.get(eid)!; obj.position.copy(avatarPov.localToWorld(new Vector3(0, 0, -1.5))); diff --git a/src/utils/chat-commands.ts b/src/utils/chat-commands.ts index f5951b521f..5cd037ddf7 100644 --- a/src/utils/chat-commands.ts +++ b/src/utils/chat-commands.ts @@ -3,7 +3,7 @@ import { Object3D } from "three"; import { HubsWorld } from "../app"; import { moveToSpawnPoint } from "../bit-systems/waypoint"; import { CharacterControllerSystem } from "../systems/character-controller-system"; -import { createNetworkedEntity } from "./create-networked-entity"; +import { createNetworkedMedia } from "./create-networked-entity"; import qsTruthy from "./qs_truthy"; function checkFlag(args: string[], flag: string) { @@ -51,7 +51,7 @@ export function add(world: HubsWorld, avatarPov: Object3D, args: string[]) { isObjectMenuTarget: !checkFlag(args, FLAG_NO_OBJECT_MENU) }; console.log("Adding media", initialData); - const eid = createNetworkedEntity(world, "media", initialData); + const eid = createNetworkedMedia(world, initialData); const obj = APP.world.eid2obj.get(eid)!; obj.position.copy(avatarPov.localToWorld(new THREE.Vector3(0, 0, -1.5))); obj.lookAt(avatarPov.getWorldPosition(new THREE.Vector3())); diff --git a/src/utils/create-networked-entity.ts b/src/utils/create-networked-entity.ts index ae2945fbb7..60ebeb05a8 100644 --- a/src/utils/create-networked-entity.ts +++ b/src/utils/create-networked-entity.ts @@ -2,6 +2,7 @@ import { hasComponent } from "bitecs"; import { HubsWorld } from "../app"; import { Networked } from "../bit-components"; import { createMessageDatas } from "../bit-systems/networking"; +import { MediaLoaderParams } from "../inflators/media-loader"; import { PrefabName, prefabs } from "../prefabs/prefabs"; import { renderAsEntity } from "../utils/jsx-entity"; import { hasPermissionToSpawn } from "../utils/permissions"; @@ -9,6 +10,10 @@ import { takeOwnership } from "../utils/take-ownership"; import { setNetworkedDataWithRoot } from "./assign-network-ids"; import type { ClientID, InitialData, NetworkID } from "./networking-types"; +export function createNetworkedMedia(world: HubsWorld, initialData: MediaLoaderParams) { + return createNetworkedEntity(world, "media", initialData); +} + export function createNetworkedEntity(world: HubsWorld, prefabName: PrefabName, initialData: InitialData) { if (!hasPermissionToSpawn(NAF.clientId, prefabName)) throw new Error(`You do not have permission to spawn ${prefabName}`); diff --git a/src/utils/networking-types.ts b/src/utils/networking-types.ts index af8465d320..766f090173 100644 --- a/src/utils/networking-types.ts +++ b/src/utils/networking-types.ts @@ -1,7 +1,8 @@ +import { MediaLoaderParams } from "../inflators/media-loader"; import { PrefabName } from "../prefabs/prefabs"; export type EntityID = number; -export type InitialData = any; +export type InitialData = MediaLoaderParams | any; export interface CreateMessageData { prefabName: PrefabName; initialData: InitialData; From ef76708572030ed3023fffb96a01cad8ed074d09 Mon Sep 17 00:00:00 2001 From: John Shaughnessy Date: Tue, 18 Jul 2023 15:04:06 -0400 Subject: [PATCH 05/11] Only media prefabs can be pinned --- src/bit-systems/object-menu.ts | 2 +- src/utils/bit-pinning-helper.ts | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/bit-systems/object-menu.ts b/src/bit-systems/object-menu.ts index 3aaba8597c..73eec83705 100644 --- a/src/bit-systems/object-menu.ts +++ b/src/bit-systems/object-menu.ts @@ -205,7 +205,7 @@ function updateVisibility(world: HubsWorld, menu: EntityID, frozen: boolean) { world.eid2obj.get(ObjectMenu.unpinButtonRef[menu])!.visible = visible && isPinned(target); world.eid2obj.get(ObjectMenu.pinButtonRef[menu])!.visible = - visible && !isPinned(target) && canPin(APP.hubChannel!, world, target); + visible && !isPinned(target) && canPin(APP.hubChannel!, target); [ ObjectMenu.cameraFocusButtonRef[menu], diff --git a/src/utils/bit-pinning-helper.ts b/src/utils/bit-pinning-helper.ts index ee625aa0c0..55333ca8d9 100644 --- a/src/utils/bit-pinning-helper.ts +++ b/src/utils/bit-pinning-helper.ts @@ -33,10 +33,12 @@ const _signInAndPinOrUnpinElement = (hubChannel: HubChannel, world: HubsWorld, e action(); }; -export const canPin = (hubChannel: HubChannel, world: HubsWorld, eid: EntityID): boolean => { - const { - initialData: { fileId } - } = createMessageDatas.get(eid)!; +export const canPin = (hubChannel: HubChannel, eid: EntityID): boolean => { + const createMessageData = createMessageDatas.get(eid)!; + if (createMessageData.prefabName !== "media") { + return false; + } + const fileId = createMessageData.initialData.fileId; const hasFile = !!fileId; const hasPromotableFile = hasFile && APP.store.state.uploadPromotionTokens.some((upload: any) => upload.fileId === fileId); From 9826a3cf5a3d91e9b30b429c66f9d1013f998a93 Mon Sep 17 00:00:00 2001 From: John Shaughnessy Date: Tue, 18 Jul 2023 15:04:17 -0400 Subject: [PATCH 06/11] Catch mixer animation init error --- src/bit-systems/mixer-animatable.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/bit-systems/mixer-animatable.ts b/src/bit-systems/mixer-animatable.ts index 05874c1d35..8609a277a1 100644 --- a/src/bit-systems/mixer-animatable.ts +++ b/src/bit-systems/mixer-animatable.ts @@ -1,4 +1,4 @@ -import { addComponent, defineQuery, enterQuery, exitQuery, removeComponent } from "bitecs"; +import { addComponent, defineQuery, enterQuery, entityExists, exitQuery, removeComponent } from "bitecs"; import { AnimationMixer } from "three"; import { MixerAnimatable, MixerAnimatableInitialize, MixerAnimatableData, Object3DTag } from "../bit-components"; import { HubsWorld } from "../app"; @@ -10,6 +10,10 @@ const mixerExitQuery = exitQuery(mixerQuery); export function mixerAnimatableSystem(world: HubsWorld): void { initializeEnterQuery(world).forEach(eid => { + if (entityExists(world, eid)) { + console.warn("Skipping nonexistant entity."); // TODO Why does this happen? + return; + } addComponent(world, MixerAnimatable, eid); const object = world.eid2obj.get(eid)!; From a58a84675ea4053c915864b9b08fb66a3f152336 Mon Sep 17 00:00:00 2001 From: John Shaughnessy Date: Wed, 19 Jul 2023 14:15:30 -0400 Subject: [PATCH 07/11] Fix grabbing of pinned aframe entities --- src/systems/hold-system.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/systems/hold-system.js b/src/systems/hold-system.js index 8e4c4f094a..5625de006b 100644 --- a/src/systems/hold-system.js +++ b/src/systems/hold-system.js @@ -30,12 +30,22 @@ function hasPermissionToGrab(world, eid) { return canMove(world.eid2obj.get(eid).el); } +function isAEntityPinned(world, eid) { + if (hasComponent(world, AEntity, eid)) { + const el = world.eid2obj.get(eid).el; + return !!el.components?.pinnable?.data?.pinned; + } + return false; +} + function grab(world, userinput, queryHovered, held, grabPath) { const hovered = queryHovered(world)[0]; + const isEntityPinned = isPinned(hovered) || isAEntityPinned(world, hovered); + if ( hovered && userinput.get(grabPath) && - (!isPinned(hovered) || AFRAME.scenes[0].is("frozen")) && + (!isEntityPinned || AFRAME.scenes[0].is("frozen")) && hasPermissionToGrab(world, hovered) ) { addComponent(world, held, hovered); From d1edbad038bfedebdb7d9f02783363d77bdac927 Mon Sep 17 00:00:00 2001 From: Nikki Sharpley Date: Wed, 19 Jul 2023 17:44:58 -0400 Subject: [PATCH 08/11] chat button transparent on click --- .../room/components/ChatToolbarButton/ChatToolbarButton.tsx | 4 +++- src/react-components/ui-root.js | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/react-components/room/components/ChatToolbarButton/ChatToolbarButton.tsx b/src/react-components/room/components/ChatToolbarButton/ChatToolbarButton.tsx index 23f5813b50..54b608a575 100644 --- a/src/react-components/room/components/ChatToolbarButton/ChatToolbarButton.tsx +++ b/src/react-components/room/components/ChatToolbarButton/ChatToolbarButton.tsx @@ -14,9 +14,10 @@ const chatTooltipDescription = defineMessage({ type ChatToolbarButtonProps = { onClick: () => void; + selected: boolean }; -const ChatToolbarButton = ({ onClick }: ChatToolbarButtonProps) => { +const ChatToolbarButton = ({ onClick, selected }: ChatToolbarButtonProps) => { const { unreadMessages } = useContext(ChatContext); const intl = useIntl(); const description = intl.formatMessage(chatTooltipDescription); @@ -31,6 +32,7 @@ const ChatToolbarButton = ({ onClick }: ChatToolbarButtonProps) => { icon={} preset="accent4" label={} + selected={selected} /> ); diff --git a/src/react-components/ui-root.js b/src/react-components/ui-root.js index 0d01781e96..40f46e4f31 100644 --- a/src/react-components/ui-root.js +++ b/src/react-components/ui-root.js @@ -1646,6 +1646,7 @@ class UIRoot extends Component { {!isLockedDownDemo && ( this.toggleSidebar("chat", { chatPrefix: "", chatAutofocus: false })} + selected={this.state.sidebarId === "chat"} /> )} {entered && isMobileVR && ( From b717648fe3426568f0b90c4b4d158e8cb05c6eb0 Mon Sep 17 00:00:00 2001 From: Nikki Sharpley Date: Thu, 20 Jul 2023 14:25:34 -0400 Subject: [PATCH 09/11] Leave button turns transparent on modal open --- src/react-components/ui-root.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/react-components/ui-root.js b/src/react-components/ui-root.js index 40f46e4f31..dde36da0b7 100644 --- a/src/react-components/ui-root.js +++ b/src/react-components/ui-root.js @@ -177,6 +177,7 @@ class UIRoot extends Component { enterInVR: false, entered: false, entering: false, + leaving: false, dialog: null, showShareDialog: false, linkCode: null, @@ -1166,7 +1167,7 @@ class UIRoot extends Component { onClick: () => this.showNonHistoriedDialog(LeaveRoomModal, { destinationUrl: "/", - reason: LeaveReason.createRoom + reason: LeaveReason.createRoom, }) }, !isLockedDownDemo && { @@ -1253,7 +1254,7 @@ class UIRoot extends Component { onClick: () => { this.showNonHistoriedDialog(LeaveRoomModal, { destinationUrl: "/", - reason: LeaveReason.leaveRoom + reason: LeaveReason.leaveRoom, }); } }, @@ -1675,10 +1676,16 @@ class UIRoot extends Component { icon={} label={} preset="cancel" + selected={!!this.state.leaving} onClick={() => { + this.setState({leaving: true}) this.showNonHistoriedDialog(LeaveRoomModal, { destinationUrl: "/", - reason: LeaveReason.leaveRoom + reason: LeaveReason.leaveRoom, + onClose: () => { + this.setState({leaving: false}) + this.closeDialog() + } }); }} /> From 6ad64108a97cdd209919ef736ba49c3498d55cf5 Mon Sep 17 00:00:00 2001 From: Takahiro Date: Fri, 21 Jul 2023 19:47:25 -0700 Subject: [PATCH 10/11] Fix Mixer animation This commit resolves a mixer animation bug caused by the recent update. An if condition is wrong. This commit corrects it. --- src/bit-systems/mixer-animatable.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bit-systems/mixer-animatable.ts b/src/bit-systems/mixer-animatable.ts index 8609a277a1..48711af0eb 100644 --- a/src/bit-systems/mixer-animatable.ts +++ b/src/bit-systems/mixer-animatable.ts @@ -10,7 +10,7 @@ const mixerExitQuery = exitQuery(mixerQuery); export function mixerAnimatableSystem(world: HubsWorld): void { initializeEnterQuery(world).forEach(eid => { - if (entityExists(world, eid)) { + if (!entityExists(world, eid)) { console.warn("Skipping nonexistant entity."); // TODO Why does this happen? return; } From 6d45555184c518bc5971c04d169750e74f920072 Mon Sep 17 00:00:00 2001 From: Geng Tan Date: Tue, 25 Jul 2023 09:53:03 -0400 Subject: [PATCH 11/11] Update feature_flags.ts --- admin/src/utils/feature_flags.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/src/utils/feature_flags.ts b/admin/src/utils/feature_flags.ts index 7c3a9f68ff..bef862d182 100644 --- a/admin/src/utils/feature_flags.ts +++ b/admin/src/utils/feature_flags.ts @@ -6,7 +6,7 @@ export function hasPaidFeature(): boolean { // If the user is not a turkey user then no need to check. if (configs.ITA_SERVER != "turkey") return true; - const authorizedTiers: PaidTiers[] = ["p1", "b1"]; + const authorizedTiers: PaidTiers[] = ["p1", "b1","b0"]; return authorizedTiers.includes(configs.TIER); }