Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add follow button to highlighted post #2828

Merged
merged 7 commits into from
Feb 12, 2024
Merged

Conversation

haileyok
Copy link
Contributor

@haileyok haileyok commented Feb 10, 2024

Doing some modifications on the highlighted post.

  1. Adding a follow button
  • Button is initially visible if the user is not being followed.
  • The button stays visible even after the user is followed until the user leaves the screen
  • The button will be removed/added both on blur and on focus, so it will maintain visibility with the viewer in the profile's shadow
  1. Remove the TimeElappsed from the highlighted post. We are displaying the timestamp below, and having this there is hindering us having the button there. This is the common behavior in other apps as well.
  2. Removing static width on the display name and handle. We flex these properly now so that they take up the full line instead of being truncated. This prevents some issues that we were seeing with longer display names (especially whenever using larger font sizes)
Screen.Recording.2024-02-10.at.5.21.38.PM.mov

@surfdude29
Copy link
Contributor

surfdude29 commented Feb 10, 2024

Sorry for jumping in here unsolicited, but what about simply using a plus sign as the icon on mobile? It would be reminiscent of the + Follow button on the profile page just without the text.

I think the function of the button would be more intuitive to users and would prompt fewer "Oh **** I didn't realise tapping that meant Follow" situations. Especially when the user is perhaps distracted, not paying full attention etc and notices and reacts after the 3 seconds have elapsed and it's too late to undo.

Here is a crude iOS mockup (based on 1.67 so the layout of other elements is out-of-date):

IMG_8344

Also, an alternate/follow-up suggestion that builds on that which would add a tiny bit more friction but which might be a good tradeoff: what about making it a two-stage process? Tap the + button once, it then expands into a full-width + Follow button identical to the one on the profile page, and tapping on that then triggers the behaviour already outlined: the button changes state and fades away (probably immediately in this case?)

This option would have the advantage of avoiding accidental follows almost entirely.

@haileyok
Copy link
Contributor Author

Hey it's open for a reason, always feel free to jump in!

I had the same thought about the icon, but wasn't sure that the plus by itself was clear enough. I also feel the same way about the current icon though, so... :)

I'm not opposed at all though to having a modal that verifies your decision to follow, I'll see how nicely that implements, but I suspect it would be pretty nice actually. Would only use it on mobile I think?

@gaearon
Copy link
Collaborator

gaearon commented Feb 11, 2024

Re: three seconds, I'd just keep it there (so it stays if you weren't following at the time you pressed into the post).

@haileyok
Copy link
Contributor Author

haileyok commented Feb 11, 2024

Re: three seconds, I'd just keep it there (so it stays if you weren't following at the time you pressed into the post).

Yea agree. I made some more changes here as noted above, including removing the 3 seconds. I think this is actually a better look. We update the wasFollowing state on focus as well so that we can stay in sync with the profile shadow.

Not really sure why we had static width for the display names either, but I think this looks better. There's no reason imo to be keeping the names at sometimes under half the screen size when there's nothing else to display.

@haileyok haileyok linked an issue Feb 11, 2024 that may be closed by this pull request
@haileyok
Copy link
Contributor Author

@emilyliu7321 Just tagging you for your input here on whats above

@surfdude29
Copy link
Contributor

@haileyok The solution you've arrived at is great, nice job! :)

@pfrazee
Copy link
Collaborator

pfrazee commented Feb 12, 2024

If we're looking to reduce down to an icon, maybe this:

CleanShot 2024-02-12 at 11 30 40@2x

Copy link
Collaborator

@pfrazee pfrazee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@pfrazee pfrazee merged commit fe57335 into main Feb 12, 2024
4 checks passed
@pfrazee pfrazee deleted the hailey/follow-button-in-highlight branch February 12, 2024 19:47
estrattonbailey added a commit that referenced this pull request Feb 12, 2024
* origin/main: (33 commits)
  Improved server selector during account creation and signin (#2840)
  remove line height from text input for composer on ios (#2844)
  Add follow button to highlighted post (#2828)
  Cleaning up old codes pt_BR (#2809)
  Fix wrong translations in zh-CN localization  (#2812)
  Adjust Japanese translation (#2814)
  Update ja messages.po (#2821)
  change follow to follow all when !== 20 (#2831)
  ios adult content link fix 🤦 (#2845)
  improves build.md completeness (#2835)
  increase stroke width for active hashtag icon (#2829)
  Update `blueskyweb.xyz` links to `bsky.social` (#2830)
  eas nightlies (#2826)
  Always show post dropdown button at the bottom of the post, add share button to highlighted post (#2646)
  Measure header layout reliably (#2817)
  Round line height (#2824)
  Design system tweaks (#2822)
  Fix layout calculations (#2816)
  Fix flashes and jumps when opening profile (#2815)
  Show text cursor on web bio (#2813)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add follow button next to posts from users you don't follow
4 participants