From 54a820151f6c647cea3b965a1d8b36fd7d473c10 Mon Sep 17 00:00:00 2001
From: Isaac Hellendag <2823852+hellendag@users.noreply.github.com>
Date: Wed, 11 Sep 2024 16:54:01 -0500
Subject: [PATCH] [ui] Fix CodeLocationSource in flex container (#24422)
## Summary & Motivation
The CodeLocationSource button is stretching when rendered in a flex
container. Wrap it in a div.
Created a storybook example to demo the different possibilities of the
component.
## How I Tested These Changes
Storybook
## Changelog
- [ ] `BUGFIX` [ui] Fixed broken code location URL button rendering.
---
.../src/workspace/CodeLocationSource.tsx | 16 +++++++------
.../CodeLocationSource.stories.tsx | 24 +++++++++++++++++++
2 files changed, 33 insertions(+), 7 deletions(-)
create mode 100644 js_modules/dagster-ui/packages/ui-core/src/workspace/__stories__/CodeLocationSource.stories.tsx
diff --git a/js_modules/dagster-ui/packages/ui-core/src/workspace/CodeLocationSource.tsx b/js_modules/dagster-ui/packages/ui-core/src/workspace/CodeLocationSource.tsx
index c1429082f027a..e005d529f38c5 100644
--- a/js_modules/dagster-ui/packages/ui-core/src/workspace/CodeLocationSource.tsx
+++ b/js_modules/dagster-ui/packages/ui-core/src/workspace/CodeLocationSource.tsx
@@ -28,13 +28,15 @@ export const CodeLocationSource = ({metadata}: {metadata: Metadata[]}) => {
const {type, url} = urlValue;
return (
-