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

fix: setting countryCode when updating country #3868

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

benfurber
Copy link
Member

PR Checklist

PR Type

What kind of change does this PR introduce?

  • Bugfix (fixes an issue)
  • Feature (adds functionality)

What is the current behavior?

Setting your country (on the infos settings tab) doesn't set/update your flag icon on comments, etc.

What is the new behavior?

Screen.Recording.2024-09-26.at.15.45.04.mov

Also adds emojis and a little preview to show users how their location will be shown:
Screenshot 2024-09-26 at 15 31 12
Screenshot 2024-09-26 at 15 31 22

@benfurber benfurber requested a review from a team as a code owner September 26, 2024 14:48
Copy link

cypress bot commented Sep 26, 2024

onearmy-community-platform    Run #6279

Run Properties:  status check failed Failed #6279  •  git commit 2069c9e599: fix: setting countryCode when updating country
Project onearmy-community-platform
Branch Review pull/3868
Run status status check failed Failed #6279
Run duration 15m 40s
Commit git commit 2069c9e599: fix: setting countryCode when updating country
Committer Ben Furber
View all properties for this run ↗︎

Test results
Tests that failed  Failures 1
Tests that were flaky  Flaky 1
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 64
View all changes introduced in this branch ↗︎

Tests for review

Failed  src/integration/map.spec.ts • 1 failed test • ci-chrome

View Output Video

Test Artifacts
[Map] > [Shows expected pins] Test Replay Screenshots Video
Flakiness  src/integration/howto/write.spec.ts • 1 flaky test • ci-chrome

View Output Video

Test Artifacts
[How To] > [Create a how-to] > [By Authenticated] Test Replay Screenshots Video

@davehakkens davehakkens added the Review allow-preview ✅ Has received manual check for malicious code and can be safely built for preview label Sep 26, 2024
Copy link
Contributor

Visit the preview URL for this PR (updated for commit 2069c9e):

https://onearmy-next--pr3868-fix-user-location-se-fe6p76wg.web.app

(expires Sat, 26 Oct 2024 15:19:00 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 6d65e4f8fee2f6ab2da0c1c3b85b8797d66afa59

@davehakkens
Copy link
Contributor

oe nice visuals flags! 💫
Seems to work well here!
Would you still have in mind at some point to decouple the flag from the map location, or leave it how it currently functions?

@@ -218,6 +219,17 @@ export class UserStore extends ModuleStore {
)
}

if (location && location.country) {

Choose a reason for hiding this comment

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

can be shortened to location?.country :)

)
updatedUserProfile.location = {
...location,
country: location.country,

Choose a reason for hiding this comment

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

If the object is being populated by ...location, the extra assignment country: location.country is redundant :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Review allow-preview ✅ Has received manual check for malicious code and can be safely built for preview
Projects
Status: No status
Status: 💬 Changes Requested/with author
Development

Successfully merging this pull request may close these issues.

3 participants