hackforla / website

Hack for LA's website
https://www.hackforla.org
GNU General Public License v2.0
321 stars 753 forks source link

Wins page: Fix question marks appearing where apostrophes are expected #2675

Closed JessicaLucindaCheng closed 1 year ago

JessicaLucindaCheng commented 2 years ago

Overview

As developers, we want to make sure the website displays information correctly so that the information is accurate and our website looks professional. For this issue, we will figure out what is causing the apostrophes to change to question marks in the Google Apps Script and fix the problem.

Screenshot of problem: Question marks where apostrophes are expected wins-page-question-marks

Details

The original submission by Janie Chen did not contain question marks in the Wins-form (Responses) Google Sheet. However, the question marks appear on the Wins page. The problem may come from the Google Apps Script that generates the _data/external/_wins-data.json and _data/external/wins-data.json because the question marks are seen in the json files.

Action Items

Resources/Instructions

github-actions[bot] commented 2 years ago

Hi @JessicaLucindaCheng.

Please don't forget to add the proper labels to this issue. Currently, the labels for the following are missing: Size, Role

To add a label, take a look at Github's documentation here.

Also, don't forget to remove the "missing labels" afterwards. To remove a label, the process is similar to adding a label, but you select a currently added label to remove it.

After the proper labels are added, the merge team will review the issue and add a "Ready for Milestone" label once it is ready for prioritization.

Additional Resources:

JessicaLucindaCheng commented 2 years ago

@SAUMILDHANKAR @R-Tomas-Gonzalez

  1. Did you want it so that any backend developer can take this issue and would need to just ask a technical lead for access to the wins submission Google Sheet?

  2. I don't have access to the wins Google Sheet and don't know what the link for it is. Can one of you add it to the Resources section?

JessicaLucindaCheng commented 2 years ago

@SAUMILDHANKAR @R-Tomas-Gonzalez

  1. Did you want it so that any backend developer can take this issue and would need to just ask a technical lead for access to the wins submission Google Sheet?

  2. I don't have access to the wins Google Sheet and don't know what the link for it is. Can one of you add it to the Resources section?

  1. Tomas said just tech lead is fine
  2. I'm just going to leave out the resource because I don't have access to it nor a link for it.
JessicaLucindaCheng commented 2 years ago

@SAUMILDHANKAR Since the files needed to fix this issue are in the protected admin drive, should I restrict this issue to admins/leads that have access to the drive to work on? Or can it be open to other developers and they would just have to ask a lead for access (similar to how Matt wrote issue #2385)?

SAUMILDHANKAR commented 2 years ago

@JessicaLucindaCheng It can be open to other developers as well. (like Matt's issue). Thanks for bringing it up.

JessicaLucindaCheng commented 2 years ago

@SAUMILDHANKAR Since you are more familiar with Google AppScripts than I am. Could you review this issue for ready for milestone? If it's not ready, please provide feedback as to what I need to change. Thank you.

SAUMILDHANKAR commented 2 years ago

@SAUMILDHANKAR Since you are more familiar with Google AppScripts than I am. Could you review this issue for ready for milestone? If it's not ready, please provide feedback as to what I need to change. Thank you.

@JessicaLucindaCheng Thanks for writing the issue. My suggestions:

JessicaLucindaCheng commented 2 years ago

@SAUMILDHANKAR I really appreciate you taking the time to give me feedback on writing this issue. I made the requested changes, except I left the title more descriptive because I felt being descriptive and clear was more important than being super succinct. (Though I did shorten the title a bit.)

Please put a ready for milestone label on if you think it's ready. Otherwise, let me know what else should be changed.

github-actions[bot] commented 2 years ago

Hi @usaboo, thank you for taking up this issue! Hfla appreciates you :)

Do let fellow developers know about your:- i. Availability: (When are you available to work on the issue/answer questions other programmers might have about your issue?) ii. ETA: (When do you expect this issue to be completed?)

You're awesome!

P.S. - You may not take up another issue until this issue gets merged (or closed). Thanks again :)

