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

(EPIC) Bug: Many contact fields are invalid - they should be URLs but are usernames, and don’t work on the website #2128

Open
9 of 11 tasks
fancyham opened this issue Apr 22, 2024 · 13 comments
Labels
data Issue involves data management and analysis. dev Code Development Epic Issue that defines a sub-project and has other smaller issues as dependencies. P-Feature: Organization Form Organization form completed and edited by volunteers P-Feature: Volunteer Dashboard Volunteer dashboard page PM: Volunteers Priority - Med Needs to be in the next release Role: Back-end Node/Express Development Task size: 13pt The lift to complete this user story 24+hrs
Milestone

Comments

@fancyham
Copy link
Collaborator

fancyham commented Apr 22, 2024

Dependency

Describe the bug

Maybe not really a bug but an issue with our data and form fields that allow invalid info.

Many of our listings have incorrect URLs for Instagram, Twitter, etc. because volunteers are entering @username in the fields rather than the properly formatted full URLs that our system is expecting

Noting this as an issue so we don’t forget it and because devs may be able to help find and fix errors, or solve a different way.

What we need to do

We need to clean these up, and prevent it from happening in the future.

Possible solutions

Some possible solutions:

  1. Fix our existing data — going through each of our listings and confirming and correcting the fields
  • This could be a volunteer task and people check and correct these manually (we have about 500 listings total to review, but no easy to use UI to do the review)
  • Or, perhaps, we could write and run scripts to turn usernames into full URLs
  1. We could allow usernames and URLs both, and the website parses the field and displays the full URL appropriately

  2. We could make all fields usernames-only and run a script to replace URLs with usernames in database, then display the full URL on the website

We should also display errors when field is incorrectly formatted to help data validators enter fields correctly

and (optionally) prevent approval (and display error message) if these aren’t valid URLs

How to recreate

For example, go to this organization (unless it’s been fixed since this bug report):
https://foodoasis.la/organizations?latitude=34.081648&longitude=-117.740882&org=god%27s_pantry_-_pomona&id=4772

In the database:
<img width="838" alt="image" src="https://github.com/hackforla/food-oasis/assets/3376957/45ded83d-f8aa-490b-af7d-8555a6c5bd10”>

Our web site - Instagram icon has malformed URL (it should be going to Instagram.com/godspantry_org)
Video: https://github.com/hackforla/food-oasis/assets/3376957/f7a8a5c2-9397-4b8a-8f1e-a186fdf0de58

@fancyham fancyham added dev Code Development data Issue involves data management and analysis. PM: Volunteers Priority - Med Needs to be in the next release P-Feature: Volunteer Dashboard Volunteer dashboard page P-Feature: Organization Form Organization form completed and edited by volunteers labels Apr 22, 2024
@qiqicodes qiqicodes moved this to Prioritized Backlog in P: FOLA: Project Board May 31, 2024
@SAUMILDHANKAR SAUMILDHANKAR moved this from Prioritized Backlog to In Progress in P: FOLA: Project Board Jul 10, 2024
@SAUMILDHANKAR
Copy link
Member

SAUMILDHANKAR commented Jul 24, 2024

Adding helpful comments from slack for future reference:

Saumil
10:25 PM
Hi Bryan, getting back here regarding your feedback on #2169 (review).
We discussed the requirements for the issue and below is the summary of the discussion:
There are a few options we can try which would let you see the changes before this PR is merged but that would involve some time and effort to incorporate. Best option for now would be to merge it to the dev site and then the changes could be seen and tested. However, based on today's meeting, it is not clear if the tooltip and validation should be for a URL or social media handles/usernames. I have learnt that we had decided to use handles earlier. So, maybe we need more discussion on the next steps for this. Let me know your thoughts. If Thursday meeting would be good to discuss further it would work for me. Once the next steps have been decided, I can work on finalizing the tooltip text in this issue and the validation part can be done in this issue: #2130. Looking forward to your response. Thank you.

Bryan Wu
5:40 PM
I wasn’t aware we were using handles - if that’s been working well for us then that’s fine I guess? From a Quick Look, though, I see a lot of URLs in our database but it’s very inconsistent. Sometimes there’s no http or sometimes it’s a handle only (which I think breaks our site’s link to that service) (see attached)
Off the top of my head I think the full url would be clearer to our volunteers though, because the concept of username or handles don’t really apply to some of those social medias - Facebook or LinkedIn, for example. And if we, say, add mastodon, then thee URLs will really be more than the user’s handle.
BUT if we do want to support handles for some (like instagram, and perhaps in addition to the full URL), we’d need to validate it (do we require the “@“?), parse it for display and create the links on the site correctly.
And while I don’t know for sure, I wouldn’t be surprised if some of the services use different urls for different types of organizations or people.
(BTW, can we add this to our conversation above to the GitHub issue’s comments? I think it’ll be helpful for future folks to see how we figured this out) (edited)

