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

Add more docs for using images #4280

Merged
merged 1 commit into from
Dec 11, 2024
Merged

Add more docs for using images #4280

merged 1 commit into from
Dec 11, 2024

Conversation

rakyi
Copy link
Contributor

@rakyi rakyi commented Dec 11, 2024

No description provided.

@rakyi rakyi requested a review from ikesau December 11, 2024 10:48
@rakyi rakyi force-pushed the images-docs branch 3 times, most recently from 4dd857e to 272cbc4 Compare December 11, 2024 11:10
@owidbot
Copy link
Contributor

owidbot commented Dec 11, 2024

Quick links (staging server):

Site Dev Site Preview Admin Wizard Docs

Login: ssh owid@staging-site-images-docs

SVG tester:

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

Edited: 2024-12-11 11:31:18 UTC
Execution time: 1.21 seconds

Copy link
Member

@ikesau ikesau left a 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 🙂

@@ -554,6 +563,12 @@ export function ImageIndexPage() {
return (
<AdminLayout title="Images">
<main className="ImageIndexPage">
<Alert
Copy link
Member

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?

Copy link
Contributor Author

@rakyi rakyi Dec 11, 2024

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.

Copy link
Member

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.

Copy link
Contributor Author

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:

@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>
}
}

site/README.md Outdated Show resolved Hide resolved
@rakyi rakyi merged commit c2edb20 into master Dec 11, 2024
12 of 14 checks passed
@rakyi rakyi deleted the images-docs branch December 11, 2024 15:01
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.

3 participants