mirror of
https://github.com/lldap/lldap.git
synced 2026-04-25 08:15:52 +03:00
[GH-ISSUE #492] Show user avatars in User list #181
Labels
No labels
backend
blocked
bug
cleanup
dependencies
docker
documentation
duplicate
enhancement
enhancement
frontend
github_actions
good first issue
help wanted
help wanted
integration
invalid
ldap
pull-request
question
rust
rust
tests
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/lldap-lldap#181
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @pixelrazor on GitHub (Mar 22, 2023).
Original GitHub issue: https://github.com/lldap/lldap/issues/492
Can leverage the avatar component from #407
@nitnelave commented on GitHub (Mar 23, 2023):
Some things to think about:
@pixelrazor commented on GitHub (Mar 23, 2023):
With rrespect those concerns, I'm leaning towards the ffollowing solution:
@nitnelave commented on GitHub (Mar 23, 2023):
We could store the avatar in the agent: actually, you could move the request from the avatar display to the agent, and the agent would call you back with the avatar, either from cache or from asking the server.
@pixelrazor commented on GitHub (Mar 23, 2023):
Well this is going to be multiple avatars, multiple users. I have an initial impl i'll throw up as a draft that loads them after page/table load - while t his is the simpler approach with less changes, i also like it because the initial table and isn't blocked on waiting for all the avatars (a potentially big payload if it's included in the main get of all the users). Anytime you navigate away from the users page, it will refresh when you go back to it anyways, so i don't see a big benefit from adding the complexity here personally.
If we can really justify the larger changes, i'd probably nuke the agent (the Context agents were actually removed, and context/hooks are the preferred way now) and write a component to handle that state and provide it through context or from some third party state lib
@nitnelave commented on GitHub (Mar 23, 2023):
Right, but the agent can have a hash map of the avatars, queried by username.
I was thinking that the user table would just instantiate the avatar components, which would request the avatar from the agent (maybe with some queueing/grouping if it makes sense? In a future update). The Avatar component could then use the suspense API from yew to render a placeholder, and then get called back by the agent when the image is received.
That's also not blocking the user table.
@pixelrazor commented on GitHub (Mar 23, 2023):
I think i'm convinced enough. Also of note, agents are now called Workers in yew-agent 0.2.0