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

Content flag category selection #1513

Open
wants to merge 22 commits into
base: main
Choose a base branch
from
Open

Content flag category selection #1513

wants to merge 22 commits into from

Conversation

pelumy
Copy link
Contributor

@pelumy pelumy commented Sep 17, 2024

Issues covered

Part 2 of #1498
Part 1 of #1489

Description

This PR starts work on the new content flag flow. It includes the following changes:

  • A new NosRadioButton component.
  • A new FlagOptionPicker component.
  • A new ContentFlagView component.
  • A new Moderation folder under the views folder.
  • Updates ReportMenuModifier to show either the old menu or new menu based on the newModerationFlow feature flag boolean.

How to test

  1. Build the app
  2. Click the side menu
  3. Click the Settings on the side menu
  4. Scroll down to turn on the toggle for new moderation flow
  5. Go back to the Feed screen by clicking the feed tab at the bottom of the screen
  6. Click on the 3 dots on one of the notes.
  7. Select Flag this content option.
  8. Please confirm that the new menu for the content flag category shows up.

Screenshots/Video

Before:

Screen.Recording.2024-09-17.at.2.56.12.PM.mov

After:

Screen.Recording.2024-09-17.at.2.56.31.PM.mov

@pelumy pelumy changed the title Content flag category Content flag category selection Sep 17, 2024
@pelumy pelumy marked this pull request as draft September 17, 2024 20:11
Base automatically changed from content-flag-assets-and-strings to main September 18, 2024 14:04
@pelumy pelumy marked this pull request as ready for review September 18, 2024 15:09
Copy link
Contributor

@joshuatbrown joshuatbrown left a comment

Choose a reason for hiding this comment

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

A few thoughts for now -- I didn't get a chance to test this yet but the code is looking good!

Nos/Views/Moderation/ContentFlagView.swift Show resolved Hide resolved
Nos/Views/Moderation/ContentFlagView.swift Outdated Show resolved Hide resolved
Nos/Views/Components/NosRadioButton.swift Show resolved Hide resolved
Nos/Views/Components/FlagOptionPicker.swift Outdated Show resolved Hide resolved
Nos/Views/Components/FlagOptionPicker.swift Outdated Show resolved Hide resolved
Nos/Views/Components/FlagOptionPicker.swift Show resolved Hide resolved
Copy link
Contributor

@joshuatbrown joshuatbrown left a comment

Choose a reason for hiding this comment

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

This is coming along nicely! Thanks for the name updates and for using the new #Preview!

Nos/Views/Moderation/ContentFlagView.swift Outdated Show resolved Hide resolved
Nos/Views/Components/FlagOptionPicker.swift Show resolved Hide resolved

var body: some View {
HStack(alignment: .center) {
VStack(alignment: .leading, spacing: 8) {
Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like the Spam one isn't quite centered vertically and needs to move down a bit -- probably because there's no description for it. I can't tell what we'd need to do to fix that just by looking, but I'd be happy to help debug if you'd like.

Nos/Views/Components/FlagOptionPicker.swift Outdated Show resolved Hide resolved
Nos/Views/Components/FlagOptionPicker.swift Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants