Derive icon paths (#17816)
This PR improves adding and working with icons by using the new `DerivePathStr` to derive icon paths. This means paths no longer need to be manually specified, and the `IconName` and file name will always be consistent between icons. This PR does not do any work to standardize icons visually, remove unused icons, or any other such cleanup. Release Notes: - N/A
This commit is contained in:
parent
ce848375fe
commit
e8a2dd92c8
39 changed files with 96 additions and 226 deletions
|
@ -193,11 +193,11 @@ impl SlashCommand for DiagnosticsSlashCommand {
|
|||
.map(|(range, placeholder_type)| SlashCommandOutputSection {
|
||||
range,
|
||||
icon: match placeholder_type {
|
||||
PlaceholderType::Root(_, _) => IconName::ExclamationTriangle,
|
||||
PlaceholderType::Root(_, _) => IconName::Warning,
|
||||
PlaceholderType::File(_) => IconName::File,
|
||||
PlaceholderType::Diagnostic(DiagnosticType::Error, _) => IconName::XCircle,
|
||||
PlaceholderType::Diagnostic(DiagnosticType::Warning, _) => {
|
||||
IconName::ExclamationTriangle
|
||||
IconName::Warning
|
||||
}
|
||||
},
|
||||
label: match placeholder_type {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue