Commit a55b454
* make standalone UI work
* integrate to handle onChange
* update getAncestry to getAncestryWithSelf
* show existing link location on open
* lint LinkEditorModal
* refactor - remove moveItem (use ResourceItem instead)
* refactor: reuse ResourceSelector
* add gap
* use Resource.type for checking instead
* make isHighlighted compulsory
* ensure api returns desired type
* better typecheck of values from trpc.resource
* update to use onlyShowFolders instead
* fix - display full permalink
* update from div to Box
* replace to use import from generatedEnums
* refactor - use single source of truth getIcon
* update schema name to getAncestryWithSelfSchema to be consistent
* fix mock - getAncestry to getAncestryWithSelf
* remove "undefined" from "type"
* remove "null" from acceptable type value
* refactor - do a 1-for-1 abstraction to useResourceStack
* abstract away more stuff + usememo/usecallback for perf
* add missing dependencies in addToStack
* refactor - move logic into ResourceItem
* more explicit about the props
* remove unused import
* return flatten item
* pass in fullPermalink instead
* undo absttracting away into useResourceStack
* add gap
* exclude index page from showing up in search
* fix - full width issue
* add searchbar skeleton
* update resourceItem UI
* refactor headers out
* abstract logic away
* add "results count" state
* option for additional padding based on whether user is using search
* set fixed height to 280px
* fix text alignment issue
* fix "back to home" padding
* refactor into new file + add "NoItemsInFolderResult"
* refactor - move all logic into ResourceSelector to reduce number of props passed
* rename to ResourceSelectorContent
* clear searchbar on clicking clear search button
* allow passing in of resourcetypes into search query
* extract into useSearchQuery
* use useSearchQuery instead
* reduce API call by passing in siteId
* move useSearchQuery out of useResourceStack
* add loading state
* remove unused import
* prep: abstract logic into useResourceStack for easier refactoring
* refactor into getAncestryWithSelf + add getBatchAncestryWithSelf endpoint
* fix - use handleOnClick directly
* fix - make resourceTypes optional for search endpoint
* fix test
* standardize types into 1
* hide logic in hook + fix search
* add comment
* set higher height for Skeleton
* remove unused type export
* fix nested use hooks issue
* fix navigation
* fix padding on "load more" button
* fix - overwrite returned functions for search by query
* extract lastResourceItemInAncestryStack into standalone utils file
* usecallback everything + pass out clearSearchValue
* clearSearchValue() onChange current
* fix typo in query
* fix test
* fix - incorrect header shown when using query
* fix - remove conditional for hook
* remove accidental .only commit
* enforce using output schema instead
* fix stories
* add stories
* fix lint
* slight refactoring - move isResourceItemDisabled into hook
* add getNestedFolderChildrenOf endpoint
* update isResourceItemDisabled to return true for nested children
* lint + use useMemo to improve perf
* allow passing in of file explorer height + update skeleton height and full width
* Update apps/studio/src/server/modules/resource/resource.service.ts
Co-authored-by: Kar Rui Lau <[email protected]>
* chore: refactor and fix based on comments
* chore: fix query
* fix - missing comma
* add output schema
* add output schema
* replace [0]
* replace with Error
* rename to matchedResources
* fix - use the correct resource
* fix - suspend header and content for better UX
* break useResourceStack into useResourceSelector hook
* split into useResourceQuery
* update preview-tw
* remove compute to DB
* fix lint
* replace with recursive CTE
* fix suspense (searcbar should not suspense)
* use "interactionType"
* fix getBatchAncestryWithSelfQuery
* early returns
* replace logic with sql
* cast to text
* add unit test
* move types out
* fix - link editor link not showing if existing link
* fix (move modal should show parent children instead) + rename for clarity
* refactor: improve type safety for ResourceSelector components
* fix - double flash
* fix: move to root
* refactor: extract prop types for ResourceSelector components
* lint and format
* feat: add resource type to move resource action
* invalidate queries on moved
* chore: clean up unused Tailwind CSS classes
* fix: add descriptive error message for cross-site resource move
* fix: prevent moving resource to its current parent folder
* fix: allow clearing resource selection in ResourceSelector
* fix: improve resource move destination selection handling
* fix: handle null resourceId in link editor reference link generation
* fix: add descriptive error message for cross-site resource move
* test: add test for preventing resource move to the same folder
* refactor: extract user permissions setup into reusable function
* test: add permission checks for moving resources to root page
* fix: ensure async user permissions setup is properly awaited
* refactor(tests): simplify editor permissions setup in folder router tests
* test(resource): remove hardcoded homepage from ancestry stack
* fix(resource): prepend leading slash to fullPermalink
* fix(stories): update getAncestryStack handler to return empty array
* fix double slash
* remove flashing
* fix(component): prevent event propagation in ResourceSelectorHeader
---------
Co-authored-by: Kar Rui Lau <[email protected]>
1 parent b384d04 commit a55b454
File tree
40 files changed
+2051
-736
lines changed- apps/studio
- src
- components
- ErrorBoundary
- PageEditor
- ResourceSelector
- utils
- Searchbar
- features
- dashboard/components
- CollectionTable
- DirectorySidebar
- ResourceTable
- editing-experience
- components
- CreateCollectionPageModal
- MoveResourceModal
- form-builder/components
- hooks
- schemas
- server/modules
- folder/__tests__
- resource
- __tests__
- stories/Page
- EditPage
- utils
- tests
- integration/helpers/seed
- msw/handlers
40 files changed
+2051
-736
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | | - | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
Lines changed: 14 additions & 26 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | 11 | | |
13 | 12 | | |
14 | 13 | | |
| |||
33 | 32 | | |
34 | 33 | | |
35 | 34 | | |
36 | | - | |
37 | 35 | | |
38 | 36 | | |
39 | 37 | | |
| |||
48 | 46 | | |
49 | 47 | | |
50 | 48 | | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | 49 | | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
76 | 64 | | |
77 | 65 | | |
78 | 66 | | |
| |||
Lines changed: 57 additions & 89 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
| 1 | + | |
| 2 | + | |
4 | 3 | | |
5 | 4 | | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | 5 | | |
11 | | - | |
| 6 | + | |
| 7 | + | |
12 | 8 | | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
20 | 16 | | |
21 | 17 | | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
| 18 | + | |
44 | 19 | | |
45 | 20 | | |
46 | 21 | | |
47 | 22 | | |
48 | 23 | | |
49 | | - | |
50 | | - | |
51 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
52 | 54 | | |
53 | 55 | | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
| 56 | + | |
66 | 57 | | |
67 | | - | |
| 58 | + | |
| 59 | + | |
68 | 60 | | |
69 | 61 | | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
78 | 66 | | |
79 | | - | |
80 | | - | |
81 | | - | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
82 | 70 | | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
108 | 76 | | |
109 | 77 | | |
0 commit comments