Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hierarchy polish 2 #236

Merged
merged 88 commits into from
Oct 8, 2024
Merged
Changes from 1 commit
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
5018245
redux-undo add
Kluskey Oct 5, 2024
575f355
fix build layout
Kluskey Oct 5, 2024
c9abaa1
add engine
Kluskey Oct 5, 2024
0d903f9
layout clean
Kluskey Oct 5, 2024
a591e51
search asset fix
Kluskey Oct 5, 2024
c0ec839
break out assets migration into separate file
Kluskey Oct 5, 2024
65c9972
home fix
Kluskey Oct 5, 2024
c0b0da9
text search assets
Kluskey Oct 5, 2024
3aa1544
add description, computed columns
Kluskey Oct 5, 2024
7646e71
name prefix search assets spaces
Kluskey Oct 5, 2024
d039d25
fix display
Kluskey Oct 5, 2024
abc791d
same
Kluskey Oct 5, 2024
e70bf12
asset search fixes
Kluskey Oct 5, 2024
da3157b
real time text search
Kluskey Oct 5, 2024
6af9f71
asset search
Kluskey Oct 5, 2024
dc9635b
add recent assets
Kluskey Oct 5, 2024
cf7d726
storage thumb
Kluskey Oct 5, 2024
64c191f
sidebar optimize
Kluskey Oct 5, 2024
9ed4918
basic file upload!
Kluskey Oct 5, 2024
019b1ea
lift dropzone
Kluskey Oct 5, 2024
eb48c35
update asset url to be id not name
Kluskey Oct 5, 2024
756a279
dropzone
Kluskey Oct 5, 2024
5b78ca8
copy
Kluskey Oct 5, 2024
8c983a9
border
Kluskey Oct 5, 2024
bfbc000
asset tags
Kluskey Oct 5, 2024
ceb84ff
key prop
Kluskey Oct 5, 2024
1ea0024
add right click download asset
Kluskey Oct 5, 2024
2d9e312
x toggle
Kluskey Oct 5, 2024
9b2b5c8
basic scene ui
Kluskey Oct 5, 2024
84ba467
del scene
Kluskey Oct 5, 2024
5dddcfd
scene name edit
Kluskey Oct 5, 2024
1aabeaa
hover on scene
Kluskey Oct 5, 2024
46ae5d8
clean
Kluskey Oct 5, 2024
2b07c11
two way input polish
Kluskey Oct 5, 2024
1055da3
add entities crud
Kluskey Oct 5, 2024
c2dfea3
change from hover to click sidebar
Kluskey Oct 5, 2024
1807ffd
local
Kluskey Oct 5, 2024
dcb8697
near bsic tree
Kluskey Oct 5, 2024
60c5012
formatting
Kluskey Oct 5, 2024
fe20af6
clean format
Kluskey Oct 5, 2024
05137ea
depth fix + dragdrop
Kluskey Oct 5, 2024
55b798e
node key dragdrop clea
Kluskey Oct 6, 2024
a22c73f
drag drop keep parent open
Kluskey Oct 6, 2024
dbcc8e8
clean
Kluskey Oct 6, 2024
2132376
WIP
Kluskey Oct 6, 2024
9924a8a
boilerplate working
Kluskey Oct 6, 2024
dd15f8b
import
Kluskey Oct 6, 2024
bf14ac3
working bg
Kluskey Oct 6, 2024
9bd9354
clean
Kluskey Oct 6, 2024
d2d14c4
hide action menu tree item
Kluskey Oct 6, 2024
5095423
child type rm
Kluskey Oct 6, 2024
1653717
rm movedialog
Kluskey Oct 6, 2024
18c798d
clean
Kluskey Oct 6, 2024
bd38fac
clean
Kluskey Oct 6, 2024
a45000e
clean
Kluskey Oct 6, 2024
3e61b50
clean
Kluskey Oct 6, 2024
4983af3
basic scene crud
Kluskey Oct 6, 2024
4153466
add currentscene
Kluskey Oct 6, 2024
639428c
entity work
Kluskey Oct 6, 2024
831ea27
working entities crud
Kluskey Oct 7, 2024
076f5fd
break slices into different files
Kluskey Oct 7, 2024
2db7c9c
cache polish
Kluskey Oct 7, 2024
8252dd5
add component CRUD
Kluskey Oct 7, 2024
c194b52
clean
Kluskey Oct 7, 2024
9b10f04
component entities updates
Kluskey Oct 7, 2024
b2528fd
rm component name
Kluskey Oct 7, 2024
c954a3f
entities
Kluskey Oct 7, 2024
008ef65
create scene upon space creation
Kluskey Oct 7, 2024
dae06b1
entity children setup
Kluskey Oct 7, 2024
ca8569f
updatable entity name hierarchy
Kluskey Oct 7, 2024
724d574
basic parent update setup
Kluskey Oct 7, 2024
105ebb5
working child tree item saving
Kluskey Oct 7, 2024
7113627
optional children add
Kluskey Oct 7, 2024
0c6a2ce
clean
Kluskey Oct 7, 2024
ec7fde6
bug fixes for cachcing
Kluskey Oct 7, 2024
3e0409f
working reordering of entities!
Kluskey Oct 7, 2024
d2bd909
optimize entity queries
Kluskey Oct 8, 2024
7b0ceda
working .children refactor pt 1
Kluskey Oct 8, 2024
bcb2979
clean the junk
Kluskey Oct 8, 2024
4d83fd0
clean more atlassian junk
Kluskey Oct 8, 2024
f974c59
packages
Kluskey Oct 8, 2024
8787011
progress
Kluskey Oct 8, 2024
26fa74a
hook up entities
Kluskey Oct 8, 2024
fab88cd
cleaning tree
Kluskey Oct 8, 2024
4f0447d
root entity
Kluskey Oct 8, 2024
13deafa
sidebar size fix
Kluskey Oct 8, 2024
402df2a
fix for input firing w/o change
Kluskey Oct 8, 2024
0f5937d
progress on saving entity
Kluskey Oct 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add currentscene
  • Loading branch information
Kluskey committed Oct 6, 2024
commit 41534667903bf960092816999917d293ca7a6ffb
17 changes: 16 additions & 1 deletion mirror-2/app/space/[spaceId]/build/space-viewport.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,27 @@
"use client"

import { useGetAllEntitiesQuery } from "@/state/supabase";
import { useAppDispatch, useAppSelector } from "@/hooks/hooks";
import { getCurrentScene, setCurrentScene } from "@/state/local";
import { useGetAllEntitiesQuery, useGetAllScenesQuery } from "@/state/supabase";
import { useParams } from "next/navigation";
import { useEffect } from "react";

export default function SpaceViewport() {
// get all entities for the scene. may move this to a loader in the future
const params = useParams<{ spaceId: string }>()
const { data: scenes } = useGetAllScenesQuery(params.spaceId);
const { data: entities } = useGetAllEntitiesQuery(params.spaceId);
const currentScene = useAppSelector(getCurrentScene)
const dispatch = useAppDispatch();
useEffect(() => {
if (!currentScene) {
// if no current Scene, set it to the first scene
if (scenes && scenes.length > 0) {
console.log("setting current scene to first scene", scenes[0])
dispatch(setCurrentScene(scenes[0].id))
}
}
}, [])

return (
<main className="h-full">
Expand Down