3 files

IMG_1273
IMG_1272
IMG_1271

Bryan Wu

IMG_1274

Note how this Facebook url has “pages” in it before the username/handle

@fancyham
Copy link
Collaborator Author

fancyham commented Jul 26, 2024

Notes from a meeting between John D and me today:


https://docs.joinmastodon.org/user/signup/#:~:text=Mastodon%20usernames%20actually%20consist%20of,the%20website%2C%20e.g.%20example.com

@SAUMILDHANKAR
Copy link
Member

Adding my notes for some ideas on tooltips for LinkedIn and Twitter:

For LinkedIn (Source: https://www.linkedin.com/help/linkedin/answer/a542685/manage-your-public-profile-url?lang=en#:~:text=You%20can%20create%20your%20public,profile%20URL%20at%20a%20time.)

Examples of LinkedIn URLs and what should be entered by the person adding the contact details:

1. "https://www.linkedin.com/in/williamhgates/" for this URL, please enter: in/williamhgates/
2. "https://www.linkedin.com/company/food-oasis-la/" for this URL, please enter: company/food-oasis-la/
3. "https://www.linkedin.com/groups/6519652/" for this URL, please enter: groups/6519652/

Additional helpful notes:

- A LinkedIn URL can be 3-100 characters long but it can not have spaces, symbols, special characters or word linkedIn and it is case insensitive. 
- All the above restrictions/guidelines would also apply to the text being entered in the contact field.

For X (Source: https://help.x.com/en/managing-your-account/x-username-rules)

Examples of X URLs and what should be entered by the person adding the contact details:

1. "https://x.com/elonmusk" for this URL, please enter: elonmusk
2. "https://x.com/microsoft" for this URL, please enter: microsoft

Additional helpful notes:

- Usernames can't contain words twitter or admin.
- Usernames can't be longer than 15 characters and can only use alphanumerics and underscore, no other symbol, dash or space is allowed.
- All the above restrictions/guidelines would also apply to the text being entered in the contact field.

@fancyham Hi Bryan, the above examples do not cover all the scenarios but we can leave a note saying if the URL doesn't match the above format reach out to your admin or something else. Please share your thoughts on if the above examples could be used for tooltips or if we can add/change some more info. I will add similar info for pinterest, facebook, instagram next as well. Thanks.

@fancyham
Copy link
Collaborator Author

fancyham commented Aug 2, 2024

Thanks for doing that research!

So… I still think it’d be far simpler to just use the full URL, perhaps in all cases?

Could you help me understand why we’d not want to do that? Is it difficult for the user in some cases? A database thing? Etc?

@fancyham
Copy link
Collaborator Author

fancyham commented Aug 2, 2024

Thanks for doing that research, BTW

@SAUMILDHANKAR
Copy link
Member

Thanks Bryan. We discussed this during our dev meeting yesterday and using the full URL would be simpler. So, we have decided to go ahead with that. I would add more notes in this issue with examples for tooltips for each of the social media we use. Also, planning to break this issue down into smaller issues for each social media contact field. Hope it works. Thank you.

@fancyham
Copy link
Collaborator Author

Hi, Saumil,

The tooltips should be changed a bit:
image

Change it from "Enter your Twitter username" to "Enter the organization's Twitter username"

Thanks!

(also, I'm deliberately not asking to change twitter to x :) )

@sumit-sharma92 sumit-sharma92 added Missing: Role The role is missing from this issue Missing: Size The effort estimate for this issue is missing Missing: Milestone This issue is not part of any milestone labels Sep 26, 2024
@SAUMILDHANKAR SAUMILDHANKAR added size: 8pt The lift to complete this user story 16-24hrs Epic Issue that defines a sub-project and has other smaller issues as dependencies. and removed Missing: Size The effort estimate for this issue is missing size: 8pt The lift to complete this user story 16-24hrs labels Sep 26, 2024
@SAUMILDHANKAR SAUMILDHANKAR added the size: 13pt The lift to complete this user story 24+hrs label Sep 26, 2024
@SAUMILDHANKAR
Copy link
Member

SAUMILDHANKAR commented Sep 26, 2024

Just adding notes from this week's dev meeting

As part of this epic issue, pending issues are:

@MuthamilselvanG

This comment was marked as resolved.

@farahrobleh farahrobleh added this to the 06. Bug fixes milestone Nov 7, 2024
@MuthamilselvanG MuthamilselvanG removed the Missing: Milestone This issue is not part of any milestone label Nov 7, 2024
@SAUMILDHANKAR
Copy link
Member

SAUMILDHANKAR commented Nov 7, 2024

Thanks @MuthamilselvanG for the reminder to update progress for this issue. I will add links on top of this issue as well.

  1. Progress: We had a team discussion about this issue on Nov 4, 2024, 7:15 PM pacific time (attended by both developers and designers). Adding the notes from the discussion below:
    a) For all social media URL fields, there should be an option to enter either:

     i) the full URL (which could be parsed, if required).
         OR
     ii) just the username.
         OR
     iii) partial URLs (for example, as Bryan mentioned, Facebook can have complicated URLs such as https://www.facebook.com/buy.nothing.burbank.glendale.verdugo.foothills)
    

    b) The other way to do the above could be just leaving the social media textfields completely blank as it is currently for LinkedIn and then validating the full URL once it is entered by the user as required.
    c) Tooltips: Currently, the tooltips read as Enter your Instagram username for the Instagram tooltip and so on for other tooltips, this should be changed to Enter the organization's Instagram username if we decide to go with letting users enter usernames, if we decide to go with full URLs the tooltip should be changed accordingly. I (Saumil) will create an issue for this.
    d) PS: This epic issue to be closed once all the dependency issues are done.

  2. Blockers: No blockers.

  3. Availability: 5 hours this week.

  4. ETA: Not sure about completion time.

@SAUMILDHANKAR SAUMILDHANKAR changed the title Bug: Many contact fields are invalid - they should be URLs but are usernames, and don’t work on the website EPIC Bug: Many contact fields are invalid - they should be URLs but are usernames, and don’t work on the website Nov 7, 2024
@SAUMILDHANKAR SAUMILDHANKAR changed the title EPIC Bug: Many contact fields are invalid - they should be URLs but are usernames, and don’t work on the website (EPIC) Bug: Many contact fields are invalid - they should be URLs but are usernames, and don’t work on the website Nov 7, 2024
@fancyham
Copy link
Collaborator Author

fancyham commented Nov 9, 2024

Just a reminder:

make sure to also check that the links are showing up correctly on the listings themselves. I know you’re trying to rationalize to some standard format, so make sure links work correctly on the org listing pages on the public site. That’s the output end of the stuff you’re validating here.

@SAUMILDHANKAR
Copy link
Member

Adding notes from the team discussion about this issue on Nov 11, 2024, 7:15 PM pacific time below:

  • We would need to run a script to sanitize data (social media links) already stored in the database. Need an issue to figure out the best way to achieve this.
  • Tooltips for the social media links to mention the organization's Instagram URL and so on for others.
  • Add placeholders such as https://instagram.com/... and so on for others.
  • All social media fields to be converted to plain textfields and the fixed portion would be removed.
  • For the website textfield, make sure the validation allows the users to enter both http and https
  • Validations should just display a warning if it doesn't satisfy the requirements, the users should still be able to proceed.
  • If save the progress isn't successful, prompt a toast saying couldn't be saved.

Some of these have already been addressed in #2279, will check what is left and update accordingly.
@fancyham Hope I didn't miss what we discussed in the meeting, feel free to add or edit. Thank you.

@fancyham
Copy link
Collaborator Author

fancyham commented Nov 16, 2024

That all looks good. 👍

One thing I’d add is that people may paste in URLs that lack the “http://“ altogether. e.g. would “google.com” pass our validation and be properly rationalized into the database? It might actually work fine, I think. So does “google.com” count as a valid URL?

Not sure what the best solution is. Allow

and any other valid URL. There surely must be a lightweight and permissive URL validation routine we can use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data Issue involves data management and analysis. dev Code Development Epic Issue that defines a sub-project and has other smaller issues as dependencies. P-Feature: Organization Form Organization form completed and edited by volunteers P-Feature: Volunteer Dashboard Volunteer dashboard page PM: Volunteers Priority - Med Needs to be in the next release Role: Back-end Node/Express Development Task size: 13pt The lift to complete this user story 24+hrs
Projects
Development

No branches or pull requests

5 participants