github-actions[bot] commented 1 year ago

Hi @ldaws003, thank you for taking up this issue! Hfla appreciates you :)

Do let fellow developers know about your:- i. Availability: (When are you available to work on the issue/answer questions other programmers might have about your issue?) ii. ETA: (When do you expect this issue to be completed?)

You're awesome!

P.S. - You may not take up another issue until this issue gets merged (or closed). Thanks again :)

ldaws003 commented 1 year ago

Availability: Sunday 12:00pm - 5pm, Monday 3:00pm to 6:00pm, Tuesday 9:00am-5:00pm, and Wednesday 4:00pm-8:00pm ETA: Wednesday 5:00pm

ldaws003 commented 1 year ago

Progress: Downloaded the files from the drive and will be going through Google App Script docs before trying to find the bug Blockers: N/A Availability: Monday 4:00pm to 7:00pm, Wednesday 2:00pm to 5:00pm, Friday: 5:00pm to 8:00pm ETA: Saturday

ldaws003 commented 1 year ago

Progress: Read through documentation, will be searching for the bug solution Blockers: N/A Availability: Friday 8:00am-5:00pm, Saturday (all day), Sunday (all day) ETA: Sunday

ldaws003 commented 1 year ago

Progress: Searching for the bug Blockers: N/A Availability: Thursday (all day), Friday 8:00am-5:00pm, Saturday (all day), Sunday (all day) ETA: Sunday

ldaws003 commented 1 year ago

Progress: Searching for bug Blockers: N/A Availability: Saturday (all day), Sunday (all day) ETA: Sunday

github-actions[bot] commented 1 year ago

@ldaws003

Please add update using the below template (even if you have a pull request). Afterwards, remove the 'To Update !' label and add the 'Status: Updated' label.

  1. Progress: "What is the current status of your project? What have you completed and what is left to do?"
  2. Blockers: "Difficulties or errors encountered."
  3. Availability: "How much time will you have this week to work on this issue?"
  4. ETA: "When do you expect this issue to be completed?"
  5. Pictures (optional): "Add any pictures of the visual changes made to the site so far."

If you need help, be sure to either: 1) place your issue in the developer meeting discussion column and ask for help at your next meeting, 2) put a "Status: Help Wanted" label on your issue and pull request, or 3) put up a request for assistance on the #hfla-site channel.

You are receiving this comment because your last comment was before Monday, December 19, 2022 at 11:16 PM PST.

ldaws003 commented 1 year ago
Progress: Still trying to find the bug
Blockers: Can't find documentation on GHRequest and getting errors trying to run app script
Availability: Saturday (all day), Sunday (all day)
ETA: Sunday 10:00pm
ldaws003 commented 1 year ago

Progress: Fixed Bug waiting to demo for dev team leads Blockers: None Availability: Saturday (all day), Sunday (all day) ETA: Sunday 10:00pm

ldaws003 commented 1 year ago

Progress: Fixed Bug waiting to demo for dev team leads Blockers: None Availability: Monday - Friday 1:00pm to 5:00pm ETA: Thursday 10:00pm

jdingeman commented 1 year ago

Developer demonstrated his code and showed that the wins-data.json file replaced the question marks with apostrophes. We double checked with diffchecker.com to make sure there were no unintended removals or additions. The production code was updated but cannot run due to a "bad credentials" message as shown in the log below: image

I expect this may be due to the github authorization token expiration which we should try to fix so we can review the Wins page on the published website and see if it is working. Then we can close this issue without PR.

github-actions[bot] commented 1 year ago

@ldaws003

Please add update using the below template (even if you have a pull request). Afterwards, remove the 'To Update !' label and add the 'Status: Updated' label.

  1. Progress: "What is the current status of your project? What have you completed and what is left to do?"
  2. Blockers: "Difficulties or errors encountered."
  3. Availability: "How much time will you have this week to work on this issue?"
  4. ETA: "When do you expect this issue to be completed?"
  5. Pictures (optional): "Add any pictures of the visual changes made to the site so far."

