Add back negative margins, now that they're supported again

Marshall Bowers created

Change summary

crates/ui2/src/components/facepile.rs     | 3 +--
crates/ui2/src/components/list.rs         | 7 +------
crates/ui2/src/components/player_stack.rs | 5 +----
3 files changed, 3 insertions(+), 12 deletions(-)

Detailed changes

crates/ui2/src/components/facepile.rs 🔗

@@ -24,8 +24,7 @@ impl<S: 'static + Send + Sync> Facepile<S> {
             let isnt_last = ix < player_count - 1;
 
             div()
-                // TODO: Blocked on negative margins.
-                // .when(isnt_last, |div| div.neg_mr_1())
+                .when(isnt_last, |div| div.neg_mr_1())
                 .child(Avatar::new(player.avatar_src().to_string()))
         });
         div().p_1().flex().items_center().children(player_list)

crates/ui2/src/components/list.rs 🔗

@@ -377,12 +377,7 @@ impl<S: 'static + Send + Sync + Clone> ListEntry<S> {
 
         match (self.toggle, self.disclosure_control_style) {
             (Some(_), DisclosureControlVisibility::OnHover) => {
-                Some(
-                    div()
-                        .absolute()
-                        // .neg_left_5()
-                        .child(disclosure_control_icon),
-                )
+                Some(div().absolute().neg_left_5().child(disclosure_control_icon))
             }
             (Some(_), DisclosureControlVisibility::Always) => {
                 Some(div().child(disclosure_control_icon))

crates/ui2/src/components/player_stack.rs 🔗

@@ -62,10 +62,7 @@ impl<S: 'static + Send + Sync> PlayerStack<S> {
                     })
                     .child(Avatar::new(player.avatar_src().to_string()))
                     .children(followers.map(|followers| {
-                        div()
-                            // TODO: Blocked on negative margins.
-                            // .neg_ml_2()
-                            .child(Facepile::new(followers.into_iter()))
+                        div().neg_ml_2().child(Facepile::new(followers.into_iter()))
                     })),
             )
     }