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

feat: avatar from github map #195

Open
wants to merge 6 commits into
base: development
Choose a base branch
from

Conversation

zugdev
Copy link
Collaborator

@zugdev zugdev commented Jan 24, 2025

You can QA this by opening console, indexedDb, GitHubAvatars, imageStore, then check the timestamps. Once 15 minutes have passed it should re-cache so timestamp should change.

image

@zugdev zugdev requested a review from 0x4007 as a code owner January 24, 2025 07:57
@ubiquity-os-deployer
Copy link

ubiquity-os-deployer bot commented Jan 24, 2025

@@ -9,6 +9,12 @@ import { taskManager } from "../home";
// Map to track ongoing avatar fetches
const pendingFetches: Map<string, Promise<Blob | void>> = new Map();

export async function fetchPartnerAvatars(): Promise<GitHubIssue[]> {
const response = await fetch("https://raw.githubusercontent.com/ubiquity/devpool-directory/__STORAGE__/devpool-partner-avatars.json");
Copy link
Member

@0x4007 0x4007 Jan 25, 2025

Choose a reason for hiding this comment

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

I have mixed feelings on your approach. The normal operating procedure is to create a pull request and link it to this task. Editing a production system is highly risky and prone to breakage. In the future you should work off of your own forks for a proof of concept.

ubiquity/devpool-directory@da89c2b

Mixed feelings, though, because I could see myself doing the same thing given that we're the only users of this directory at the moment.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

mb, I only did that cause the change was independent from the rest of the system. so it was self contained. even if it failed it wouldnt compromise any other section, but I agree its dumb

@zugdev zugdev changed the title feat: image cache timestamp check 15mins feat: avatar from github map Jan 25, 2025
@zugdev
Copy link
Collaborator Author

zugdev commented Jan 25, 2025

Alright so in devpool-directory backend im fetching all orgs avatar_urls and storing in a map. Then once we load the page we also load the map. This way we dont even store images, its all URLs, we dont even need cache.

https://github.com/ubiquity/devpool-directory/blob/__STORAGE__/devpool-partner-avatars.json

image

@0x4007
Copy link
Member

0x4007 commented Jan 25, 2025

You're missing an avatar

[
    {
        "ownerName": "ubiquity",
        "avatar_url": "https://avatars.githubusercontent.com/u/76412717?v=4"
    },
    {
        "ownerName": "ubiquity-os-marketplace",
        "avatar_url": "https://avatars.githubusercontent.com/u/182627615?v=4"
    },
    {
        "ownerName": "0x4007"
    },
    {
        "ownerName": "ubiquity-os",
        "avatar_url": "https://avatars.githubusercontent.com/u/160213852?v=4"
    }
]

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