3.0.0/project/refactor project form#1537
Conversation
CalamityC
commented
Feb 26, 2026
- refactor ProjectForm
- use ProjectForm inside projects list
- adjust helper functions, reducers, actions and cofigureStore
fe28323 to
8d529db
Compare
* fix forms Select
* adjust helper functions, reducers, actions and cofigureStore
* implement create and copy * fix reducer
* remove unused views
442fac5 to
de6aa4e
Compare
* refetch loaded pages after update and delete
jochenklar
left a comment
There was a problem hiding this comment.
Thanks! I fixed/improved very minor issues and fixed the copy API. My comments a mostly questions and ideas for future improvement.
|
|
||
| const { showTopButton, scrollToTop } = useScrollToTop() | ||
|
|
||
| const { show: showInvitations, open: openInvitations, close: closeInvitations } = useModal() |
There was a problem hiding this comment.
We could use
const importModal = useModal()
here and in the code importModal.show() etc. which I find a bit more readable. But better in the next PR.
| onSaved={closeCreate} | ||
| /> | ||
| </Modal> | ||
| <ProjectDeleteModal |
There was a problem hiding this comment.
For a new PR I thing it would be good to refactor ProjectDeleteModal into a DeleteForm so that this process works like the ProjectForm one. It's a bit odd right now.
There was a problem hiding this comment.
Also
project={selectedProject}
id={selectedProject?.id}is basically the same prop.
There was a problem hiding this comment.
That was because of using the delete modal also on the projects page
| }) | ||
| const [parentFetchError, setParentFetchError] = useState(null) | ||
|
|
||
| useEffect(() => { |
There was a problem hiding this comment.
Also maybe for a future PR, maybe this could be an custom hook.
| }) | ||
| }, []) | ||
|
|
||
| const catalogOptions = useMemo( |
There was a problem hiding this comment.
Also maybe for a future PR, maybe this could be an custom hook.
| return dispatch(updateProject(payload)) | ||
| } | ||
|
|
||
| const debouncedSaveShort = useDebouncedCallback(saveProject, 500) |
There was a problem hiding this comment.
I guess the part with the short and long debounce could also moved into a custom hook in core.