Rename SharedUrl to SharedUri (#7084)
This PR renames `SharedUrl` to `SharedUri` to better reflect its intent. I'm still not entirely happy with this naming, as the file paths that we can store in here are not _really_ URIs, as they are lacking a protocol. I want to explore changing `SharedUri` / `SharedUrl` back to alway storing a URL and treat local filepaths differently, as it seems we're conflating two different concerns under the same umbrella, at the moment. Release Notes: - N/A
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
use gpui::{Render, SharedUrl};
|
||||
use gpui::{Render, SharedUri};
|
||||
use story::{StoryContainer, StoryItem, StorySection};
|
||||
|
||||
use crate::{prelude::*, AudioStatus, Availability, AvatarAvailabilityIndicator};
|
||||
@@ -13,13 +13,13 @@ impl Render for AvatarStory {
|
||||
StorySection::new()
|
||||
.child(StoryItem::new(
|
||||
"Default",
|
||||
Avatar::new(SharedUrl::network(
|
||||
Avatar::new(SharedUri::network(
|
||||
"https://avatars.githubusercontent.com/u/1714999?v=4",
|
||||
)),
|
||||
))
|
||||
.child(StoryItem::new(
|
||||
"Default",
|
||||
Avatar::new(SharedUrl::network(
|
||||
Avatar::new(SharedUri::network(
|
||||
"https://avatars.githubusercontent.com/u/326587?v=4",
|
||||
)),
|
||||
)),
|
||||
@@ -28,14 +28,14 @@ impl Render for AvatarStory {
|
||||
StorySection::new()
|
||||
.child(StoryItem::new(
|
||||
"With free availability indicator",
|
||||
Avatar::new(SharedUrl::network(
|
||||
Avatar::new(SharedUri::network(
|
||||
"https://avatars.githubusercontent.com/u/326587?v=4",
|
||||
))
|
||||
.indicator(AvatarAvailabilityIndicator::new(Availability::Free)),
|
||||
))
|
||||
.child(StoryItem::new(
|
||||
"With busy availability indicator",
|
||||
Avatar::new(SharedUrl::network(
|
||||
Avatar::new(SharedUri::network(
|
||||
"https://avatars.githubusercontent.com/u/326587?v=4",
|
||||
))
|
||||
.indicator(AvatarAvailabilityIndicator::new(Availability::Busy)),
|
||||
@@ -45,14 +45,14 @@ impl Render for AvatarStory {
|
||||
StorySection::new()
|
||||
.child(StoryItem::new(
|
||||
"With info border",
|
||||
Avatar::new(SharedUrl::network(
|
||||
Avatar::new(SharedUri::network(
|
||||
"https://avatars.githubusercontent.com/u/326587?v=4",
|
||||
))
|
||||
.border_color(cx.theme().status().info_border),
|
||||
))
|
||||
.child(StoryItem::new(
|
||||
"With error border",
|
||||
Avatar::new(SharedUrl::network(
|
||||
Avatar::new(SharedUri::network(
|
||||
"https://avatars.githubusercontent.com/u/326587?v=4",
|
||||
))
|
||||
.border_color(cx.theme().status().error_border),
|
||||
@@ -62,14 +62,14 @@ impl Render for AvatarStory {
|
||||
StorySection::new()
|
||||
.child(StoryItem::new(
|
||||
"With muted audio indicator",
|
||||
Avatar::new(SharedUrl::network(
|
||||
Avatar::new(SharedUri::network(
|
||||
"https://avatars.githubusercontent.com/u/326587?v=4",
|
||||
))
|
||||
.indicator(AvatarAudioStatusIndicator::new(AudioStatus::Muted)),
|
||||
))
|
||||
.child(StoryItem::new(
|
||||
"With deafened audio indicator",
|
||||
Avatar::new(SharedUrl::network(
|
||||
Avatar::new(SharedUri::network(
|
||||
"https://avatars.githubusercontent.com/u/326587?v=4",
|
||||
))
|
||||
.indicator(AvatarAudioStatusIndicator::new(AudioStatus::Deafened)),
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use gpui::{Render, SharedUrl};
|
||||
use gpui::{Render, SharedUri};
|
||||
use story::Story;
|
||||
|
||||
use crate::{prelude::*, Avatar};
|
||||
@@ -45,7 +45,7 @@ impl Render for ListItemStory {
|
||||
.child(
|
||||
ListItem::new("with_start slot avatar")
|
||||
.child("Hello, world!")
|
||||
.start_slot(Avatar::new(SharedUrl::network(
|
||||
.start_slot(Avatar::new(SharedUri::network(
|
||||
"https://avatars.githubusercontent.com/u/1714999?v=4",
|
||||
))),
|
||||
)
|
||||
@@ -53,7 +53,7 @@ impl Render for ListItemStory {
|
||||
.child(
|
||||
ListItem::new("with_left_avatar")
|
||||
.child("Hello, world!")
|
||||
.end_slot(Avatar::new(SharedUrl::network(
|
||||
.end_slot(Avatar::new(SharedUri::network(
|
||||
"https://avatars.githubusercontent.com/u/1714999?v=4",
|
||||
))),
|
||||
)
|
||||
@@ -64,23 +64,23 @@ impl Render for ListItemStory {
|
||||
.end_slot(
|
||||
h_flex()
|
||||
.gap_2()
|
||||
.child(Avatar::new(SharedUrl::network(
|
||||
.child(Avatar::new(SharedUri::network(
|
||||
"https://avatars.githubusercontent.com/u/1789?v=4",
|
||||
)))
|
||||
.child(Avatar::new(SharedUrl::network(
|
||||
.child(Avatar::new(SharedUri::network(
|
||||
"https://avatars.githubusercontent.com/u/1789?v=4",
|
||||
)))
|
||||
.child(Avatar::new(SharedUrl::network(
|
||||
.child(Avatar::new(SharedUri::network(
|
||||
"https://avatars.githubusercontent.com/u/1789?v=4",
|
||||
)))
|
||||
.child(Avatar::new(SharedUrl::network(
|
||||
.child(Avatar::new(SharedUri::network(
|
||||
"https://avatars.githubusercontent.com/u/1789?v=4",
|
||||
)))
|
||||
.child(Avatar::new(SharedUrl::network(
|
||||
.child(Avatar::new(SharedUri::network(
|
||||
"https://avatars.githubusercontent.com/u/1789?v=4",
|
||||
))),
|
||||
)
|
||||
.end_hover_slot(Avatar::new(SharedUrl::network(
|
||||
.end_hover_slot(Avatar::new(SharedUri::network(
|
||||
"https://avatars.githubusercontent.com/u/1714999?v=4",
|
||||
))),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user