phanpy icon indicating copy to clipboard operation
phanpy copied to clipboard

Numberless mode

Open jkap opened this issue 1 year ago • 3 comments

  • 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.

jkap avatar Oct 01 '24 18:10 jkap

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 title attributes:
    • 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

Sorixelle avatar Oct 03 '24 05:10 Sorixelle

woo thank you jae. excited for this to merge it literally solves all my problems

qt-dork avatar Oct 03 '24 11:10 qt-dork

Just a note, faving or unfaving a post currently animates in a "1" before hiding it on your deployment.

ticky avatar Oct 03 '24 23:10 ticky

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...

Steffo99 avatar Oct 04 '24 21:10 Steffo99

2 notes:

  • Returning Several from shortenNumber is 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.

cheeaun avatar Oct 10 '24 00:10 cheeaun

  • Returning Several from shortenNumber is 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

jkap avatar Oct 10 '24 01:10 jkap