Merge pull request #988 from zed-industries/contact-panel-keyboard-nav

Allow interacting with the contacts panel using the keyboard
This commit is contained in:
Max Brunsfeld
2022-05-12 10:06:27 -07:00
committed by GitHub
21 changed files with 1433 additions and 1019 deletions
Generated
+2
View File
@@ -936,9 +936,11 @@ dependencies = [
"futures",
"fuzzy",
"gpui",
"language",
"log",
"picker",
"postage",
"project",
"serde",
"settings",
"theme",
+14
View File
@@ -324,6 +324,20 @@
"side": "Left",
"item_index": 0
}
],
"cmd-9": [
"workspace::ToggleSidebarItemFocus",
{
"side": "Right",
"item_index": 0
}
],
"cmd-shift-(": [
"workspace::ToggleSidebarItem",
{
"side": "Right",
"item_index": 0
}
]
}
},
+72 -79
View File
@@ -1029,9 +1029,7 @@
"chat_panel": {
"padding": {
"top": 12,
"left": 12,
"bottom": 12,
"right": 12
"bottom": 12
},
"channel_name": {
"family": "Zed Sans",
@@ -1248,9 +1246,7 @@
"contacts_panel": {
"padding": {
"top": 12,
"left": 12,
"bottom": 12,
"right": 12
"bottom": 12
},
"user_query_editor": {
"background": "#19171c",
@@ -1278,33 +1274,61 @@
"left": 8,
"right": 8,
"top": 4
},
"margin": {
"left": 12,
"right": 12
}
},
"user_query_editor_height": 32,
"add_contact_button": {
"margin": {
"left": 6
"left": 6,
"right": 12
},
"color": "#e2dfe7",
"button_width": 8,
"icon_width": 8
},
"row": {
"padding": {
"left": 8
}
},
"row_height": 28,
"header": {
"section_icon_size": 8,
"header_row": {
"family": "Zed Mono",
"color": "#8b8792",
"size": 14,
"margin": {
"top": 8
"top": 14
},
"padding": {
"left": 12,
"right": 12
},
"active": {
"family": "Zed Mono",
"color": "#e2dfe7",
"size": 14,
"background": "#5852605c"
}
},
"contact_row": {
"padding": {
"left": 12,
"right": 12
},
"active": {
"background": "#5852605c"
}
},
"tree_branch": {
"color": "#655f6d",
"width": 1,
"hover": {
"color": "#655f6d"
},
"active": {
"color": "#655f6d"
}
},
"tree_branch_color": "#655f6d",
"tree_branch_width": 1,
"contact_avatar": {
"corner_radius": 10,
"width": 18
@@ -1313,10 +1337,11 @@
"family": "Zed Mono",
"color": "#e2dfe7",
"size": 14,
"padding": {
"margin": {
"left": 8
}
},
"contact_button_spacing": 8,
"contact_button": {
"background": "#26232a",
"color": "#e2dfe7",
@@ -1334,26 +1359,7 @@
"button_width": 16,
"corner_radius": 8
},
"project": {
"guest_avatar_spacing": 4,
"height": 24,
"guest_avatar": {
"corner_radius": 8,
"width": 14
},
"name": {
"family": "Zed Mono",
"color": "#7e7887",
"size": 14,
"margin": {
"right": 6
}
},
"padding": {
"left": 8
}
},
"shared_project": {
"shared_project_row": {
"guest_avatar_spacing": 4,
"height": 24,
"guest_avatar": {
@@ -1365,16 +1371,29 @@
"color": "#8b8792",
"size": 14,
"margin": {
"left": 8,
"right": 6
}
},
"guests": {
"margin": {
"left": 8,
"right": 8
}
},
"padding": {
"left": 8
"left": 12,
"right": 12
},
"background": "#26232a",
"corner_radius": 6
"hover": {
"background": "#5852603d"
},
"active": {
"background": "#5852605c"
}
},
"hovered_shared_project": {
"unshared_project_row": {
"guest_avatar_spacing": 4,
"height": 24,
"guest_avatar": {
@@ -1386,53 +1405,27 @@
"color": "#8b8792",
"size": 14,
"margin": {
"left": 8,
"right": 6
}
},
"padding": {
"left": 8
},
"background": "#5852603d",
"corner_radius": 6
},
"unshared_project": {
"guest_avatar_spacing": 4,
"height": 24,
"guest_avatar": {
"corner_radius": 8,
"width": 14
},
"name": {
"family": "Zed Mono",
"color": "#7e7887",
"size": 14,
"guests": {
"margin": {
"right": 6
"left": 8,
"right": 8
}
},
"padding": {
"left": 8
"left": 12,
"right": 12
},
"background": "#26232a",
"hover": {
"background": "#5852603d"
},
"active": {
"background": "#5852605c"
}
},
"hovered_unshared_project": {
"guest_avatar_spacing": 4,
"height": 24,
"guest_avatar": {
"corner_radius": 8,
"width": 14
},
"name": {
"family": "Zed Mono",
"color": "#7e7887",
"size": 14,
"margin": {
"right": 6
}
},
"padding": {
"left": 8
},
"corner_radius": 6
}
},
"contact_finder": {
+72 -79
View File
@@ -1029,9 +1029,7 @@
"chat_panel": {
"padding": {
"top": 12,
"left": 12,
"bottom": 12,
"right": 12
"bottom": 12
},
"channel_name": {
"family": "Zed Sans",
@@ -1248,9 +1246,7 @@
"contacts_panel": {
"padding": {
"top": 12,
"left": 12,
"bottom": 12,
"right": 12
"bottom": 12
},
"user_query_editor": {
"background": "#efecf4",
@@ -1278,33 +1274,61 @@
"left": 8,
"right": 8,
"top": 4
},
"margin": {
"left": 12,
"right": 12
}
},
"user_query_editor_height": 32,
"add_contact_button": {
"margin": {
"left": 6
"left": 6,
"right": 12
},
"color": "#26232a",
"button_width": 8,
"icon_width": 8
},
"row": {
"padding": {
"left": 8
}
},
"row_height": 28,
"header": {
"section_icon_size": 8,
"header_row": {
"family": "Zed Mono",
"color": "#585260",
"size": 14,
"margin": {
"top": 8
"top": 14
},
"padding": {
"left": 12,
"right": 12
},
"active": {
"family": "Zed Mono",
"color": "#26232a",
"size": 14,
"background": "#8b87922e"
}
},
"contact_row": {
"padding": {
"left": 12,
"right": 12
},
"active": {
"background": "#8b87922e"
}
},
"tree_branch": {
"color": "#7e7887",
"width": 1,
"hover": {
"color": "#7e7887"
},
"active": {
"color": "#7e7887"
}
},
"tree_branch_color": "#7e7887",
"tree_branch_width": 1,
"contact_avatar": {
"corner_radius": 10,
"width": 18
@@ -1313,10 +1337,11 @@
"family": "Zed Mono",
"color": "#26232a",
"size": 14,
"padding": {
"margin": {
"left": 8
}
},
"contact_button_spacing": 8,
"contact_button": {
"background": "#e2dfe7",
"color": "#26232a",
@@ -1334,26 +1359,7 @@
"button_width": 16,
"corner_radius": 8
},
"project": {
"guest_avatar_spacing": 4,
"height": 24,
"guest_avatar": {
"corner_radius": 8,
"width": 14
},
"name": {
"family": "Zed Mono",
"color": "#655f6d",
"size": 14,
"margin": {
"right": 6
}
},
"padding": {
"left": 8
}
},
"shared_project": {
"shared_project_row": {
"guest_avatar_spacing": 4,
"height": 24,
"guest_avatar": {
@@ -1365,16 +1371,29 @@
"color": "#585260",
"size": 14,
"margin": {
"left": 8,
"right": 6
}
},
"guests": {
"margin": {
"left": 8,
"right": 8
}
},
"padding": {
"left": 8
"left": 12,
"right": 12
},
"background": "#e2dfe7",
"corner_radius": 6
"hover": {
"background": "#8b87921f"
},
"active": {
"background": "#8b87922e"
}
},
"hovered_shared_project": {
"unshared_project_row": {
"guest_avatar_spacing": 4,
"height": 24,
"guest_avatar": {
@@ -1386,53 +1405,27 @@
"color": "#585260",
"size": 14,
"margin": {
"left": 8,
"right": 6
}
},
"padding": {
"left": 8
},
"background": "#8b87921f",
"corner_radius": 6
},
"unshared_project": {
"guest_avatar_spacing": 4,
"height": 24,
"guest_avatar": {
"corner_radius": 8,
"width": 14
},
"name": {
"family": "Zed Mono",
"color": "#655f6d",
"size": 14,
"guests": {
"margin": {
"right": 6
"left": 8,
"right": 8
}
},
"padding": {
"left": 8
"left": 12,
"right": 12
},
"background": "#e2dfe7",
"hover": {
"background": "#8b87921f"
},
"active": {
"background": "#8b87922e"
}
},
"hovered_unshared_project": {
"guest_avatar_spacing": 4,
"height": 24,
"guest_avatar": {
"corner_radius": 8,
"width": 14
},
"name": {
"family": "Zed Mono",
"color": "#655f6d",
"size": 14,
"margin": {
"right": 6
}
},
"padding": {
"left": 8
},
"corner_radius": 6
}
},
"contact_finder": {
+72 -79
View File
@@ -1029,9 +1029,7 @@
"chat_panel": {
"padding": {
"top": 12,
"left": 12,
"bottom": 12,
"right": 12
"bottom": 12
},
"channel_name": {
"family": "Zed Sans",
@@ -1248,9 +1246,7 @@
"contacts_panel": {
"padding": {
"top": 12,
"left": 12,
"bottom": 12,
"right": 12
"bottom": 12
},
"user_query_editor": {
"background": "#000000",
@@ -1278,33 +1274,61 @@
"left": 8,
"right": 8,
"top": 4
},
"margin": {
"left": 12,
"right": 12
}
},
"user_query_editor_height": 32,
"add_contact_button": {
"margin": {
"left": 6
"left": 6,
"right": 12
},
"color": "#c6c6c6",
"button_width": 8,
"icon_width": 8
},
"row": {
"padding": {
"left": 8
}
},
"row_height": 28,
"header": {
"section_icon_size": 8,
"header_row": {
"family": "Zed Mono",
"color": "#9c9c9c",
"size": 14,
"margin": {
"top": 8
"top": 14
},
"padding": {
"left": 12,
"right": 12
},
"active": {
"family": "Zed Mono",
"color": "#f1f1f1",
"size": 14,
"background": "#1c1c1c"
}
},
"contact_row": {
"padding": {
"left": 12,
"right": 12
},
"active": {
"background": "#1c1c1c"
}
},
"tree_branch": {
"color": "#000000",
"width": 1,
"hover": {
"color": "#000000"
},
"active": {
"color": "#000000"
}
},
"tree_branch_color": "#404040",
"tree_branch_width": 1,
"contact_avatar": {
"corner_radius": 10,
"width": 18
@@ -1313,10 +1337,11 @@
"family": "Zed Mono",
"color": "#f1f1f1",
"size": 14,
"padding": {
"margin": {
"left": 8
}
},
"contact_button_spacing": 8,
"contact_button": {
"background": "#2b2b2b",
"color": "#c6c6c6",
@@ -1334,26 +1359,7 @@
"button_width": 16,
"corner_radius": 8
},
"project": {
"guest_avatar_spacing": 4,
"height": 24,
"guest_avatar": {
"corner_radius": 8,
"width": 14
},
"name": {
"family": "Zed Mono",
"color": "#474747",
"size": 14,
"margin": {
"right": 6
}
},
"padding": {
"left": 8
}
},
"shared_project": {
"shared_project_row": {
"guest_avatar_spacing": 4,
"height": 24,
"guest_avatar": {
@@ -1365,16 +1371,29 @@
"color": "#9c9c9c",
"size": 14,
"margin": {
"left": 8,
"right": 6
}
},
"guests": {
"margin": {
"left": 8,
"right": 8
}
},
"padding": {
"left": 8
"left": 12,
"right": 12
},
"background": "#1c1c1c",
"corner_radius": 6
"hover": {
"background": "#232323"
},
"active": {
"background": "#2b2b2b"
}
},
"hovered_shared_project": {
"unshared_project_row": {
"guest_avatar_spacing": 4,
"height": 24,
"guest_avatar": {
@@ -1386,53 +1405,27 @@
"color": "#9c9c9c",
"size": 14,
"margin": {
"left": 8,
"right": 6
}
},
"padding": {
"left": 8
},
"background": "#232323",
"corner_radius": 6
},
"unshared_project": {
"guest_avatar_spacing": 4,
"height": 24,
"guest_avatar": {
"corner_radius": 8,
"width": 14
},
"name": {
"family": "Zed Mono",
"color": "#474747",
"size": 14,
"guests": {
"margin": {
"right": 6
"left": 8,
"right": 8
}
},
"padding": {
"left": 8
"left": 12,
"right": 12
},
"background": "#1c1c1c",
"hover": {
"background": "#232323"
},
"active": {
"background": "#2b2b2b"
}
},
"hovered_unshared_project": {
"guest_avatar_spacing": 4,
"height": 24,
"guest_avatar": {
"corner_radius": 8,
"width": 14
},
"name": {
"family": "Zed Mono",
"color": "#474747",
"size": 14,
"margin": {
"right": 6
}
},
"padding": {
"left": 8
},
"corner_radius": 6
}
},
"contact_finder": {
+72 -79
View File
@@ -1029,9 +1029,7 @@
"chat_panel": {
"padding": {
"top": 12,
"left": 12,
"bottom": 12,
"right": 12
"bottom": 12
},
"channel_name": {
"family": "Zed Sans",
@@ -1248,9 +1246,7 @@
"contacts_panel": {
"padding": {
"top": 12,
"left": 12,
"bottom": 12,
"right": 12
"bottom": 12
},
"user_query_editor": {
"background": "#ffffff",
@@ -1278,33 +1274,61 @@
"left": 8,
"right": 8,
"top": 4
},
"margin": {
"left": 12,
"right": 12
}
},
"user_query_editor_height": 32,
"add_contact_button": {
"margin": {
"left": 6
"left": 6,
"right": 12
},
"color": "#393939",
"button_width": 8,
"icon_width": 8
},
"row": {
"padding": {
"left": 8
}
},
"row_height": 28,
"header": {
"section_icon_size": 8,
"header_row": {
"family": "Zed Mono",
"color": "#474747",
"size": 14,
"margin": {
"top": 8
"top": 14
},
"padding": {
"left": 12,
"right": 12
},
"active": {
"family": "Zed Mono",
"color": "#2b2b2b",
"size": 14,
"background": "#d5d5d5"
}
},
"contact_row": {
"padding": {
"left": 12,
"right": 12
},
"active": {
"background": "#d5d5d5"
}
},
"tree_branch": {
"color": "#b8b8b8",
"width": 1,
"hover": {
"color": "#b8b8b8"
},
"active": {
"color": "#b8b8b8"
}
},
"tree_branch_color": "#e3e3e3",
"tree_branch_width": 1,
"contact_avatar": {
"corner_radius": 10,
"width": 18
@@ -1313,10 +1337,11 @@
"family": "Zed Mono",
"color": "#2b2b2b",
"size": 14,
"padding": {
"margin": {
"left": 8
}
},
"contact_button_spacing": 8,
"contact_button": {
"background": "#eaeaea",
"color": "#393939",
@@ -1334,26 +1359,7 @@
"button_width": 16,
"corner_radius": 8
},
"project": {
"guest_avatar_spacing": 4,
"height": 24,
"guest_avatar": {
"corner_radius": 8,
"width": 14
},
"name": {
"family": "Zed Mono",
"color": "#808080",
"size": 14,
"margin": {
"right": 6
}
},
"padding": {
"left": 8
}
},
"shared_project": {
"shared_project_row": {
"guest_avatar_spacing": 4,
"height": 24,
"guest_avatar": {
@@ -1365,16 +1371,29 @@
"color": "#474747",
"size": 14,
"margin": {
"left": 8,
"right": 6
}
},
"guests": {
"margin": {
"left": 8,
"right": 8
}
},
"padding": {
"left": 8
"left": 12,
"right": 12
},
"background": "#f8f8f8",
"corner_radius": 6
"hover": {
"background": "#eaeaea"
},
"active": {
"background": "#e3e3e3"
}
},
"hovered_shared_project": {
"unshared_project_row": {
"guest_avatar_spacing": 4,
"height": 24,
"guest_avatar": {
@@ -1386,53 +1405,27 @@
"color": "#474747",
"size": 14,
"margin": {
"left": 8,
"right": 6
}
},
"padding": {
"left": 8
},
"background": "#eaeaea",
"corner_radius": 6
},
"unshared_project": {
"guest_avatar_spacing": 4,
"height": 24,
"guest_avatar": {
"corner_radius": 8,
"width": 14
},
"name": {
"family": "Zed Mono",
"color": "#808080",
"size": 14,
"guests": {
"margin": {
"right": 6
"left": 8,
"right": 8
}
},
"padding": {
"left": 8
"left": 12,
"right": 12
},
"background": "#f8f8f8",
"hover": {
"background": "#eaeaea"
},
"active": {
"background": "#e3e3e3"
}
},
"hovered_unshared_project": {
"guest_avatar_spacing": 4,
"height": 24,
"guest_avatar": {
"corner_radius": 8,
"width": 14
},
"name": {
"family": "Zed Mono",
"color": "#808080",
"size": 14,
"margin": {
"right": 6
}
},
"padding": {
"left": 8
},
"corner_radius": 6
}
},
"contact_finder": {
+72 -79
View File
@@ -1029,9 +1029,7 @@
"chat_panel": {
"padding": {
"top": 12,
"left": 12,
"bottom": 12,
"right": 12
"bottom": 12
},
"channel_name": {
"family": "Zed Sans",
@@ -1248,9 +1246,7 @@
"contacts_panel": {
"padding": {
"top": 12,
"left": 12,
"bottom": 12,
"right": 12
"bottom": 12
},
"user_query_editor": {
"background": "#002b36",
@@ -1278,33 +1274,61 @@
"left": 8,
"right": 8,
"top": 4
},
"margin": {
"left": 12,
"right": 12
}
},
"user_query_editor_height": 32,
"add_contact_button": {
"margin": {
"left": 6
"left": 6,
"right": 12
},
"color": "#eee8d5",
"button_width": 8,
"icon_width": 8
},
"row": {
"padding": {
"left": 8
}
},
"row_height": 28,
"header": {
"section_icon_size": 8,
"header_row": {
"family": "Zed Mono",
"color": "#93a1a1",
"size": 14,
"margin": {
"top": 8
"top": 14
},
"padding": {
"left": 12,
"right": 12
},
"active": {
"family": "Zed Mono",
"color": "#eee8d5",
"size": 14,
"background": "#586e755c"
}
},
"contact_row": {
"padding": {
"left": 12,
"right": 12
},
"active": {
"background": "#586e755c"
}
},
"tree_branch": {
"color": "#657b83",
"width": 1,
"hover": {
"color": "#657b83"
},
"active": {
"color": "#657b83"
}
},
"tree_branch_color": "#657b83",
"tree_branch_width": 1,
"contact_avatar": {
"corner_radius": 10,
"width": 18
@@ -1313,10 +1337,11 @@
"family": "Zed Mono",
"color": "#eee8d5",
"size": 14,
"padding": {
"margin": {
"left": 8
}
},
"contact_button_spacing": 8,
"contact_button": {
"background": "#073642",
"color": "#eee8d5",
@@ -1334,26 +1359,7 @@
"button_width": 16,
"corner_radius": 8
},
"project": {
"guest_avatar_spacing": 4,
"height": 24,
"guest_avatar": {
"corner_radius": 8,
"width": 14
},
"name": {
"family": "Zed Mono",
"color": "#839496",
"size": 14,
"margin": {
"right": 6
}
},
"padding": {
"left": 8
}
},
"shared_project": {
"shared_project_row": {
"guest_avatar_spacing": 4,
"height": 24,
"guest_avatar": {
@@ -1365,16 +1371,29 @@
"color": "#93a1a1",
"size": 14,
"margin": {
"left": 8,
"right": 6
}
},
"guests": {
"margin": {
"left": 8,
"right": 8
}
},
"padding": {
"left": 8
"left": 12,
"right": 12
},
"background": "#073642",
"corner_radius": 6
"hover": {
"background": "#586e753d"
},
"active": {
"background": "#586e755c"
}
},
"hovered_shared_project": {
"unshared_project_row": {
"guest_avatar_spacing": 4,
"height": 24,
"guest_avatar": {
@@ -1386,53 +1405,27 @@
"color": "#93a1a1",
"size": 14,
"margin": {
"left": 8,
"right": 6
}
},
"padding": {
"left": 8
},
"background": "#586e753d",
"corner_radius": 6
},
"unshared_project": {
"guest_avatar_spacing": 4,
"height": 24,
"guest_avatar": {
"corner_radius": 8,
"width": 14
},
"name": {
"family": "Zed Mono",
"color": "#839496",
"size": 14,
"guests": {
"margin": {
"right": 6
"left": 8,
"right": 8
}
},
"padding": {
"left": 8
"left": 12,
"right": 12
},
"background": "#073642",
"hover": {
"background": "#586e753d"
},
"active": {
"background": "#586e755c"
}
},
"hovered_unshared_project": {
"guest_avatar_spacing": 4,
"height": 24,
"guest_avatar": {
"corner_radius": 8,
"width": 14
},
"name": {
"family": "Zed Mono",
"color": "#839496",
"size": 14,
"margin": {
"right": 6
}
},
"padding": {
"left": 8
},
"corner_radius": 6
}
},
"contact_finder": {
+72 -79
View File
@@ -1029,9 +1029,7 @@
"chat_panel": {
"padding": {
"top": 12,
"left": 12,
"bottom": 12,
"right": 12
"bottom": 12
},
"channel_name": {
"family": "Zed Sans",
@@ -1248,9 +1246,7 @@
"contacts_panel": {
"padding": {
"top": 12,
"left": 12,
"bottom": 12,
"right": 12
"bottom": 12
},
"user_query_editor": {
"background": "#fdf6e3",
@@ -1278,33 +1274,61 @@
"left": 8,
"right": 8,
"top": 4
},
"margin": {
"left": 12,
"right": 12
}
},
"user_query_editor_height": 32,
"add_contact_button": {
"margin": {
"left": 6
"left": 6,
"right": 12
},
"color": "#073642",
"button_width": 8,
"icon_width": 8
},
"row": {
"padding": {
"left": 8
}
},
"row_height": 28,
"header": {
"section_icon_size": 8,
"header_row": {
"family": "Zed Mono",
"color": "#586e75",
"size": 14,
"margin": {
"top": 8
"top": 14
},
"padding": {
"left": 12,
"right": 12
},
"active": {
"family": "Zed Mono",
"color": "#073642",
"size": 14,
"background": "#93a1a12e"
}
},
"contact_row": {
"padding": {
"left": 12,
"right": 12
},
"active": {
"background": "#93a1a12e"
}
},
"tree_branch": {
"color": "#839496",
"width": 1,
"hover": {
"color": "#839496"
},
"active": {
"color": "#839496"
}
},
"tree_branch_color": "#839496",
"tree_branch_width": 1,
"contact_avatar": {
"corner_radius": 10,
"width": 18
@@ -1313,10 +1337,11 @@
"family": "Zed Mono",
"color": "#073642",
"size": 14,
"padding": {
"margin": {
"left": 8
}
},
"contact_button_spacing": 8,
"contact_button": {
"background": "#eee8d5",
"color": "#073642",
@@ -1334,26 +1359,7 @@
"button_width": 16,
"corner_radius": 8
},
"project": {
"guest_avatar_spacing": 4,
"height": 24,
"guest_avatar": {
"corner_radius": 8,
"width": 14
},
"name": {
"family": "Zed Mono",
"color": "#657b83",
"size": 14,
"margin": {
"right": 6
}
},
"padding": {
"left": 8
}
},
"shared_project": {
"shared_project_row": {
"guest_avatar_spacing": 4,
"height": 24,
"guest_avatar": {
@@ -1365,16 +1371,29 @@
"color": "#586e75",
"size": 14,
"margin": {
"left": 8,
"right": 6
}
},
"guests": {
"margin": {
"left": 8,
"right": 8
}
},
"padding": {
"left": 8
"left": 12,
"right": 12
},
"background": "#eee8d5",
"corner_radius": 6
"hover": {
"background": "#93a1a11f"
},
"active": {
"background": "#93a1a12e"
}
},
"hovered_shared_project": {
"unshared_project_row": {
"guest_avatar_spacing": 4,
"height": 24,
"guest_avatar": {
@@ -1386,53 +1405,27 @@
"color": "#586e75",
"size": 14,
"margin": {
"left": 8,
"right": 6
}
},
"padding": {
"left": 8
},
"background": "#93a1a11f",
"corner_radius": 6
},
"unshared_project": {
"guest_avatar_spacing": 4,
"height": 24,
"guest_avatar": {
"corner_radius": 8,
"width": 14
},
"name": {
"family": "Zed Mono",
"color": "#657b83",
"size": 14,
"guests": {
"margin": {
"right": 6
"left": 8,
"right": 8
}
},
"padding": {
"left": 8
"left": 12,
"right": 12
},
"background": "#eee8d5",
"hover": {
"background": "#93a1a11f"
},
"active": {
"background": "#93a1a12e"
}
},
"hovered_unshared_project": {
"guest_avatar_spacing": 4,
"height": 24,
"guest_avatar": {
"corner_radius": 8,
"width": 14
},
"name": {
"family": "Zed Mono",
"color": "#657b83",
"size": 14,
"margin": {
"right": 6
}
},
"padding": {
"left": 8
},
"corner_radius": 6
}
},
"contact_finder": {
+72 -79
View File
@@ -1029,9 +1029,7 @@
"chat_panel": {
"padding": {
"top": 12,
"left": 12,
"bottom": 12,
"right": 12
"bottom": 12
},
"channel_name": {
"family": "Zed Sans",
@@ -1248,9 +1246,7 @@
"contacts_panel": {
"padding": {
"top": 12,
"left": 12,
"bottom": 12,
"right": 12
"bottom": 12
},
"user_query_editor": {
"background": "#202746",
@@ -1278,33 +1274,61 @@
"left": 8,
"right": 8,
"top": 4
},
"margin": {
"left": 12,
"right": 12
}
},
"user_query_editor_height": 32,
"add_contact_button": {
"margin": {
"left": 6
"left": 6,
"right": 12
},
"color": "#dfe2f1",
"button_width": 8,
"icon_width": 8
},
"row": {
"padding": {
"left": 8
}
},
"row_height": 28,
"header": {
"section_icon_size": 8,
"header_row": {
"family": "Zed Mono",
"color": "#979db4",
"size": 14,
"margin": {
"top": 8
"top": 14
},
"padding": {
"left": 12,
"right": 12
},
"active": {
"family": "Zed Mono",
"color": "#dfe2f1",
"size": 14,
"background": "#5e66875c"
}
},
"contact_row": {
"padding": {
"left": 12,
"right": 12
},
"active": {
"background": "#5e66875c"
}
},
"tree_branch": {
"color": "#6b7394",
"width": 1,
"hover": {
"color": "#6b7394"
},
"active": {
"color": "#6b7394"
}
},
"tree_branch_color": "#6b7394",
"tree_branch_width": 1,
"contact_avatar": {
"corner_radius": 10,
"width": 18
@@ -1313,10 +1337,11 @@
"family": "Zed Mono",
"color": "#dfe2f1",
"size": 14,
"padding": {
"margin": {
"left": 8
}
},
"contact_button_spacing": 8,
"contact_button": {
"background": "#293256",
"color": "#dfe2f1",
@@ -1334,26 +1359,7 @@
"button_width": 16,
"corner_radius": 8
},
"project": {
"guest_avatar_spacing": 4,
"height": 24,
"guest_avatar": {
"corner_radius": 8,
"width": 14
},
"name": {
"family": "Zed Mono",
"color": "#898ea4",
"size": 14,
"margin": {
"right": 6
}
},
"padding": {
"left": 8
}
},
"shared_project": {
"shared_project_row": {
"guest_avatar_spacing": 4,
"height": 24,
"guest_avatar": {
@@ -1365,16 +1371,29 @@
"color": "#979db4",
"size": 14,
"margin": {
"left": 8,
"right": 6
}
},
"guests": {
"margin": {
"left": 8,
"right": 8
}
},
"padding": {
"left": 8
"left": 12,
"right": 12
},
"background": "#293256",
"corner_radius": 6
"hover": {
"background": "#5e66873d"
},
"active": {
"background": "#5e66875c"
}
},
"hovered_shared_project": {
"unshared_project_row": {
"guest_avatar_spacing": 4,
"height": 24,
"guest_avatar": {
@@ -1386,53 +1405,27 @@
"color": "#979db4",
"size": 14,
"margin": {
"left": 8,
"right": 6
}
},
"padding": {
"left": 8
},
"background": "#5e66873d",
"corner_radius": 6
},
"unshared_project": {
"guest_avatar_spacing": 4,
"height": 24,
"guest_avatar": {
"corner_radius": 8,
"width": 14
},
"name": {
"family": "Zed Mono",
"color": "#898ea4",
"size": 14,
"guests": {
"margin": {
"right": 6
"left": 8,
"right": 8
}
},
"padding": {
"left": 8
"left": 12,
"right": 12
},
"background": "#293256",
"hover": {
"background": "#5e66873d"
},
"active": {
"background": "#5e66875c"
}
},
"hovered_unshared_project": {
"guest_avatar_spacing": 4,
"height": 24,
"guest_avatar": {
"corner_radius": 8,
"width": 14
},
"name": {
"family": "Zed Mono",
"color": "#898ea4",
"size": 14,
"margin": {
"right": 6
}
},
"padding": {
"left": 8
},
"corner_radius": 6
}
},
"contact_finder": {
+72 -79
View File
@@ -1029,9 +1029,7 @@
"chat_panel": {
"padding": {
"top": 12,
"left": 12,
"bottom": 12,
"right": 12
"bottom": 12
},
"channel_name": {
"family": "Zed Sans",
@@ -1248,9 +1246,7 @@
"contacts_panel": {
"padding": {
"top": 12,
"left": 12,
"bottom": 12,
"right": 12
"bottom": 12
},
"user_query_editor": {
"background": "#f5f7ff",
@@ -1278,33 +1274,61 @@
"left": 8,
"right": 8,
"top": 4
},
"margin": {
"left": 12,
"right": 12
}
},
"user_query_editor_height": 32,
"add_contact_button": {
"margin": {
"left": 6
"left": 6,
"right": 12
},
"color": "#293256",
"button_width": 8,
"icon_width": 8
},
"row": {
"padding": {
"left": 8
}
},
"row_height": 28,
"header": {
"section_icon_size": 8,
"header_row": {
"family": "Zed Mono",
"color": "#5e6687",
"size": 14,
"margin": {
"top": 8
"top": 14
},
"padding": {
"left": 12,
"right": 12
},
"active": {
"family": "Zed Mono",
"color": "#293256",
"size": 14,
"background": "#979db42e"
}
},
"contact_row": {
"padding": {
"left": 12,
"right": 12
},
"active": {
"background": "#979db42e"
}
},
"tree_branch": {
"color": "#898ea4",
"width": 1,
"hover": {
"color": "#898ea4"
},
"active": {
"color": "#898ea4"
}
},
"tree_branch_color": "#898ea4",
"tree_branch_width": 1,
"contact_avatar": {
"corner_radius": 10,
"width": 18
@@ -1313,10 +1337,11 @@
"family": "Zed Mono",
"color": "#293256",
"size": 14,
"padding": {
"margin": {
"left": 8
}
},
"contact_button_spacing": 8,
"contact_button": {
"background": "#dfe2f1",
"color": "#293256",
@@ -1334,26 +1359,7 @@
"button_width": 16,
"corner_radius": 8
},
"project": {
"guest_avatar_spacing": 4,
"height": 24,
"guest_avatar": {
"corner_radius": 8,
"width": 14
},
"name": {
"family": "Zed Mono",
"color": "#6b7394",
"size": 14,
"margin": {
"right": 6
}
},
"padding": {
"left": 8
}
},
"shared_project": {
"shared_project_row": {
"guest_avatar_spacing": 4,
"height": 24,
"guest_avatar": {
@@ -1365,16 +1371,29 @@
"color": "#5e6687",
"size": 14,
"margin": {
"left": 8,
"right": 6
}
},
"guests": {
"margin": {
"left": 8,
"right": 8
}
},
"padding": {
"left": 8
"left": 12,
"right": 12
},
"background": "#dfe2f1",
"corner_radius": 6
"hover": {
"background": "#979db41f"
},
"active": {
"background": "#979db42e"
}
},
"hovered_shared_project": {
"unshared_project_row": {
"guest_avatar_spacing": 4,
"height": 24,
"guest_avatar": {
@@ -1386,53 +1405,27 @@
"color": "#5e6687",
"size": 14,
"margin": {
"left": 8,
"right": 6
}
},
"padding": {
"left": 8
},
"background": "#979db41f",
"corner_radius": 6
},
"unshared_project": {
"guest_avatar_spacing": 4,
"height": 24,
"guest_avatar": {
"corner_radius": 8,
"width": 14
},
"name": {
"family": "Zed Mono",
"color": "#6b7394",
"size": 14,
"guests": {
"margin": {
"right": 6
"left": 8,
"right": 8
}
},
"padding": {
"left": 8
"left": 12,
"right": 12
},
"background": "#dfe2f1",
"hover": {
"background": "#979db41f"
},
"active": {
"background": "#979db42e"
}
},
"hovered_unshared_project": {
"guest_avatar_spacing": 4,
"height": 24,
"guest_avatar": {
"corner_radius": 8,
"width": 14
},
"name": {
"family": "Zed Mono",
"color": "#6b7394",
"size": 14,
"margin": {
"right": 6
}
},
"padding": {
"left": 8
},
"corner_radius": 6
}
},
"contact_finder": {
+14 -12
View File
@@ -8,6 +8,7 @@ pub use isahc::{
http::{Method, Uri},
Error,
};
use smol::future::FutureExt;
use std::sync::Arc;
pub use url::Url;
@@ -23,18 +24,19 @@ pub trait HttpClient: Send + Sync {
body: AsyncBody,
follow_redirects: bool,
) -> BoxFuture<'a, Result<Response, Error>> {
self.send(
isahc::Request::builder()
.redirect_policy(if follow_redirects {
RedirectPolicy::Follow
} else {
RedirectPolicy::None
})
.method(Method::GET)
.uri(uri)
.body(body)
.unwrap(),
)
let request = isahc::Request::builder()
.redirect_policy(if follow_redirects {
RedirectPolicy::Follow
} else {
RedirectPolicy::None
})
.method(Method::GET)
.uri(uri)
.body(body);
match request {
Ok(request) => self.send(request),
Err(error) => async move { Err(error.into()) }.boxed(),
}
}
}
+12 -8
View File
@@ -41,12 +41,14 @@ impl FakeServer {
Arc::get_mut(client)
.unwrap()
.override_authenticate({
let state = server.state.clone();
let state = Arc::downgrade(&server.state);
move |cx| {
let mut state = state.lock();
state.auth_count += 1;
let access_token = state.access_token.to_string();
let state = state.clone();
cx.spawn(move |_| async move {
let state = state.upgrade().ok_or_else(|| anyhow!("server dropped"))?;
let mut state = state.lock();
state.auth_count += 1;
let access_token = state.access_token.to_string();
Ok(Credentials {
user_id: client_user_id,
access_token,
@@ -55,21 +57,23 @@ impl FakeServer {
}
})
.override_establish_connection({
let peer = server.peer.clone();
let state = server.state.clone();
let peer = Arc::downgrade(&server.peer).clone();
let state = Arc::downgrade(&server.state);
move |credentials, cx| {
let peer = peer.clone();
let state = state.clone();
let credentials = credentials.clone();
cx.spawn(move |cx| async move {
assert_eq!(credentials.user_id, client_user_id);
let state = state.upgrade().ok_or_else(|| anyhow!("server dropped"))?;
let peer = peer.upgrade().ok_or_else(|| anyhow!("server dropped"))?;
if state.lock().forbid_connections {
Err(EstablishConnectionError::Other(anyhow!(
"server is forbidding connections"
)))?
}
assert_eq!(credentials.user_id, client_user_id);
if credentials.access_token != state.lock().access_token.to_string() {
Err(EstablishConnectionError::Unauthorized)?
}
+31 -43
View File
@@ -5016,13 +5016,11 @@ mod tests {
cx_c: &mut TestAppContext,
) {
cx_a.foreground().forbid_parking();
let lang_registry = Arc::new(LanguageRegistry::test());
let fs = FakeFs::new(cx_a.background());
// Connect to a server as 3 clients.
let mut server = TestServer::start(cx_a.foreground(), cx_a.background()).await;
let client_a = server.create_client(cx_a, "user_a").await;
let client_b = server.create_client(cx_b, "user_b").await;
let mut client_a = server.create_client(cx_a, "user_a").await;
let mut client_b = server.create_client(cx_b, "user_b").await;
let client_c = server.create_client(cx_c, "user_c").await;
server
.make_contacts(vec![
@@ -5046,27 +5044,10 @@ mod tests {
});
}
// Share a worktree as client A.
// Share a project as client A.
let fs = FakeFs::new(cx_a.background());
fs.create_dir(Path::new("/a")).await.unwrap();
let project_a = cx_a.update(|cx| {
Project::local(
client_a.clone(),
client_a.user_store.clone(),
lang_registry.clone(),
fs.clone(),
cx,
)
});
let (worktree_a, _) = project_a
.update(cx_a, |p, cx| {
p.find_or_create_local_worktree("/a", true, cx)
})
.await
.unwrap();
worktree_a
.read_with(cx_a, |tree, _| tree.as_local().unwrap().scan_complete())
.await;
let (project_a, _) = client_a.build_local_project(fs, "/a", cx_a).await;
deterministic.run_until_parked();
for (client, cx) in [(&client_a, &cx_a), (&client_b, &cx_b), (&client_c, &cx_c)] {
@@ -5104,16 +5085,7 @@ mod tests {
});
}
let _project_b = Project::remote(
project_id,
client_b.clone(),
client_b.user_store.clone(),
lang_registry.clone(),
fs.clone(),
&mut cx_b.to_async(),
)
.await
.unwrap();
let _project_b = client_b.build_remote_project(project_id, cx_b).await;
deterministic.run_until_parked();
for (client, cx) in [(&client_a, &cx_a), (&client_b, &cx_b), (&client_c, &cx_c)] {
@@ -5129,12 +5101,32 @@ mod tests {
});
}
// Add a local project as client B
let fs = FakeFs::new(cx_b.background());
fs.create_dir(Path::new("/b")).await.unwrap();
let (_project_b, _) = client_b.build_local_project(fs, "/b", cx_a).await;
deterministic.run_until_parked();
for (client, cx) in [(&client_a, &cx_a), (&client_b, &cx_b), (&client_c, &cx_c)] {
client.user_store.read_with(*cx, |store, _| {
assert_eq!(
contacts(store),
[
("user_a", true, vec![("a", true, vec!["user_b"])]),
("user_b", true, vec![("b", false, vec![])]),
("user_c", true, vec![])
]
)
});
}
project_a
.condition(&cx_a, |project, _| {
project.collaborators().contains_key(&client_b.peer_id)
})
.await;
client_a.project.take();
cx_a.update(move |_| drop(project_a));
deterministic.run_until_parked();
for (client, cx) in [(&client_a, &cx_a), (&client_b, &cx_b), (&client_c, &cx_c)] {
@@ -5143,7 +5135,7 @@ mod tests {
contacts(store),
[
("user_a", true, vec![]),
("user_b", true, vec![]),
("user_b", true, vec![("b", false, vec![])]),
("user_c", true, vec![])
]
)
@@ -5159,7 +5151,7 @@ mod tests {
contacts(store),
[
("user_a", true, vec![]),
("user_b", true, vec![]),
("user_b", true, vec![("b", false, vec![])]),
("user_c", false, vec![])
]
)
@@ -5182,7 +5174,7 @@ mod tests {
contacts(store),
[
("user_a", true, vec![]),
("user_b", true, vec![]),
("user_b", true, vec![("b", false, vec![])]),
("user_c", true, vec![])
]
)
@@ -5194,7 +5186,7 @@ mod tests {
.contacts()
.iter()
.map(|contact| {
let worktrees = contact
let projects = contact
.projects
.iter()
.map(|p| {
@@ -5205,11 +5197,7 @@ mod tests {
)
})
.collect();
(
contact.user.github_login.as_str(),
contact.online,
worktrees,
)
(contact.user.github_login.as_str(), contact.online, projects)
})
.collect()
}
+18 -61
View File
@@ -272,73 +272,30 @@ impl Store {
let mut metadata = Vec::new();
for project_id in project_ids {
if let Some(project) = self.projects.get(&project_id) {
metadata.push(proto::ProjectMetadata {
id: project_id,
is_shared: project.share.is_some(),
worktree_root_names: project
.worktrees
.values()
.map(|worktree| worktree.root_name.clone())
.collect(),
guests: project
.share
.iter()
.flat_map(|share| {
share.guests.values().map(|(_, user_id)| user_id.to_proto())
})
.collect(),
});
if project.host_user_id == user_id {
metadata.push(proto::ProjectMetadata {
id: project_id,
is_shared: project.share.is_some(),
worktree_root_names: project
.worktrees
.values()
.map(|worktree| worktree.root_name.clone())
.collect(),
guests: project
.share
.iter()
.flat_map(|share| {
share.guests.values().map(|(_, user_id)| user_id.to_proto())
})
.collect(),
});
}
}
}
metadata
}
// pub fn contacts_for_user(&self, user_id: UserId) -> Vec<proto::Contact> {
// let mut contacts = HashMap::default();
// for project_id in self
// .visible_projects_by_user_id
// .get(&user_id)
// .unwrap_or(&HashSet::default())
// {
// let project = &self.projects[project_id];
// let mut guests = HashSet::default();
// if let Ok(share) = project.share() {
// for guest_connection_id in share.guests.keys() {
// if let Ok(user_id) = self.user_id_for_connection(*guest_connection_id) {
// guests.insert(user_id.to_proto());
// }
// }
// }
// if let Ok(host_user_id) = self.user_id_for_connection(project.host_connection_id) {
// let mut worktree_root_names = project
// .worktrees
// .values()
// .filter(|worktree| worktree.visible)
// .map(|worktree| worktree.root_name.clone())
// .collect::<Vec<_>>();
// worktree_root_names.sort_unstable();
// contacts
// .entry(host_user_id)
// .or_insert_with(|| proto::Contact {
// user_id: host_user_id.to_proto(),
// projects: Vec::new(),
// })
// .projects
// .push(proto::ProjectMetadata {
// id: *project_id,
// worktree_root_names,
// is_shared: project.share.is_some(),
// guests: guests.into_iter().collect(),
// });
// }
// }
// contacts.into_values().collect()
// }
pub fn register_project(
&mut self,
host_connection_id: ConnectionId,
+5
View File
@@ -21,3 +21,8 @@ futures = "0.3"
log = "0.4"
postage = { version = "0.4.1", features = ["futures-traits"] }
serde = { version = "1", features = ["derive"] }
[dev-dependencies]
language = { path = "../language", features = ["test-support"] }
project = { path = "../project", features = ["test-support"] }
workspace = { path = "../workspace", features = ["test-support"] }
File diff suppressed because it is too large Load Diff
+14 -9
View File
@@ -246,22 +246,27 @@ pub struct CommandPalette {
pub struct ContactsPanel {
#[serde(flatten)]
pub container: ContainerStyle,
pub header: ContainedText,
pub user_query_editor: FieldEditor,
pub user_query_editor_height: f32,
pub add_contact_button: IconButton,
pub row: ContainerStyle,
pub header_row: Interactive<ContainedText>,
pub contact_row: Interactive<ContainerStyle>,
pub shared_project_row: Interactive<ProjectRow>,
pub unshared_project_row: Interactive<ProjectRow>,
pub row_height: f32,
pub contact_avatar: ImageStyle,
pub contact_username: ContainedText,
pub contact_button: Interactive<IconButton>,
pub contact_button_spacing: f32,
pub disabled_contact_button: IconButton,
pub tree_branch_width: f32,
pub tree_branch_color: Color,
pub shared_project: ProjectRow,
pub hovered_shared_project: ProjectRow,
pub unshared_project: ProjectRow,
pub hovered_unshared_project: ProjectRow,
pub tree_branch: Interactive<TreeBranch>,
pub section_icon_size: f32,
}
#[derive(Deserialize, Default, Clone, Copy)]
pub struct TreeBranch {
pub width: f32,
pub color: Color,
}
#[derive(Deserialize, Default)]
@@ -286,8 +291,8 @@ pub struct IconButton {
pub struct ProjectRow {
#[serde(flatten)]
pub container: ContainerStyle,
pub height: f32,
pub name: ContainedText,
pub guests: ContainerStyle,
pub guest_avatar: ImageStyle,
pub guest_avatar_spacing: f32,
}
+11 -3
View File
@@ -10,10 +10,14 @@ use theme::Theme;
pub trait SidebarItem: View {
fn should_show_badge(&self, cx: &AppContext) -> bool;
fn contains_focused_view(&self, _: &AppContext) -> bool {
false
}
}
pub trait SidebarItemHandle {
fn should_show_badge(&self, cx: &AppContext) -> bool;
fn is_focused(&self, cx: &AppContext) -> bool;
fn to_any(&self) -> AnyViewHandle;
}
@@ -25,6 +29,10 @@ where
self.read(cx).should_show_badge(cx)
}
fn is_focused(&self, cx: &AppContext) -> bool {
ViewHandle::is_focused(&self, cx) || self.read(cx).contains_focused_view(cx)
}
fn to_any(&self) -> AnyViewHandle {
self.into()
}
@@ -114,10 +122,10 @@ impl Sidebar {
cx.notify();
}
pub fn active_item(&self) -> Option<&dyn SidebarItemHandle> {
pub fn active_item(&self) -> Option<&Rc<dyn SidebarItemHandle>> {
self.active_item_ix
.and_then(|ix| self.items.get(ix))
.map(|item| item.view.as_ref())
.map(|item| &item.view)
}
fn render_resize_handle(&self, theme: &Theme, cx: &mut RenderContext<Self>) -> ElementBox {
@@ -170,7 +178,7 @@ impl View for Sidebar {
container.add_child(
Hook::new(
ChildView::new(active_item)
ChildView::new(active_item.to_any())
.constrained()
.with_max_width(*self.custom_width.borrow())
.boxed(),
+2 -2
View File
@@ -1123,13 +1123,13 @@ impl Workspace {
};
let active_item = sidebar.update(cx, |sidebar, cx| {
sidebar.activate_item(action.item_index, cx);
sidebar.active_item().map(|item| item.to_any())
sidebar.active_item().cloned()
});
if let Some(active_item) = active_item {
if active_item.is_focused(cx) {
cx.focus_self();
} else {
cx.focus(active_item);
cx.focus(active_item.to_any());
}
}
cx.notify();
+1 -1
View File
@@ -13,7 +13,7 @@ import projectDiagnostics from "./projectDiagnostics";
import contactNotification from "./contactNotification";
export const panel = {
padding: { top: 12, left: 12, bottom: 12, right: 12 },
padding: { top: 12, bottom: 12 },
};
export default function app(theme: Theme): Object {
+78 -33
View File
@@ -3,7 +3,10 @@ import { panel } from "./app";
import { backgroundColor, border, borderColor, iconColor, player, text } from "./components";
export default function contactsPanel(theme: Theme) {
const project = {
const nameMargin = 8;
const sidePadding = 12;
const projectRow = {
guestAvatarSpacing: 4,
height: 24,
guestAvatar: {
@@ -13,21 +16,19 @@ export default function contactsPanel(theme: Theme) {
name: {
...text(theme, "mono", "placeholder", { size: "sm" }),
margin: {
left: nameMargin,
right: 6,
},
},
padding: {
left: 8,
guests: {
margin: {
left: nameMargin,
right: nameMargin,
}
},
};
const sharedProject = {
...project,
background: backgroundColor(theme, 300),
cornerRadius: 6,
name: {
...project.name,
...text(theme, "mono", "secondary", { size: "sm" }),
padding: {
left: sidePadding,
right: sidePadding,
},
};
@@ -54,34 +55,62 @@ export default function contactsPanel(theme: Theme) {
right: 8,
top: 4,
},
margin: {
left: sidePadding,
right: sidePadding,
}
},
userQueryEditorHeight: 32,
addContactButton: {
margin: { left: 6 },
margin: { left: 6, right: 12 },
color: iconColor(theme, "primary"),
buttonWidth: 8,
iconWidth: 8,
},
row: {
padding: { left: 8 },
},
rowHeight: 28,
header: {
sectionIconSize: 8,
headerRow: {
...text(theme, "mono", "secondary", { size: "sm" }),
margin: { top: 8 },
margin: { top: 14 },
padding: {
left: sidePadding,
right: sidePadding,
},
active: {
...text(theme, "mono", "primary", { size: "sm" }),
background: backgroundColor(theme, 100, "active"),
}
},
contactRow: {
padding: {
left: sidePadding,
right: sidePadding
},
active: {
background: backgroundColor(theme, 100, "active"),
}
},
treeBranch: {
color: borderColor(theme, "active"),
width: 1,
hover: {
color: borderColor(theme, "active"),
},
active: {
color: borderColor(theme, "active"),
}
},
treeBranchColor: borderColor(theme, "muted"),
treeBranchWidth: 1,
contactAvatar: {
cornerRadius: 10,
width: 18,
},
contactUsername: {
...text(theme, "mono", "primary", { size: "sm" }),
padding: {
left: 8,
margin: {
left: nameMargin,
},
},
contactButtonSpacing: nameMargin,
contactButton: {
...contactButton,
hover: {
@@ -93,17 +122,33 @@ export default function contactsPanel(theme: Theme) {
background: backgroundColor(theme, 100),
color: iconColor(theme, "muted"),
},
project,
sharedProject,
hoveredSharedProject: {
...sharedProject,
background: backgroundColor(theme, 300, "hovered"),
cornerRadius: 6,
},
unsharedProject: project,
hoveredUnsharedProject: {
...project,
cornerRadius: 6,
sharedProjectRow: {
...projectRow,
background: backgroundColor(theme, 300),
name: {
...projectRow.name,
...text(theme, "mono", "secondary", { size: "sm" }),
},
hover: {
background: backgroundColor(theme, 300, "hovered"),
},
active: {
background: backgroundColor(theme, 300, "active"),
}
},
unsharedProjectRow: {
...projectRow,
background: backgroundColor(theme, 300),
name: {
...projectRow.name,
...text(theme, "mono", "secondary", { size: "sm" }),
},
hover: {
background: backgroundColor(theme, 300, "hovered"),
},
active: {
background: backgroundColor(theme, 300, "active"),
}
}
}
}