Changeset View
Changeset View
Standalone View
Standalone View
src/applications/settings/setting/PhabricatorSkinToneSetting.php
- This file was added.
<?php | |||||
final class PhabricatorSkinToneSetting | |||||
extends PhabricatorSelectSetting { | |||||
const SETTINGKEY = 'skintone'; | |||||
const TONE_RANDOM = 'random'; | |||||
const TONE_NONE = 'neutral'; | |||||
const TONE_1 = 'tone1'; | |||||
const TONE_2 = 'tone2'; | |||||
const TONE_3 = 'tone3'; | |||||
const TONE_4 = 'tone4'; | |||||
const TONE_5 = 'tone5'; | |||||
public function getSettingName() { | |||||
return pht('Emoji Skin Tone'); | |||||
} | |||||
public function getSettingPanelKey() { | |||||
return PhabricatorAccountSettingsPanel::PANELKEY; | |||||
} | |||||
protected function getSettingOrder() { | |||||
return 300; | |||||
} | |||||
protected function getControlInstructions() { | |||||
return pht('Choose the default skin tone for your emoji.'); | |||||
amckinley: "for the emoji that you send"? Or will this in fact render all emojis with the user's requested… | |||||
epriestleyAuthorUnsubmitted Not Done Inline ActionsIt's just emoji that you type. I like your phrasing much better than mine. epriestley: It's just emoji that you type. I like your phrasing much better than mine. | |||||
} | |||||
public function getSettingDefaultValue() { | |||||
return self::TONE_RANDOM; | |||||
amckinleyUnsubmitted Not Done Inline ActionsThis should itself be a setting 😛 amckinley: This should itself be a setting 😛 | |||||
epriestleyAuthorUnsubmitted Not Done Inline ActionsI intentionally made the default-default not selectable because an administrator setting the global default to "Light Skin Tone" is probably asking for trouble, just like we don't let administrators set the default pronoun to "his". There's currently no way to say "you can set the global default to 'random' or 'neutral' but not anything else", although if there was that would probably be reasonable. Not sure if it's worthwhile to add it just for this. Maybe if we get a mix of positive and not-so-positive feedback. epriestley: I intentionally made the default-default not selectable because an administrator setting the… | |||||
} | |||||
protected function getSelectOptions() { | |||||
return array( | |||||
self::TONE_RANDOM => pht('Random Skin Tone'), | |||||
self::TONE_NONE => pht("\xF0\x9F\x91\x8D Unspecified Skin Tone"), | |||||
amckinleyUnsubmitted Not Done Inline ActionsFor consistency, should this be "Unspecified", "Neutral", or "None"? amckinley: For consistency, should this be "Unspecified", "Neutral", or "None"? | |||||
self::TONE_1 => | |||||
pht("\xF0\x9F\x91\x8D\xF0\x9F\x8F\xBB Light Skin Tone"), | |||||
self::TONE_2 => | |||||
pht("\xF0\x9F\x91\x8D\xF0\x9F\x8F\xBC Medium-Light Skin Tone"), | |||||
self::TONE_3 => | |||||
pht("\xF0\x9F\x91\x8D\xF0\x9F\x8F\xBD Medium Skin Tone"), | |||||
self::TONE_4 => | |||||
pht("\xF0\x9F\x91\x8D\xF0\x9F\x8F\xBE Medium-Dark Skin Tone"), | |||||
self::TONE_5 => | |||||
pht("\xF0\x9F\x91\x8D\xF0\x9F\x8F\xBF Dark Skin Tone"), | |||||
); | |||||
} | |||||
protected function canSetServerDefault() { | |||||
return false; | |||||
} | |||||
} |
"for the emoji that you send"? Or will this in fact render all emojis with the user's requested skin tone?