Commit 1bcad6d
authored
146 (#150)
* #146 feat: add raw initData accessor
* #146 docs: add raw initData retrieval example to README
* #146 refactor: split webapp.rs into logical modules
Split monolithic webapp.rs (3591 lines) into 10 focused modules following Single Responsibility Principle:
- types.rs (265 lines): All shared types, enums, and structs
- core.rs (153 lines): Instance management and validation
- lifecycle.rs (235 lines): App lifecycle and window control
- buttons.rs (701 lines): All button operations (main, secondary, bottom, back)
- dialogs.rs (102 lines): User dialogs and popups
- navigation.rs (232 lines): Links, sharing, and navigation
- permissions.rs (196 lines): Permission requests and file operations
- theme.rs (53 lines): Theme and color management
- viewport.rs (92 lines): Viewport and safe area operations
- events.rs (276 lines): Event handling system
Main webapp.rs reduced to 1401 lines (re-exports + tests).
Benefits:
- Each module has single clear responsibility
- Easier maintenance and navigation
- Better encapsulation with pub(super) visibility
- No module exceeds 701 lines
- All tests pass (207 tests)
- Zero clippy warnings1 parent 3b5eaa6 commit 1bcad6d
File tree
16 files changed
+2523
-2192
lines changed- src
- core
- webapp
- tests
16 files changed
+2523
-2192
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
654 | 654 | | |
655 | 655 | | |
656 | 656 | | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
657 | 681 | | |
658 | 682 | | |
659 | 683 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
31 | | - | |
| 32 | + | |
| 33 | + | |
32 | 34 | | |
33 | 35 | | |
34 | 36 | | |
35 | 37 | | |
36 | | - | |
| 38 | + | |
| 39 | + | |
37 | 40 | | |
38 | 41 | | |
39 | 42 | | |
| |||
48 | 51 | | |
49 | 52 | | |
50 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
51 | 82 | | |
52 | 83 | | |
53 | 84 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
| 84 | + | |
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
0 commit comments