Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@hjiangsu
Copy link
Member

@hjiangsu hjiangsu commented Jan 31, 2024

Pull Request Description

This is a PR which introduces moderator actions to the post actions bottom sheet. Currently, it includes locking, pinning, and removing posts.

This is still in draft since there are a couple of things that still need to be addressed.

  • Set up a way to dynamically change the text of the action (from lock post to unlock post)
  • Clean up localizations and changes

Issue Being Fixed

Issue Number: Partially solves #1007

Screenshots / Recordings

Update (added trailing icon to moderator option)
Simulator Screenshot - iPhone 15 Pro - 2024-02-08 at 11 24 54

ebb1b32d-5c1f-47f1-a355-433fa53e3b24.mp4

Checklist

  • Did you update CHANGELOG.md?
  • Did you use localized strings where applicable?
  • Did you add semanticLabels where applicable for accessibility?

@micahmo
Copy link
Member

micahmo commented Feb 1, 2024

I know this isn't ready for review yet, but I just wanted to comment that I like the overflow menu for moderator actions! I've been wanting to add some new actions to the long-press menus as well, as had been thinking about how to reorganize it. I'm thinking, for example, community, user, and instance actions can all overflow rather than having two entries each.

Should there be an arrow on the right-hand side like the "Top" sort menu item?

@hjiangsu hjiangsu marked this pull request as ready for review February 8, 2024 19:25
@hjiangsu hjiangsu changed the title Draft: Initial moderator post actions (lock, pin, remove) Initial moderator post actions (lock, pin, remove) Feb 8, 2024
@hjiangsu
Copy link
Member Author

hjiangsu commented Feb 8, 2024

This is now ready for review! I've updated the body of the PR to include screenshots and a video

Copy link
Member

@micahmo micahmo left a comment

Choose a reason for hiding this comment

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

Wow, this is so awesome!

The only usability question I had was about the "Reason" prompt. I do know we have a similar prompt for reporting comments, but it uses a modal. I was wondering if either that mechanism should use this dialog or vice versa. I was also wondering if the text input should be bigger by default? Or maybe a better question would be to ask what happens when you enter a lot of text? Does it grow vertically or overflow horizontally?

@hjiangsu
Copy link
Member Author

hjiangsu commented Feb 12, 2024

The only usability question I had was about the "Reason" prompt. I do know we have a similar prompt for reporting comments, but it uses a modal.

Ahh good catch! I forgot that the report comment used a modal rather than dialog. I can try to adjust the logic on my end to do something similar to the comment reporting!

Or maybe a better question would be to ask what happens when you enter a lot of text? Does it grow vertically or overflow horizontally?

It overflows horizontally similar to other text inputs.

@micahmo
Copy link
Member

micahmo commented Feb 12, 2024

It overflows horizontally similar to other text inputs.

In that case I would definitely try to either have a larger initial text input box, or use the same modal as for comment reporting!

P.S. One quirk of the comment report input dialog is that the hint is centered rather than at the top. Not a big deal but ever so slightly bothersome. 😆

@hjiangsu
Copy link
Member Author

I created a new widget to hold the inline text-input. Right now, it'll be used for the mod removal but we can extend that to post report and comment report in the future!

One caveat with this right now is that cancelling the action closes the modals (does not bring you back to the options)

I also adjusted it a bit to match more with the current bottom sheet modal. Thoughts?

Simulator.Screen.Recording.-.iPhone.15.Pro.-.2024-02-12.at.10.21.58.mp4

@micahmo
Copy link
Member

micahmo commented Feb 12, 2024

Looks great! Nice to immediately focus the keyboard as well!

@hjiangsu
Copy link
Member Author

If this is good, I'll go ahead and merge this in?

@micahmo
Copy link
Member

micahmo commented Feb 12, 2024

Go for it!

@hjiangsu hjiangsu merged commit b2ddd0e into develop Feb 12, 2024
@hjiangsu hjiangsu deleted the feature/moderator-post-actions branch February 12, 2024 20:27
@machinaeZER0
Copy link
Collaborator

Sick implementation!

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.

3 participants