-
-
Notifications
You must be signed in to change notification settings - Fork 229
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
Add more docs for using images #4280
Conversation
4dd857e
to
272cbc4
Compare
Quick links (staging server):
Login:
SVG tester:Number of differences (default views): 0 ✅ Edited: 2024-12-11 11:31:18 UTC |
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.
I'm not sure the alert's necessary, but we can add it if you want to be extremely clear 🙂
adminSiteClient/ImagesIndexPage.tsx
Outdated
@@ -554,6 +563,12 @@ export function ImageIndexPage() { | |||
return ( | |||
<AdminLayout title="Images"> | |||
<main className="ImageIndexPage"> | |||
<Alert |
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.
The delete button also says this when you click it - do you think we need this extra spooky message too?
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.
Removing the alert.
But I'm now actually wondering if we should make the admin read-only in other envs than prod. You can't really upload the images in staging/locally and then use them in other envs, because the images
table is only synced in the direction prod → {staging, local}, right? Same for deleting.
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.
Yeah, that's definitely an option.
If we had a way of knowing when we're in prod vs. staging, we could hide/disable the buttons/inputs on staging too, and explain that all updates to images must be done on prod.
I didn't do that because while developing the feature, I definitely needed to be able to CRUD images, and the intention had been for this to be a half-cycle amount of work.
But I'm going to make some tickets with potential follow ups that we can at least consider for cooldowns.
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.
We distinguish between envs already:
owid-grapher/adminSiteClient/AdminLayout.tsx
Lines 53 to 66 in a7d6726
@computed get environmentSpan(): React.ReactElement { | |
const { admin } = this.context | |
if (admin.settings.ENV === "development") { | |
return <span className="dev">dev</span> | |
} else if ( | |
["https://owid.cloud", "https://admin.owid.io"].includes( | |
window.location.origin | |
) | |
) { | |
return <span className="live">live</span> | |
} else { | |
return <span className="test">test</span> | |
} | |
} |
No description provided.