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: switch to UserSerializer for followedUsers relationship #39

Merged
merged 1 commit into from
Jul 22, 2024

Conversation

DavideIadeluca
Copy link
Contributor

@DavideIadeluca DavideIadeluca commented Jul 15, 2024

An issue was brought to my attention, that sometimes user data on the followedUsers page is missing / inconsistent. When hard refreshing the page, some of the relations are missing and wrong or no data is displayed in the UserCard. Only after navigating to a user in the list and navigating back, the data was correctly populated. It appears that it has been an issue since this PR https://github.com/imorland/follow-users/pull/33/files

This issue is reproducible with just flarum/core, fof/follow tags & ianm/follow-users (the joined at date will initially always say "joined a few seconds ago"). The issue is more noticeable when data of other extensions are missing (such as fof/best-answer).

Using BasicUserSerializer (before):
Screenshot 2024-07-15 at 14 27 26

Using UserSerializer (after):
Screenshot 2024-07-15 at 14 26 38

This will impact performance, but I think it's unavoidable to switch the Serializer.

@imorland imorland merged commit 43dff68 into imorland:master Jul 22, 2024
20 checks passed
@imorland imorland deleted the di/fix branch July 22, 2024 07:25
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.

2 participants