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

userProfile removed from Global singleton #16530

Merged
merged 7 commits into from
Oct 16, 2024
Merged

userProfile removed from Global singleton #16530

merged 7 commits into from
Oct 16, 2024

Conversation

micieslak
Copy link
Member

@micieslak micieslak commented Oct 16, 2024

What does the PR do

This PR is a series of commits leading to removal of userProfile property from Global.qml. It's part of broader effort aiming making singletons stateless and backend-independent.

  • isDisplayNameDupeOfCommunityMember moved from Utils singleton to CommunitiesStore as it calls backend
  • display name validators moved from Constants to a dedicated component, explicitly dependent on a store. It makes Constant holding really read-only, immutable data, with no references to the backend.
  • ContactsStore.getProfileContext simplified, no need to provide user's own public key
  • UserStatusContextMenu made purely UI component, actions handling externalized
  • ProfileHeader made backend-independent and behavior improved - after removing icon (in a dirty state) the menu entry for removing image is not available (earlier was available and did nothing when clicked)
  • sendModalPopup removed from ProfileSectionStore
  • several direct references to userProfile context property removed from UI code
  • unused PopupMenu removed

Closes: #16459

Affected areas

Multiple components, mainly those using Global.userProfile

Architecture compliance

@status-im-auto
Copy link
Member

status-im-auto commented Oct 16, 2024

Jenkins Builds

Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 22ab20c #1 2024-10-16 08:49:04 ~6 min macos/aarch64 🍎dmg
✔️ 22ab20c #1 2024-10-16 08:49:12 ~7 min tests/nim 📄log
✔️ 22ab20c #1 2024-10-16 08:54:28 ~12 min tests/ui 📄log
✔️ 22ab20c #1 2024-10-16 08:58:06 ~16 min linux-nix/x86_64 📦tgz
✔️ 22ab20c #1 2024-10-16 08:58:56 ~16 min macos/x86_64 🍎dmg
✔️ 22ab20c #1 2024-10-16 09:00:58 ~18 min linux/x86_64 📦tgz
✔️ 22ab20c #1 2024-10-16 09:06:38 ~24 min windows/x86_64 💿exe

Copy link
Member

@caybro caybro left a comment

Choose a reason for hiding this comment

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

LGTM otherwise

@micieslak micieslak changed the title userProfile remvoed from Global singleton userProfile removed from Global singleton Oct 16, 2024
Copy link
Member

@caybro caybro left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@jrainville jrainville left a comment

Choose a reason for hiding this comment

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

LGTM

@micieslak micieslak merged commit c22a15e into master Oct 16, 2024
9 checks passed
@micieslak micieslak deleted the chore/issue-16459 branch October 16, 2024 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove userProfile from Global singleton
4 participants