File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -111,13 +111,10 @@ const MetadataGroupValues = styled.div`
111111
112112const MetadataEntry = styled . div `
113113 display: flex;
114- align-items: baseline;
115- flex-wrap: wrap;
116114` ;
117115
118116const MetadataIcon = styled . span `
119117 display: inline-flex;
120- align-self: center;
121118 margin-right: 4px;
122119 flex-shrink: 0;
123120` ;
@@ -130,7 +127,6 @@ const MetadataName = styled.button`
130127 color: var(--text);
131128 opacity: 0.6;
132129 cursor: pointer;
133- flex-shrink: 0;
134130
135131 &:hover {
136132 color: var(--highlight);
@@ -258,6 +254,16 @@ export function MetadataTags({
258254 }
259255 group . values . push ( entry . value ) ;
260256 }
257+ const priority = ( name : string ) => {
258+ if ( name === "MPropertyFriendlyName" || name === "MPropertyDescription" ) return - 1 ;
259+ if ( name === "MGetKV3ClassDefaults" ) return 1 ;
260+ return 0 ;
261+ } ;
262+ groups . sort ( ( a , b ) => {
263+ const p = priority ( a . name ) - priority ( b . name ) ;
264+ if ( p !== 0 ) return p ;
265+ return a . name . localeCompare ( b . name ) ;
266+ } ) ;
261267 return groups ;
262268 } , [ metadata ] ) ;
263269
@@ -281,16 +287,18 @@ export function MetadataTags({
281287 < MetadataIcon >
282288 < KindIcon kind = { iconKind } size = "small" />
283289 </ MetadataIcon >
284- < MetadataName
285- onClick = { ( ) =>
286- navigate ( `${ root } ?search=${ encodeURIComponent ( `metadata:${ group . name } ` ) } ` )
287- }
288- >
289- { group . name }
290- </ MetadataName >
291- { group . values [ 0 ] !== undefined && (
292- < MetadataValue > : { group . values [ 0 ] } </ MetadataValue >
293- ) }
290+ < span >
291+ < MetadataName
292+ onClick = { ( ) =>
293+ navigate ( `${ root } ?search=${ encodeURIComponent ( `metadata:${ group . name } ` ) } ` )
294+ }
295+ >
296+ { group . name }
297+ </ MetadataName >
298+ { group . values [ 0 ] !== undefined && (
299+ < MetadataValue > : { group . values [ 0 ] } </ MetadataValue >
300+ ) }
301+ </ span >
294302 </ MetadataEntry >
295303 ) ;
296304 }
You can’t perform that action at this time.
0 commit comments