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

feat: allow manually adding changes summary to a version of an app #752

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kabaros
Copy link
Collaborator

@kabaros kabaros commented Feb 19, 2025

This adds the ability to manually edit/add change summary, to show in addition to the change log summary for the CHANGELOG.md.

implements https://dhis2.atlassian.net/browse/HUB-167

manual-changes-create.webm
manual-changes-edit.webm

@codecov-commenter
Copy link

codecov-commenter commented Feb 19, 2025

Codecov Report

Attention: Patch coverage is 61.11111% with 7 lines in your changes missing coverage. Please review.

Please upload report for BASE (master@1002609). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...components/Versions/VersionsTable/VersionsTable.js 71.42% 4 Missing ⚠️
client/src/api/index.js 0.00% 2 Missing ⚠️
client/src/pages/AppView/AppView.js 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##             master     #752   +/-   ##
=========================================
  Coverage          ?   65.83%           
=========================================
  Files             ?       29           
  Lines             ?      559           
  Branches          ?      131           
=========================================
  Hits              ?      368           
  Misses            ?      178           
  Partials          ?       13           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -32,21 +32,26 @@ const InitializeAuth = ({ children }) => {
}, [getAccessTokenSilently])

useEffect(() => {
if (!isLoading && isAuthenticated && user) {
const getUserInfo = async () => {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I can't remember anymore if this is the right way of doing a side effect in Redux without something like redux-thunk - but I don't see redux-thunk installed and this seems to work

version: values,
})
let message = `Successfully created app version ${values.version}`
if (editMode) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

is it worth it keeping the same component for edit and add? I wasn't sure (but I should at least update the file name if this doesn't look too messy for people)

@@ -91,6 +91,8 @@ module.exports = {
throw Boom.notFound('No apps found')
}

return v1FormattedArray[0]
const result = v1FormattedArray[0]
result.userCanEditApp = isDeveloper
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this is the easiest way I found to be able to decide if a user should be able to edit, without making an extra call

@kabaros kabaros requested a review from a team February 19, 2025 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants