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

filter unapproved groups/projects and update 'Country' to 'Country/Region' in Location in "Find Projects #1051

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

hyihua
Copy link
Collaborator

@hyihua hyihua commented Oct 9, 2023

No description provided.

@hyihua hyihua self-assigned this Oct 9, 2023
@hyihua hyihua linked an issue Oct 9, 2023 that may be closed by this pull request
@PeterBreen
Copy link
Collaborator

Maybe I missed this in a team meeting, but why make this change?

@hyihua
Copy link
Collaborator Author

hyihua commented Oct 18, 2023

Maybe I missed this in a team meeting, but why make this change?

I was working on the #1039 to verify if the issue was still happening or not. And during the process, I found that some options in the list are not countries but regions, so then I made this change to update the description from "Country" to "Country/Region".

@PeterBreen
Copy link
Collaborator

PeterBreen commented Oct 19, 2023

Label changes are managed by a ux design team member; I'll run this by the design lead. If nothing else we have to (try to) keep our design files and deployed site in sync. Shouldn't take long.

@PeterBreen
Copy link
Collaborator

When looking into this, I see some evidence #1039 is still a bug, despite the code you found which should have fixed it. For example, on democracylab.org the country dropdown has Åland Islands - we have no projects there when I filter by location so it shouldn't be in the list. Same for Afghanistan and Albania. Andorra is close enough to Spain that a 200mi search picks up a project in Pamplona, but again, no Andorra projects.

all this to say - I don't know if that filter code is working as intended. Do you also see this?
image

@hyihua
Copy link
Collaborator Author

hyihua commented Oct 19, 2023

You're right. It seems that the code snippet I found doesn't work for this issue and the list still contains some countries that don't have projects. I will continue working on this. Thank you for pointing that out.

@PeterBreen
Copy link
Collaborator

PeterBreen commented Oct 19, 2023

Our design lead got back to me and is fine with country/region so that change is good to go. I'd request a space between it and (Required), just in case we need to have a line break on a narrow device. Something like Country/Region (Required)

Thanks for spotting this.

@hyihua
Copy link
Collaborator Author

hyihua commented Oct 23, 2023

Created an account and a project for replicating this issue. It turns out that the code snippet listed above cannot fix this issue.

@hyihua
Copy link
Collaborator Author

hyihua commented Oct 29, 2023

I figured out the reason that why the code snippet I found didn't work for this issue. The reason is that the we only use the is_searchable attribute to filter projects but didn't make filtering for the country list, and that's why we can still see countries with no projects in the country selector.

CC: @PeterBreen @marlonkeating

@hyihua
Copy link
Collaborator Author

hyihua commented Nov 6, 2023

@PeterBreen I think this bug is fixed and ready for review now. I created a project for testing and it was pending for approval. And it was not shown in the country list.

image

image

@hyihua hyihua requested a review from PeterBreen November 6, 2023 03:08
@qchiujunhao qchiujunhao changed the title update 'Country' to 'Country/Region' in Location in "Find Projects" filter unapproved groups/projects Feb 5, 2024
@qchiujunhao qchiujunhao self-assigned this Feb 5, 2024
@qchiujunhao qchiujunhao linked an issue Feb 5, 2024 that may be closed by this pull request
@qchiujunhao qchiujunhao changed the title filter unapproved groups/projects filter unapproved groups/projects and update 'Country' to 'Country/Region' in Location in "Find Projects Feb 5, 2024
@qchiujunhao qchiujunhao added Front End Primarily front-end (react/javascript) Full Stack Both front- and back-end work required Back End Primarily back-end (python/django) code for this task ready for review labels Feb 6, 2024
@qchiujunhao qchiujunhao removed their assignment Feb 6, 2024
@ddfridley ddfridley requested a review from bnfb November 14, 2024 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Back End Primarily back-end (python/django) code for this task Front End Primarily front-end (react/javascript) Full Stack Both front- and back-end work required ready for review
Projects
None yet
4 participants