From 32f5d6d4a02dd796eb0d8404727885a16fb4cca2 Mon Sep 17 00:00:00 2001 From: Emi Matchu Date: Mon, 29 Jan 2024 01:30:18 -0800 Subject: [PATCH] Show the PosePicker, even if there are no standard poses labeled This is because I'm gonna put alt styles in here too, and I figure it's reasonable to just explain what's going on. --- .../wardrobe-2020/WardrobePage/PosePicker.js | 37 ++++++++----------- 1 file changed, 15 insertions(+), 22 deletions(-) diff --git a/app/javascript/wardrobe-2020/WardrobePage/PosePicker.js b/app/javascript/wardrobe-2020/WardrobePage/PosePicker.js index 63cf0b22..8fb6236b 100644 --- a/app/javascript/wardrobe-2020/WardrobePage/PosePicker.js +++ b/app/javascript/wardrobe-2020/WardrobePage/PosePicker.js @@ -139,15 +139,9 @@ function PosePicker({ return null; } - // If there's only one pose anyway, don't bother showing a picker! - // (Unless we're Support, in which case we want the ability to pop it open to - // inspect and label the Unknown poses!) - const numAvailablePoses = Object.values(poseInfos).filter( - (p) => p.isAvailable, + const numStandardPoses = Object.values(poseInfos).filter( + (p) => p.isAvailable && STANDARD_POSES.includes(p.pose), ).length; - if (numAvailablePoses <= 1 && !isSupportUser) { - return null; - } const onChange = (e) => { dispatchToOutfit({ type: "setPose", pose: e.target.value }); @@ -218,20 +212,17 @@ function PosePicker({ onChange={onChange} initialFocusRef={initialFocusRef} /> - {numAvailablePoses <= 1 && ( - - - The empty picker is hidden for most users! -
- You can see it because you're a Support user. -
-
+ {numStandardPoses == 0 && ( + + We're still working on labeling these! For now, + we're just giving you one of the poses we have. + )} )} @@ -371,6 +362,8 @@ const GENDER_PRESENTATION_STRINGS = { SICK_FEM: "Feminine", }; +const STANDARD_POSES = Object.keys(EMOTION_STRINGS); + function PoseOption({ poseInfo, onChange,