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. facility cover image upload #3528

Merged
merged 28 commits into from
Oct 26, 2022

Conversation

rithviknishad
Copy link
Member

@rithviknishad rithviknishad commented Sep 3, 2022

Closes #2171
Closes #2131
Fixes #3527

1. Shows the image on the facilities list page

image

1.5 Shows the image on the facility home page

image

image

2. Edit a facility cover photo

image

3. Or upload a new cover photo

image

@coronasafe/care-fe-code-reviewers @coronasafe/code-reviewers

Merge Checklist

  • Add specs that demonstrate bug / test a new feature.
  • Update product documentation.
  • Ensure that UI text is kept in I18n files.
  • Prep screenshot or demo video for changelog entry, and attach it to issue.
  • Request for Peer Reviews
  • Completion of QA

@netlify
Copy link

netlify bot commented Sep 3, 2022

Deploy Preview for care-egov-staging ready!

Name Link
🔨 Latest commit 9999b9e
🔍 Latest deploy log https://app.netlify.com/sites/care-egov-staging/deploys/63576ba7e580aa0008fa7b27
😎 Deploy Preview https://deploy-preview-3528--care-egov-staging.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 site settings.

@github-actions
Copy link

github-actions bot commented Oct 4, 2022

👋 Hi, @rithviknishad,
Conflicts have been detected against the base branch. Please rebase your branch against the base branch.


This message is automatically generated by prince-chrismc/label-merge-conflicts-action so don't hesitate to report issues/improvements there.

@github-actions github-actions bot removed the merge conflict pull requests with merge conflict label Oct 11, 2022
@rithviknishad rithviknishad marked this pull request as ready for review October 11, 2022 13:28
@rithviknishad rithviknishad requested a review from a team October 11, 2022 13:28
@rithviknishad rithviknishad requested a review from a team as a code owner October 11, 2022 13:28
@nihal467
Copy link
Member

@rithviknishad i can see a github-code-scanning comment, can you check it and let me know, the PR is good for testing and its been approved in the EOD meeting

@nihal467
Copy link
Member

nihal467 commented Oct 20, 2022

@rithviknishad
image

  • the upload page is not responsive

image

  • even though i can upload and change exisiting cover with district admin id, not able to delete the facility cover page

image

  • when i click on the save button, there is no action been take place nor iam receiving any notification

image

there is no cover page ratio is been mentioned in the page, if its been mentioned, it would be good for a user to resize the image before uploading it to the platform.

image

  • a option to crop, reposition the view of the uploaded photo would be great, before working on this, discuss it on the EOD call,

@rithviknishad
Copy link
Member Author

rithviknishad commented Oct 21, 2022

<div className="flex-1 flex m-8 rounded-lg items-center justify-center">
{preview || facility.read_cover_image_url ? (
<img
src={imgSrc}

Check warning

Code scanning / CodeQL

DOM text reinterpreted as HTML

[DOM text](1) is reinterpreted as HTML without escaping meta-characters.
Copy link
Member

Choose a reason for hiding this comment

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

@rithviknishad try validating the url (imgSrc), something like

src={ isValidURL(imgSrc) ? imgSrc : defaultURL }

@nihal467
Copy link
Member

test approved

Copy link
Member

@khavinshankar khavinshankar left a comment

Choose a reason for hiding this comment

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

LGTM

@sonarcloud
Copy link

sonarcloud bot commented Oct 25, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 3 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@khavinshankar khavinshankar merged commit cf3e995 into coronasafe:develop Oct 26, 2022
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.

Facility card is not symmetrically rounded Facility Images Facility Images
3 participants