Skip to content

Sai Teja: Hide owner message upload after image selection#5169

Open
saitejakaasoju wants to merge 1 commit intodevelopmentfrom
saiteja/owner-message-hide-upload-clean
Open

Sai Teja: Hide owner message upload after image selection#5169
saitejakaasoju wants to merge 1 commit intodevelopmentfrom
saiteja/owner-message-hide-upload-clean

Conversation

@saitejakaasoju
Copy link
Copy Markdown
Contributor

Description

Screenshot 2026-04-17 at 11 19 03 PM

Implements the follow-up owner message UI fix to hide the image upload section once a valid photo is selected in the owner message modal. This is a frontend-only change related to the existing owner message flow and prevents the modal from continuing to show upload controls after the message has already become an image payload.

Implements # (PRIORITY HIGH) Hide image payload when a photo is chosen for owner message

Related PRS (if any):

This is a frontend-only PR.
It is a follow-up to the earlier owner message work introduced in PR #4769.

Main changes explained:

  • Update src/components/OwnerMessage/OwnerMessage.jsx to detect image-based owner messages with a stable string-based helper instead of the previous regex-based check.
  • Update src/components/OwnerMessage/OwnerMessage.jsx to hide the image upload text, size note, and file input once a valid image has been selected.
  • Update src/components/OwnerMessage/OwnerMessage.jsx to add an accessible label to the image input for clearer targeting and testability.
  • Update src/components/OwnerMessage/__tests__/OwnerMessage.test.jsx to add a focused test that verifies the upload controls disappear after image selection.

How to test:

  1. check into current branch
  2. do npm install and ... to run this PR locally
  3. Clear site data/cache
  4. Log in as a user with permission to edit the owner message.
  5. Go to the Dashboard and look at the top header owner message area.
  6. Click the owner message edit icon to open the Create message modal.
  7. Verify that before selecting an image, the modal shows:
  • the text area
  • Or upload a picture:
  • the size note
  • the file input
  1. Select a valid .png, .jpg, or .jpeg image.
  2. Verify that after image selection:
  • Or upload a picture: is no longer visible
  • the size note is no longer visible
  • the file input is no longer visible
  • the text area remains visible and is disabled
  1. Save the message and verify the owner message image still displays correctly in the header.
  2. Reopen the modal and confirm the upload controls remain hidden for the image-based owner message.

Screenshots or videos of changes:

Screen.Recording.2026-04-10.at.2.52.00.PM.mov

Note:

Include the information the reviewers need to know.

@netlify
Copy link
Copy Markdown

netlify bot commented Apr 18, 2026

Deploy Preview for highestgoodnetwork-dev ready!

Name Link
🔨 Latest commit 2274fc2
🔍 Latest deploy log https://app.netlify.com/projects/highestgoodnetwork-dev/deploys/69e308fbd0ca430008043c59
😎 Deploy Preview https://deploy-preview-5169--highestgoodnetwork-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@sonarqubecloud
Copy link
Copy Markdown

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.

1 participant