-
Notifications
You must be signed in to change notification settings - Fork 156
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: Display avatar after fetching user data #342
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for the PR!
this._renderer2.removeStyle(tooltip, 'display'); | ||
}else{ | ||
this._renderer2.setStyle(tooltip, 'display', 'none'); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems unrelated, please rebase from the main
branch and this should get removed automatically.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ajitzero this is my first time working on an open source project. You're right, I'm not sure why this commit is here, and I don't know how to fix it. I tried to rebase from the main branch, but it doesn't seem to work; I'm surely doing something wrong. Feel free to delete this PR, and I'll delete my forked repo and create a new, clean PR. Alternatively, if you prefer, you can create a new one yourself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No worries! git can get confusing with forks and whatnot. I see you have 3 extra commits in this PR https://github.com/goetzrobin/spartan/pull/342/commits - I'm not sure what could have caused this either. Could you please try removing these last three commits?
Try these CLI commands:
# go to your repo/fork's branch with the changes
git checkout main
# remove the last N (here, 3) commits: git reset --hard HEAD~N
git reset --hard HEAD~3
# Update your fork on GitHub forcibly and overwrite it.
# We don't do this for actual projects, but is common for cleaning up PRs.
git push --force
To be cautious though, I would suggest running the reset command without the --hard
flag. This will only "undo" the changes and keep them available locally. You can then decide what to skip manually.
PR Checklist
Please check if your PR fulfills the following requirements:
guidelines: https://github.com/goetzrobin/spartan/blob/main/CONTRIBUTING.md#-commit-message-guidelines
PR Type
What kind of change does this PR introduce?
Which package are you modifying?
What is the current behavior?
(#338)
What is the new behavior?
The avatar component no longer has an error state; it now only handles a loaded state. It correctly updates the user avatar when the src attribute changes, without always showing the fallback avatar. Inside the
@HostListener('error')
method, it sets the loaded state to false, and the canShow flag only checks if the avatar is loaded or not.Does this PR introduce a breaking change?
Other information