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

🎉 Cloudflare images authors #4238

Merged
merged 7 commits into from
Dec 3, 2024
Merged

Conversation

ikesau
Copy link
Member

@ikesau ikesau commented Dec 1, 2024

Adds a new join table, users_x_images, and UI in the images admin table to allow us to set an owner for each image. An image's owner is automatically set when an image is uploaded based on who they're logged in as.

users.table.mp4

I decided to switch the images admin page to use hashmaps for the images (and then users) state because all the iterating/filtering for data updates felt bad.

TODO: I'm currently working on a script that will automatically populate the userId for each cloudflare image, where possible, using data from gdrive.

@ikesau ikesau requested a review from rakyi December 1, 2024 22:17
@owidbot
Copy link
Contributor

owidbot commented Dec 1, 2024

Quick links (staging server):

Site Dev Site Preview Admin Wizard Docs

Login: ssh owid@staging-site-cloudflare-images-authors

SVG tester:

Number of differences (default views): 0 ✅
Number of differences (all views): 0 ✅

Edited: 2024-12-01 22:31:47 UTC
Execution time: 1.23 seconds

db/migration/1732994843041-CloudflareImagesAuthors.ts Outdated Show resolved Hide resolved
db/db.ts Outdated Show resolved Hide resolved
adminSiteClient/ImagesIndexPage.tsx Outdated Show resolved Hide resolved
adminSiteClient/ImagesIndexPage.tsx Outdated Show resolved Hide resolved
@ikesau ikesau merged commit 8c8f040 into cloudflare-images Dec 3, 2024
17 checks passed
@ikesau ikesau deleted the cloudflare-images-authors branch December 3, 2024 00:07
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.

4 participants