Diya fix(ui): Fixed Owner Message Popup on Image Upload#5252
Open
DiyaWadhwani wants to merge 2 commits into
Open
Diya fix(ui): Fixed Owner Message Popup on Image Upload#5252DiyaWadhwani wants to merge 2 commits into
DiyaWadhwani wants to merge 2 commits into
Conversation
✅ Deploy Preview for highestgoodnetwork-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description
Fixes two UX issues with the Owner Message image upload flow:
getMessage()not being called after a successful save, leaving Redux state emptyFixes: Owner Message modal shows raw base64 in textarea and resets to fresh view on reopen after saving image
Related PRs:
Follow-up to PRs #4769 and #5169.
Main changes explained:
src/components/OwnerMessage/OwnerMessage.jsxto display a friendly confirmation string in the textarea when an image is selected instead of the raw base64 stringsrc/components/OwnerMessage/OwnerMessage.jsxto add a "Remove image" button allowing the user to clear the selected image and return to the upload formsrc/components/OwnerMessage/OwnerMessage.jsxto callgetMessage()after a successful save so Redux state is refreshed and reopening the modal correctly shows the image-selected stateHow to test:
npm install --forceandnpm run start:localeditHeaderMessagepermission.png,.jpg, or.jpegimage✓ Image selected — click Update/Create to saveinstead of a base64 stringNote:
The root cause of the reopen issue was that
getMessage()was never called after saving, soownerMessagein Redux remained empty until page refresh. The textarea confirmation message is display-only — the actual base64 is still stored inmessagestate and saved correctly.