If you need help, be sure to either: 1) place your issue in the developer meeting discussion column and ask for help at your next meeting, 2) put a "Status: Help Wanted" label on your issue and pull request, or 3) put up a request for assistance on the #hfla-site channel.

You are receiving this comment because your last comment was before Monday, January 16, 2023 at 11:16 PM PST.

ldaws003 commented 1 year ago

Progress: Displayed solution, code was successful but there was an unexpected error not on my part, waiting for response. Blockers: None Availability: Just waiting ETA: N/A

jdingeman commented 1 year ago

Tried to run the code after the authorization token was updated. I am not entirely sure how the workflow works for the Google Apps Script issues, because it seems that after running this code, it pushed a commit directly into PR #3024, and from the looks of it, it has indeed fixed the issue of question marks showing up where the apostrophes are supposed to be. Since the most recent commit displays the expected outcome, @ldaws003 I think you should be safe to go onto your next issue if you'd like! Nice job! I'll talk with @hackforla/website-merge regarding PR #3024 to see what we need to do about pushing the code into the codebase. It may have a few dependencies that need to be satisfied before we can merge it.

We'll leave this issue open until we determine the next step.

ldaws003 commented 1 year ago

OK. For the fix the only line of code that I had to change was line 93. I changed it from this

const encodedArrayData = Utilities.base64Encode(${cleanedAndFormattedArrayData});

to this

const encodedArrayData = Utilities.base64Encode(cleanedAndFormattedArrayData, Utilities.Charset.UTF_8);

The encoding of the data was the problem. The second parameter tells the function what the encoding of the input is, and it seems that the google sheets data is in UTF-8. The google documentation doesn't state what charset is used when you don't use the second parameter.

github-actions[bot] commented 1 year ago

@ldaws003

Please add update using the below template (even if you have a pull request). Afterwards, remove the 'To Update !' label and add the 'Status: Updated' label.

  1. Progress: "What is the current status of your project? What have you completed and what is left to do?"
  2. Blockers: "Difficulties or errors encountered."
  3. Availability: "How much time will you have this week to work on this issue?"
  4. ETA: "When do you expect this issue to be completed?"
  5. Pictures (optional): "Add any pictures of the visual changes made to the site so far."

If you need help, be sure to either: 1) place your issue in the developer meeting discussion column and ask for help at your next meeting, 2) put a "Status: Help Wanted" label on your issue and pull request, or 3) put up a request for assistance on the #hfla-site channel.

You are receiving this comment because your last comment was before Monday, January 30, 2023 at 11:17 PM PST.

github-actions[bot] commented 1 year ago

@ldaws003

Please add update using the below template (even if you have a pull request). Afterwards, remove the 'To Update !' label and add the 'Status: Updated' label.

  1. Progress: "What is the current status of your project? What have you completed and what is left to do?"
  2. Blockers: "Difficulties or errors encountered."
  3. Availability: "How much time will you have this week to work on this issue?"
  4. ETA: "When do you expect this issue to be completed?"
  5. Pictures (optional): "Add any pictures of the visual changes made to the site so far."

If you need help, be sure to either: 1) place your issue in the developer meeting discussion column and ask for help at your next meeting, 2) put a "Status: Help Wanted" label on your issue and pull request, or 3) put up a request for assistance on the #hfla-site channel.

You are receiving this comment because your last comment was before Monday, February 6, 2023 at 11:17 PM PST.

jdingeman commented 1 year ago

Issue has been corrected. Closing this issue.

github-actions[bot] commented 1 year ago

Hi @ldaws003, thank you for taking up this issue! Hfla appreciates you :)

Do let fellow developers know about your:- i. Availability: (When are you available to work on the issue/answer questions other programmers might have about your issue?) ii. ETA: (When do you expect this issue to be completed?)

You're awesome!

P.S. - You may not take up another issue until this issue gets merged (or closed). Thanks again :)