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

Namui - Hooks 2.0! #609

Merged
merged 185 commits into from
Aug 29, 2023
Merged
Show file tree
Hide file tree
Changes from 183 commits
Commits
Show all changes
185 commits
Select commit Hold shift + click to select a range
6df2317
HMM
namse Jul 25, 2023
45d35dd
Fuck yeah
namse Jul 26, 2023
2f529d0
Remove log
namse Jul 26, 2023
2ee40fc
Full rendering wip
namse Jul 26, 2023
1f4fb41
Event visit
namse Jul 26, 2023
650f273
SetState
namse Jul 26, 2023
394a1ca
Support memo
namse Jul 26, 2023
4d52667
Effect
namse Jul 26, 2023
66ab9fe
Atom
namse Jul 26, 2023
811884a
Ok, Hookv2 ready!
namse Jul 27, 2023
1096802
Check child component type id equality
namse Jul 27, 2023
ead403e
Support use_atom
namse Jul 27, 2023
2e7d311
Translate
namse Jul 27, 2023
48a862f
FUCK YEAH Event, clip, on_top!
namse Jul 27, 2023
2d05bd7
Fix
namse Jul 27, 2023
85a106c
Add readme
namse Jul 27, 2023
016a41a
Merge branch 'master' into namui/hooks2
namse Jul 27, 2023
de1534e
Remove unused crate
namse Jul 27, 2023
c12fdd3
Use local lifetime
namse Jul 29, 2023
cc97cf6
WIP: Let's go to worker!
namse Jul 30, 2023
ad9ef94
Add node resolve in rollup config
namse Jul 30, 2023
cda78a1
Set up async messaging
namse Jul 30, 2023
24bd9dd
Bye bye static idb
namse Jul 30, 2023
dfb8945
Wire up re-render
namse Jul 30, 2023
64ff0ff
Update memo on signal update
namse Jul 30, 2023
411af26
Register web events
bigfoodK Jul 31, 2023
7ec47ba
Remove main from git
namse Jul 31, 2023
e12bccf
Clean up www folder
namse Jul 31, 2023
489a622
Install deps and build webCode in namui-cli
namse Jul 31, 2023
71019e6
Watch webCode on namui start
namse Jul 31, 2023
71b2956
Only flush canvas when it flushed
namse Jul 31, 2023
39206b7
Remove unused code
namse Jul 31, 2023
f561e26
Merge hooks to namui
namse Jul 31, 2023
746a786
Remove logs
namse Jul 31, 2023
ba4751e
WIP: Restore prebuilt
namse Jul 31, 2023
dcb87cb
Before make custom spawn_local
namse Jul 31, 2023
625babf
WIP: Custom tokio and fetch
namse Jul 31, 2023
eb50792
Add localhost:8080 ignore token
namse Jul 31, 2023
990dffc
Remove fetched result in worker
namse Jul 31, 2023
78ac9e3
WIP Luda editor
namse Jul 31, 2023
bd947db
Check sab flag
namse Jul 31, 2023
8cbb6df
SEX
namse Jul 31, 2023
a4c85ae
Restore hotReload script
bigfoodK Aug 1, 2023
9691be9
Revert "Restore hotReload script"
bigfoodK Aug 1, 2023
66f2d09
Restore hot reload script
bigfoodK Aug 1, 2023
b85efc5
Remove unsuing function overwrite_hot_reload_script_with_empty_file
bigfoodK Aug 1, 2023
ad73a62
Watch static root and reload on change
bigfoodK Aug 1, 2023
8e8e480
Revert "Watch static root and reload on change"
bigfoodK Aug 1, 2023
7f25e49
Watch webCode and reload on change
bigfoodK Aug 1, 2023
e250a26
Port sequence_list_page, not rename modal
namse Aug 1, 2023
13480f1
WIP: loaded sequence editor component
namse Aug 1, 2023
377888a
Udpate manual
namse Aug 1, 2023
ebbca77
Remove old manual
namse Aug 1, 2023
8ce3b01
Split up rendering_tree/mod (#589)
bigfoodK Aug 1, 2023
48b0837
Fix multiline-text sample
namse Aug 1, 2023
8898b3d
TextInput: Handle mouse. todo: keyboard
namse Aug 1, 2023
fdd6bed
Fix errors
bigfoodK Aug 2, 2023
1f4c493
WIP: loaded
bigfoodK Aug 2, 2023
7d60f45
WIP: cut_list_view
bigfoodK Aug 2, 2023
4c12f37
Imple Component for component tuples
bigfoodK Aug 2, 2023
f89a65a
Enable hooks::on_top
bigfoodK Aug 2, 2023
f84ab1e
Enable hooks::translate
bigfoodK Aug 2, 2023
9db72b7
WIP: memo_editor
bigfoodK Aug 2, 2023
37e694d
WIP: memo_list_view
bigfoodK Aug 2, 2023
bd5cfcf
Text input WIP
namse Aug 2, 2023
1871d18
Bye bye children~/rust/build/x86_64-unknown-linux-gnu/stage1/bin/rust…
namse Aug 2, 2023
3277114
Remove unused code
namse Aug 2, 2023
dbae6bf
Remove unused code
namse Aug 2, 2023
659f061
use_children to done
namse Aug 2, 2023
c79b7cb
Rollback consuming
namse Aug 2, 2023
da6e614
Clear code
namse Aug 2, 2023
b3c94ef
Remove 'use', Remove text_input system
namse Aug 2, 2023
7ba3567
Support keyboard for text_input
namse Aug 3, 2023
100df16
TrackEq & prevent default code
namse Aug 3, 2023
19a445e
Fix sample error
namse Aug 3, 2023
5cfd700
Fix wrong flushing used sigs
namse Aug 3, 2023
89d4b67
Merge branch 'namui/hooks2' into namui/hooks2-luda-editor
bigfoodK Aug 3, 2023
6b3b310
WIP: cut_editor
bigfoodK Aug 4, 2023
8b98514
Enable hooks::clip
bigfoodK Aug 4, 2023
3621d0a
WIP: wysiwyg_tool
bigfoodK Aug 4, 2023
2abaa86
Use Boxed fn for event handler
bigfoodK Aug 4, 2023
626f635
Merge branch 'namui/hooks2-luda-editor' into namui/hooks2
bigfoodK Aug 4, 2023
0e2c082
Use Boxed fn for event handler
bigfoodK Aug 4, 2023
1e12d4d
Add callback macro
namse Aug 4, 2023
5ed602a
WIP
namse Aug 4, 2023
62d279c
Before return
namse Aug 5, 2023
9f45421
OH?
namse Aug 5, 2023
fe4d12a
TABLE!
namse Aug 5, 2023
621286f
Button1
namse Aug 5, 2023
bd213cc
WIP
namse Aug 6, 2023
3c42102
Before change render
namse Aug 6, 2023
dd18ff4
WIP-3
namse Aug 6, 2023
2d58f14
SEX
namse Aug 6, 2023
83bdced
Remove matrix and branch ctx
namse Aug 7, 2023
717a494
Hello key!
namse Aug 7, 2023
8f0d1be
Fix wrong drawing drop problem
namse Aug 7, 2023
7a8a8e2
Revert "Fix wrong drawing drop problem"
namse Aug 7, 2023
96fcf86
Fix drawing drop problem again
namse Aug 7, 2023
24139f5
Get bounding box using ghost render
namse Aug 7, 2023
419198b
Merge branch 'namui/hooks2-luda-editor2'
bigfoodK Aug 7, 2023
5e28d6d
Merge branch `namui/hooks2-luda-editor2`
bigfoodK Aug 7, 2023
7890c4b
Fix ghost render and fit, scroll
namse Aug 7, 2023
0c90bcf
Uncomment text_input and context_menu components
bigfoodK Aug 13, 2023
5471ba1
Use new namui runtime
bigfoodK Aug 13, 2023
fb86780
Render image
namse Aug 12, 2023
0134cbc
Show fps
namse Aug 12, 2023
ed28c19
Bounding box and xy_in
namse Aug 13, 2023
137307d
Set up text_input
namse Aug 13, 2023
0fd0628
Prevent draw same rendering tree
namse Aug 13, 2023
d832eb6
Revive namui-prebuilt
namse Aug 13, 2023
210679c
Remove unused code
namse Aug 13, 2023
2326fcd
Revive web async function
namse Aug 13, 2023
e9ae819
Use promise for web async function
namse Aug 13, 2023
b940f23
Fix wrong init function for web
namse Aug 13, 2023
0e85fcb
Update image drawing
namse Aug 14, 2023
9013f2f
Load image
namse Aug 14, 2023
cfd853c
Show web runtime build log refined
bigfoodK Aug 15, 2023
5a0cab4
Use hooks for pre_built
bigfoodK Aug 20, 2023
cc5481c
Use new namui runtime for luda-editor
bigfoodK Aug 20, 2023
3956a30
Transfer ArrayBuffer instead Uint8Array
namse Aug 20, 2023
d74ed11
Clear error messages after build
bigfoodK Aug 20, 2023
2efa0f6
Await namui start of luda-editor
bigfoodK Aug 20, 2023
c1afbd3
Fix fn execute_function to use correct args
bigfoodK Aug 20, 2023
47f09bb
Remove undefined-filled array
namse Aug 20, 2023
1604086
Fix private function expose
namse Aug 20, 2023
f59923e
Rerender after set state
namse Aug 20, 2023
3ae3345
Chore
namse Aug 20, 2023
701eb94
Support hash change event handle
namse Aug 20, 2023
09e2a86
Resize canvas on window resize
bigfoodK Aug 20, 2023
9dc806e
Do not premultiply alpha on creating ImageBitmap
bigfoodK Aug 20, 2023
ae1bbad
Run build in parallel
bigfoodK Aug 20, 2023
550649f
Fix wrong list view cell height
namse Aug 20, 2023
a26858f
Temporary disable luda-adventure
namse Aug 20, 2023
7e55301
Impl ghost_compose
namse Aug 22, 2023
b6e8023
Handle file drop event
bigfoodK Aug 22, 2023
98f61c1
Open character editor on Add Cg button clicked
bigfoodK Aug 22, 2023
5adb940
Remove unused code
namse Aug 22, 2023
27374f3
Support prevent_default for text_input
namse Aug 22, 2023
fb0e5ea
Update locks
namse Aug 22, 2023
98ae438
Support prevent_default for key and mouse event
namse Aug 22, 2023
5b673fe
Delete is_stop_propagation
namse Aug 22, 2023
3112f54
Clean up hooks files
namse Aug 22, 2023
c3fa646
Remove unused code
namse Aug 22, 2023
af3ad23
Remove stop-propagation
namse Aug 22, 2023
8e75197
Handle event propagation stopping
namse Aug 22, 2023
62ef8bb
Turn on error for warning
namse Aug 22, 2023
dbec715
Support focus and blur for text input
namse Aug 22, 2023
a7e49a8
Call Effect CleanUp
namse Aug 22, 2023
30c366d
Render memo_editor in correct wh
bigfoodK Aug 23, 2023
794074f
Close cut_editor context_menu on click outside
bigfoodK Aug 23, 2023
36a44b1
Remove unused code
namse Aug 23, 2023
c71bea0
Fix wrong event attach for cg picker
namse Aug 23, 2023
24f65ff
Fucking awesome context menu system
namse Aug 23, 2023
7609019
Remove comment
namse Aug 23, 2023
2dac38d
Trap event propagation to fix memo text input problem
namse Aug 24, 2023
dcafc48
Impl with_mouse_cursor for hooks
bigfoodK Aug 25, 2023
a951442
Remove loaded_prev
namse Aug 26, 2023
4e8c99d
Reverse rendering order
namse Aug 26, 2023
948b092
Fix rendering order of wysiwyg_tools
bigfoodK Aug 26, 2023
2de12ee
Use thick stroke for cg part selection
namse Aug 26, 2023
8eb0469
Fix rendering order of cg_render
bigfoodK Aug 26, 2023
851d52e
Check local_xy for wheel event, close #598
namse Aug 26, 2023
aaa7969
Focus cut editor on inner component focused
bigfoodK Aug 26, 2023
338c305
Fix wrong rendering order of text input
bigfoodK Aug 26, 2023
85ffea7
Check clip for xy_in, Fix #593
namse Aug 26, 2023
6de1b6c
Blur character name input on click outside
bigfoodK Aug 26, 2023
6ca94c7
Stop propagation event on context menu clicked
bigfoodK Aug 26, 2023
7ace9e9
Optimize complete_put_psd, fix #596
namse Aug 26, 2023
7bf74b6
Remove unused code
namse Aug 26, 2023
6f03721
Fix wrong clear_unrendered_chidlren
namse Aug 27, 2023
c4f099f
Re-implement with_mouse_cursor
bigfoodK Aug 28, 2023
12b98d5
Fix Text Input focusing problem, fix #603, #604
namse Aug 28, 2023
6a09ed3
Remove unusing files in luda-editor
bigfoodK Aug 28, 2023
f607ec7
Update branch
bigfoodK Aug 29, 2023
cfefbaf
Merge branch 'master' into namui/hooks2-add
bigfoodK Aug 29, 2023
8e91c32
Strip whitespace of ignored project paths
bigfoodK Aug 29, 2023
e8856bd
Ignore namui sample projects
bigfoodK Aug 29, 2023
5926b67
Ignore quick projects
bigfoodK Aug 29, 2023
c7fd81c
Clean check fmt all
bigfoodK Aug 29, 2023
b58a8a4
Disable unusing module runtime_effect
bigfoodK Aug 29, 2023
c8a118f
Allow dead_code for log in namui-skia
bigfoodK Aug 29, 2023
eec4ebd
Disable table::hooks closure_should_give_right_wh test
bigfoodK Aug 29, 2023
14d8e62
Merge branch 'master' into namui/hooks2-add
bigfoodK Aug 29, 2023
d8c5b9b
Remove unused codes
namse Aug 29, 2023
d353bf0
Fix all warning
namse Aug 29, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
56 changes: 28 additions & 28 deletions .github/workflows/namui-test-host-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,33 +113,33 @@ jobs:
target: wasm-unknown-web
path: namui-prebuilt

test-namui-sample:
needs: [check-rebuild]
if: needs.check-rebuild.outputs.namui-sample == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/init-test-job
- uses: ./.github/actions/namui-test
with:
target: wasm-unknown-web
path: namui/sample/text-input
- uses: ./.github/actions/namui-test
with:
target: wasm-unknown-web
path: namui/sample/shader
- uses: ./.github/actions/namui-test
with:
target: wasm-unknown-web
path: namui/sample/multiline-text
- uses: ./.github/actions/namui-test
with:
target: wasm-unknown-web
path: namui/sample/type_macro
- uses: ./.github/actions/namui-test
with:
target: wasm-unknown-web
path: namui/sample/rect
# test-namui-sample:
# needs: [check-rebuild]
# if: needs.check-rebuild.outputs.namui-sample == 'true'
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - uses: ./.github/actions/init-test-job
# - uses: ./.github/actions/namui-test
# with:
# target: wasm-unknown-web
# path: namui/sample/text-input
# - uses: ./.github/actions/namui-test
# with:
# target: wasm-unknown-web
# path: namui/sample/shader
# - uses: ./.github/actions/namui-test
# with:
# target: wasm-unknown-web
# path: namui/sample/multiline-text
# - uses: ./.github/actions/namui-test
# with:
# target: wasm-unknown-web
# path: namui/sample/type_macro
# - uses: ./.github/actions/namui-test
# with:
# target: wasm-unknown-web
# path: namui/sample/rect

# test-luda-adventure:
# needs: [check-rebuild]
Expand All @@ -165,7 +165,7 @@ jobs:
- test-namui
- test-luda-editor
- test-namui-prebuilt
- test-namui-sample
# - test-namui-sample
# - test-luda-adventure
steps:
- run: echo ${{ join(needs.*.result, ',') }}
Expand Down
13 changes: 13 additions & 0 deletions .ignored_projects
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# Write down the cargo manifest dir to ignore
luda-adventure
luda-adventure/ecs-macro
# TODO: namui samples
namui/sample/audio
namui/sample/hooks-v2
namui/sample/hooks
namui/sample/multiline-text
namui/sample/rect
namui/sample/shader
namui/sample/tab-to-next-text-input
namui/sample/text-input
namui/sample/type_macro
# TODO: quick
quick
quick/sample/tui
26 changes: 26 additions & 0 deletions cargo-check-all.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/usr/bin/env python3

import os
from platform import uname


def in_wsl() -> bool:
return 'microsoft-standard' in uname().release


def run():
for manifest_path in os.popen("git ls-files | grep -e /Cargo.toml").read().splitlines():
dir_path = os.path.dirname(manifest_path)
print(f"cd {dir_path} && cargo check")
exit = os.system(
f"cd {dir_path} && cargo check")
if exit != 0:
print(f"\n\n-- fail cargo check on {dir_path}\n\n")
return

run()
if in_wsl():
os.system("powershell.exe '[console]::beep(261.6,700)'")
else:
# I don't know how to make beep sound in other OS
pass
Loading
Loading