Skip to content

3.0.0/project/refactor project form#1537

Merged
CalamityC merged 23 commits into3.0.0/releasefrom
3.0.0/project/refactor-project-form
Mar 27, 2026
Merged

3.0.0/project/refactor project form#1537
CalamityC merged 23 commits into3.0.0/releasefrom
3.0.0/project/refactor-project-form

Conversation

@CalamityC
Copy link
Copy Markdown
Collaborator

  • refactor ProjectForm
  • use ProjectForm inside projects list
  • adjust helper functions, reducers, actions and cofigureStore

@CalamityC CalamityC changed the base branch from main to 3.0.0/release February 26, 2026 21:46
@CalamityC CalamityC force-pushed the 3.0.0/project/refactor-project-form branch from fe28323 to 8d529db Compare March 3, 2026 12:20
@jochenklar jochenklar added this to the RDMO 3.0.0 milestone Mar 5, 2026
@CalamityC CalamityC force-pushed the 3.0.0/project/refactor-project-form branch from 442fac5 to de6aa4e Compare March 5, 2026 15:03
@CalamityC CalamityC requested a review from jochenklar March 12, 2026 15:14
Copy link
Copy Markdown
Member

@jochenklar jochenklar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I fixed/improved very minor issues and fixed the copy API. My comments a mostly questions and ideas for future improvement.

Comment thread rdmo/projects/assets/js/project/utils/meta.js Outdated

const { showTopButton, scrollToTop } = useScrollToTop()

const { show: showInvitations, open: openInvitations, close: closeInvitations } = useModal()
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also

            project={selectedProject}
            id={selectedProject?.id}

is basically the same prop.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was because of using the delete modal also on the projects page

Comment thread rdmo/core/assets/js/components/forms/Select.js
})
const [parentFetchError, setParentFetchError] = useState(null)

useEffect(() => {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also maybe for a future PR, maybe this could be an custom hook.

})
}, [])

const catalogOptions = useMemo(
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also maybe for a future PR, maybe this could be an custom hook.

return dispatch(updateProject(payload))
}

const debouncedSaveShort = useDebouncedCallback(saveProject, 500)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess the part with the short and long debounce could also moved into a custom hook in core.

@CalamityC CalamityC marked this pull request as ready for review March 27, 2026 15:37
@CalamityC CalamityC merged commit 007164e into 3.0.0/release Mar 27, 2026
5 of 11 checks passed
@CalamityC CalamityC deleted the 3.0.0/project/refactor-project-form branch March 27, 2026 15:37
@CalamityC CalamityC restored the 3.0.0/project/refactor-project-form branch March 27, 2026 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants