Rename Join button to Open, rework message slightly

Nathan Sobo created

Change summary

crates/collab_ui/src/project_shared_notification.rs | 10 +++++-----
crates/theme/src/theme.rs                           |  2 +-
styles/src/styleTree/projectSharedNotification.ts   |  4 ++--
3 files changed, 8 insertions(+), 8 deletions(-)

Detailed changes

crates/collab_ui/src/project_shared_notification.rs 🔗

@@ -102,7 +102,7 @@ impl ProjectSharedNotification {
                     .with_child(
                         Label::new(
                             format!(
-                                "shared a project in Zed{}",
+                                "is sharing a project in Zed{}",
                                 if self.worktree_root_names.is_empty() {
                                     ""
                                 } else {
@@ -140,7 +140,7 @@ impl ProjectSharedNotification {
     }
 
     fn render_buttons(&self, cx: &mut RenderContext<Self>) -> ElementBox {
-        enum Join {}
+        enum Open {}
         enum Dismiss {}
 
         let project_id = self.project_id;
@@ -148,12 +148,12 @@ impl ProjectSharedNotification {
 
         Flex::column()
             .with_child(
-                MouseEventHandler::<Join>::new(0, cx, |_, cx| {
+                MouseEventHandler::<Open>::new(0, cx, |_, cx| {
                     let theme = &cx.global::<Settings>().theme.project_shared_notification;
-                    Label::new("Join".to_string(), theme.join_button.text.clone())
+                    Label::new("Open".to_string(), theme.open_button.text.clone())
                         .aligned()
                         .contained()
-                        .with_style(theme.join_button.container)
+                        .with_style(theme.open_button.container)
                         .boxed()
                 })
                 .with_cursor_style(CursorStyle::PointingHand)

crates/theme/src/theme.rs 🔗

@@ -482,7 +482,7 @@ pub struct ProjectSharedNotification {
     pub message: ContainedText,
     pub worktree_roots: ContainedText,
     pub button_width: f32,
-    pub join_button: ContainedText,
+    pub open_button: ContainedText,
     pub dismiss_button: ContainedText,
 }
 

styles/src/styleTree/projectSharedNotification.ts 🔗

@@ -5,7 +5,7 @@ export default function projectSharedNotification(theme: Theme): Object {
   const avatarSize = 48;
   return {
     windowHeight: 72,
-    windowWidth: 360,
+    windowWidth: 380,
     background: backgroundColor(theme, 300),
     ownerContainer: {
       padding: 12,
@@ -31,7 +31,7 @@ export default function projectSharedNotification(theme: Theme): Object {
       margin: { top: -3 },
     },
     buttonWidth: 96,
-    joinButton: {
+    openButton: {
       background: backgroundColor(theme, "info", "active"),
       border: { left: true, bottom: true, width: 1, color: borderColor(theme, "primary") },
       ...text(theme, "sans", "info", { size: "xs", weight: "extra_bold" })