Make the branch picker in the commit modal a popover (#25697)

Release Notes:

- N/A

---------

Co-authored-by: Nate Butler <iamnbutler@gmail.com>
This commit is contained in:
Mikayla Maki 2025-02-26 17:56:07 -08:00 committed by GitHub
parent 11838cf89e
commit 8ba7b349a5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 455 additions and 334 deletions

View file

@ -40,6 +40,19 @@ pub trait FluentBuilder {
}
})
}
/// Conditionally unwrap and modify self with the given closure, if the given option is Some.
fn when_none<T>(self, option: &Option<T>, then: impl FnOnce(Self) -> Self) -> Self
where
Self: Sized,
{
self.map(|this| {
if let Some(_) = option {
this
} else {
then(this)
}
})
}
}
#[cfg(any(test, feature = "test-support"))]