Add some sort of sort to Emoji Autocomplete
Summary: Ref T12139. Adds sorting by shortname. Also I sorted everything else. No reason. It didn't help Test Plan: `:star` Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Maniphest Tasks: T12139 Differential Revision: https://secure.phabricator.com/D17246
This commit is contained in:
		@@ -21,8 +21,9 @@ $args->parse(
 | 
			
		||||
  ));
 | 
			
		||||
 | 
			
		||||
$root = dirname(phutil_get_library_root('phabricator'));
 | 
			
		||||
$path = $root.'/webroot/rsrc/externals/emojione/emoji_strategy.json';
 | 
			
		||||
$export_path = $root.'/webroot/rsrc/emoji/manifest.json';
 | 
			
		||||
// move this to an argument?
 | 
			
		||||
$path = $root.'/emoji_strategy.json';
 | 
			
		||||
$export_path = $root.'/resources/emoji/manifest.json';
 | 
			
		||||
 | 
			
		||||
if (Filesystem::pathExists($path)) {
 | 
			
		||||
  $json = Filesystem::readFile($path);
 | 
			
		||||
@@ -39,6 +40,7 @@ if (Filesystem::pathExists($path)) {
 | 
			
		||||
    $data[$shortname] = $hex;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  ksort($data);
 | 
			
		||||
  $json = new PhutilJSON();
 | 
			
		||||
  $data = $json->encodeFormatted($data);
 | 
			
		||||
  Filesystem::writeFile($export_path, $data);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user