Numberless mode
- replaces all numbers greater than 1 with "Several"
- adds a new experimental setting (default
false) for this behavior
A quick audit tells me that shortenNumber is consistently used everywhere I would want to change, so I cut out the middleman and did it there.
~~Genuinely unsure if this is the best way to load a setting within a non-component context. Will gladly change if needed.~~ Nearly immediately after opening this PR I realized the (likely) correct way. Let me know if I'm still off-base.
In my testing, I've spotted a couple places where some metrics are still visible with this option enabled:
- https://github.com/cheeaun/phanpy/blob/main/src/components/account-block.jsx#L196-L204 (shows how many followers an account has)
- Some places in the profile page where counts are shown in
titleattributes:- https://github.com/cheeaun/phanpy/blob/main/src/components/account-info.jsx#L729
- https://github.com/cheeaun/phanpy/blob/main/src/components/account-info.jsx#L753
- https://github.com/cheeaun/phanpy/blob/main/src/components/account-info.jsx#L770
woo thank you jae. excited for this to merge it literally solves all my problems
Just a note, faving or unfaving a post currently animates in a "1" before hiding it on your deployment.
Used this a bit in my fork and seems to be working fine! 🤩
Text doesn't seem to be updated everywhere like it is when Cloak mode is activated though, I wonder what's the reason for that...
2 notes:
- Returning
SeveralfromshortenNumberis kinda hacky 😬- i18n gets a little tricky though not entirely impossible
- Thinking about this, might as well "cloak" all numbers? (There's Cloak mode in Phanpy which hides text, useful for taking screenshots)
- For some reason, the recent commits seems co-authored, became part of this PR, and the changes are not specific to this feature.
- Returning
SeveralfromshortenNumberis kinda hacky 😬
unbelievably hacky! no question there. the use of "several" is a joke relating back to how we handed numbers on cohost.
- Thinking about this, might as well "cloak" all numbers? (There's Cloak mode in Phanpy which hides text, useful for taking screenshots)
this is almost certainly the better way to go. I can look into switching to this
- For some reason, the recent commits seems co-authored, became part of this PR, and the changes are not specific to this feature.
git fail on my part; tried to rebase main on and goofed it. will resolve that one