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: blocked by peer status #5732

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

fixed blocked by peer status on the user context menu and in the pass…

758c31c
Select commit
Loading
Failed to load commit list.
Open

fix: blocked by peer status #5732

fixed blocked by peer status on the user context menu and in the pass…
758c31c
Select commit
Loading
Failed to load commit list.
Deleted GitHub App / Copilot for PRs succeeded Sep 21, 2023 in 1m 21s

Analysis complete

Summary

This pull request fixes the blocked status propagation in the comms layer and updates the passport and user context menu UIs to reflect the blocked status of the user and the peer. It renames the field hasBlocked to isBlockedByPeer in the PlayerPassportModel and the PassportPlayerInfoComponentController classes, and uses the blocked status from the comms layer and the user profile model in the PassportPlayerInfoComponentView and the UserContextMenu classes. It also comments out the lines that clear the blocked and muted lists of the user profile in the sagas.ts file.

Walkthrough

  • Rename hasBlocked field to isBlockedByPeer in PlayerPassportModel and PassportPlayerInfoComponentController classes to reflect new naming convention and clarify meaning (link, link)
  • Remove unused isBlocked field from PassportPlayerInfoComponentView class and use isBlocked field from PlayerPassportModel instead (link, link)
  • Add call to SetIsBlockedByPeer in RefreshControl method of PassportPlayerInfoComponentView class to update UI with blocked status of peer (link)
  • Modify conditions in SetFriendStatus and SetIsBlocked methods of PassportPlayerInfoComponentView class to hide friend status if user or peer is blocked (link, link)
  • Rename SetHasBlockedOwnUser method to SetIsBlockedByPeer and add call to DisableAllFriendFlowButtons in PassportPlayerInfoComponentView class to hide friend buttons if user or peer is blocked (link)
  • Add blockedContainer and isBlockedByPeer fields to UserContextMenu class to show blocked label in user context menu UI (link, link)
  • Modify condition in ProcessActiveElements method of UserContextMenu class to hide message button if user or peer is blocked (link)
  • Modify assignment of configFlags variable in Setup method of UserContextMenu class to use ownUserProfile variable instead of calling UserProfile.GetOwnUserProfile() multiple times (link)
  • Modify assignment of isBlocked and isBlockedByPeer fields and userName text in Setup method of UserContextMenu class to use IsBlocked method and profile.userName field from user profile model (link)
  • Modify assignments of friendRemoveContainer, deleteFriendButton, and friendAddContainer game objects in SetupFriendship method of UserContextMenu class to hide friend buttons if user or peer is blocked (link, link, link)
  • Add assignments of blockedContainer game object in SetupFriendship method of UserContextMenu class to show blocked label in user context menu UI for different friendship statuses (link, link, link, link)
  • Comment out lines that clear blocked and muted lists of user profile in sagas.ts file, because blocked status propagation has been re-enabled (link)

Poem

hasBlocked renamed
comms layer propagates block
autumn leaves friendship

Emoji

🚫🛂🍽️

Include these descriptions in your pull request description by including the following marker tags:

  • copilot:all: all the content, in one go
  • copilot:summary: a one paragraph summary of the code changes
  • copilot:walkthrough: a step by step walkthrough of the code changes
  • copilot:poem: a poem about the code changes!
  • copilot:emoji: three emoji that capture the changes

Feedback is welcome. Simply add a comment to this PR of the form /copilot feedback [your comments here].

Details

Copilot for PRs is a limited technical preview from GitHub Next.

It's aim is to make it easier to write pull request descriptions by providing automatically generated suggestions based on the code changes.

To find out more go to https://githubnext.com/projects/copilot-for-pull-requests or come and chat with us on Discord

Progress:

File Status Duration
Summary & Walkthrough ✅ Finished 106.3 seconds
browser-interface/packages/shared/comms/sagas.ts ✅ Finished 82 seconds
unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/HUD/Passport/Passport/PlayerInfo/PassportPlayerInfoComponentController.cs ✅ Finished 82 seconds
unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/HUD/Passport/Passport/PlayerInfo/PassportPlayerInfoComponentView.cs ✅ Finished 84.4 seconds
unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/HUD/Passport/Passport/PlayerPassportModel.cs ✅ Finished 82 seconds
unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/HUD/SocialBarPrefabs/UserContextMenu/UserContextMenuPanel.prefab 🤷‍♂️ Skipped (change too big) 0 seconds
unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/UserContextMenu/Scripts/UserContextMenu.cs ✅ Finished 84.1 seconds

⚠️ The file unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/HUD/SocialBarPrefabs/UserContextMenu/UserContextMenuPanel.prefab was skipped. 588 lines were added or removed, with the largest change updating 400 lines.