mirror of
https://github.com/coder/coder.git
synced 2026-10-31 02:43:21 +08:00
chore(site): remove outdated featured empty-state images (#28454)
> 🤖 This PR was written by Coder Agents on behalf of Jake Howell. ## What The images in `site/static/featured` were outdated and no longer resembled the current UI, so this removes them along with the code that referenced them: - `workspaces.webp` — was the faded background image in the Workspaces empty state (`WorkspacesEmpty.tsx`). - `templates.webp` — was only referenced by a Storybook story (`TableEmpty.stories.tsx`). - `scheduling.webp` — had no references anywhere in the codebase. ### Cleanup alongside the removal - Dropped the `image={defaultImage}` prop (and the now-dead `defaultImage`) from all three `WorkspacesEmpty` states. - Removed the `className="pb-0"` / `paddingBottom: 0` overrides that only existed to seat the image flush against the bottom, restoring balanced padding. - Renamed the `TableEmpty` story `WithImageAndCta` → `WithCta` since it no longer has an image. ## Old | New | Surface | Old | New | |---|---|---| | Workspaces empty state | <img width="2306" height="1376" alt="main-tableempty" src="https://github.com/user-attachments/assets/1d3a5201-66ce-4f80-a2ea-5638221f95d0" /> | <img width="2306" height="1376" alt="pr-tableempty" src="https://github.com/user-attachments/assets/5a8fcc1d-b676-46e6-be54-12ff7f3489fd" /> | | Table empty state (templates) | <img width="2306" height="1376" alt="main-workspaces-empty" src="https://github.com/user-attachments/assets/7618ee1f-09d4-4398-8a1c-19362f63c80d" /> | <img width="2306" height="1376" alt="pr-workspaces-empty" src="https://github.com/user-attachments/assets/8a9c98a9-24b7-4c90-9959-f85dbc2daa9f" /> | | `scheduling.webp` | Unused | Deleted 🙂 | <details> <summary>Implementation notes / decision log</summary> - Verified references with a repo-wide search for `/featured/` and each `*.webp` filename. Only `WorkspacesEmpty.tsx` (real usage) and `TableEmpty.stories.tsx` (Storybook-only) referenced them; `scheduling.webp` was fully unused. - `EmptyState`'s `image` prop is optional, so removing usages required no component changes. - Delete-only (per request): no replacement images committed. The empty states now render as clean text/CTA layouts. - "New" screenshots were captured from Storybook (a temporary `WorkspacesEmpty` story was used only to render the states and was **not** committed). - Verified with `tsc --noEmit` (0 errors) and `biome check` (clean) on the changed files. </details>
This commit is contained in:
@@ -25,8 +25,8 @@ type Story = StoryObj<typeof TableEmpty>;
|
||||
|
||||
export const Example: Story = {};
|
||||
|
||||
export const WithImageAndCta: Story = {
|
||||
name: "With Image and CTA",
|
||||
export const WithCta: Story = {
|
||||
name: "With CTA",
|
||||
args: {
|
||||
description: "A gruff voice crackles to life on the intercom.",
|
||||
cta: (
|
||||
@@ -35,13 +35,5 @@ export const WithImageAndCta: Story = {
|
||||
code="say “Actually, it's the BBC controlling us from London”"
|
||||
/>
|
||||
),
|
||||
image: (
|
||||
<img
|
||||
src="/featured/templates.webp"
|
||||
alt=""
|
||||
className="max-w-3xl h-[320px] overflow-hidden object-cover object-top"
|
||||
/>
|
||||
),
|
||||
style: { paddingBottom: 0 },
|
||||
},
|
||||
};
|
||||
|
||||
@@ -26,11 +26,6 @@ export const WorkspacesEmpty: FC<WorkspacesEmptyProps> = ({
|
||||
const defaultTitle = "Create a workspace";
|
||||
const defaultMessage =
|
||||
"A workspace is your personal, customizable development environment.";
|
||||
const defaultImage = (
|
||||
<div className="max-w-[50%] h-[272px] overflow-hidden mt-12 opacity-85">
|
||||
<img src="/featured/workspaces.webp" alt="" className="max-w-full" />
|
||||
</div>
|
||||
);
|
||||
|
||||
if (isUsingFilter) {
|
||||
return <EmptyState message="No results matched your search" />;
|
||||
@@ -41,8 +36,6 @@ export const WorkspacesEmpty: FC<WorkspacesEmptyProps> = ({
|
||||
<EmptyState
|
||||
message="No workspaces"
|
||||
description="You don't have permission to create workspaces. Contact your administrator if you need workspace access."
|
||||
className="pb-0"
|
||||
image={defaultImage}
|
||||
/>
|
||||
);
|
||||
}
|
||||
@@ -57,8 +50,6 @@ export const WorkspacesEmpty: FC<WorkspacesEmptyProps> = ({
|
||||
<Link to="/templates/new/builder">Create a template</Link>
|
||||
</Button>
|
||||
}
|
||||
className="pb-0"
|
||||
image={defaultImage}
|
||||
/>
|
||||
);
|
||||
}
|
||||
@@ -68,8 +59,6 @@ export const WorkspacesEmpty: FC<WorkspacesEmptyProps> = ({
|
||||
<EmptyState
|
||||
message={defaultTitle}
|
||||
description={`${defaultMessage} There are no templates available, but you will see them here once your admin adds them.`}
|
||||
className="pb-0"
|
||||
image={defaultImage}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 56 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 107 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 58 KiB |
Reference in New Issue
Block a user