Skip to content

Conversation

@kavink98
Copy link
Contributor

@kavink98 kavink98 commented Dec 8, 2022

Cannot add lists to modals currently, so the server tab is removed. Anonymous is enabled via a text input where the user has to type in yes if they want to stay anonymous

@Zabuzard
Copy link
Member

Zabuzard commented Dec 8, 2022

Can you share some screenshots please?

Copy link
Member

@Zabuzard Zabuzard left a comment

Choose a reason for hiding this comment

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

(its just a draft PR, but i thought ill just add some stuff before we forget it)

@Tais993
Copy link
Member

Tais993 commented Dec 8, 2022

I don't believe that this improves UX in any ways, quite the opposite.

Having a slash-command option allows it to only allow "true" and "false"
Now it's only "yes", if someone types "y" or anything else that might mean true, it simply doesn't work.

There is no error or warning in the modal itself.

@Zabuzard
Copy link
Member

Zabuzard commented Dec 8, 2022

I was rather thinking of sth mixed actually. Like, the user pops the slash command with all the options and then gets a modal to input the message. Or similar maybe

@Tais993
Copy link
Member

Tais993 commented Dec 8, 2022

Isn't that the current implementation?

If no, yes that's best UX we can have

@Zabuzard
Copy link
Member

Zabuzard commented Dec 8, 2022

Isn't that the current implementation?

If no, yes that's best UX we can have

current is only slash command, so u have to enter the message as slash command option:

pic

@kavink98
Copy link
Contributor Author

kavink98 commented Dec 8, 2022

Yeah I can keep the server and stay anonymous as options and then open up a modal for the message only. I will update this branch

@kavink98 kavink98 linked an issue Dec 8, 2022 that may be closed by this pull request
@kavink98 kavink98 self-assigned this Dec 8, 2022
@kavink98
Copy link
Contributor Author

kavink98 commented Dec 8, 2022

The /modmail command now initially has the following options

options

And on submission it will open the following modal to enter the message

modal

@kavink98 kavink98 marked this pull request as ready for review December 9, 2022 03:34
@kavink98 kavink98 requested review from a team as code owners December 9, 2022 03:34
private static final Logger logger = LoggerFactory.getLogger(ModMailCommand.class);
public static final String COMMAND_NAME = "modmail";
private static final String OPTION_MESSAGE = "message";
private static final String MESSAGE = "message";
Copy link
Member

Choose a reason for hiding this comment

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

it has to be clear what this field is and where its used. the current name doesnt tell.
maybe go for MODAL_INPUT_MESSAGE or similar

MessageCreateAction message =
createModMessage(event, userId, modMailAuditLog.orElseThrow());
MessageCreateAction message = createModMessage(event, Boolean.parseBoolean(args.get(0)),
userId, modMailAuditLog.orElseThrow());
Copy link
Member

Choose a reason for hiding this comment

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

The code is easier to read if you extract the args seperated and at the beginning:

boolean stayAnonymous = Boolean.parseBoolean(args.get(0));
long guildToContact = Long.parseLong(args.get(1));
...

@Taz03
Copy link
Member

Taz03 commented Jan 7, 2023

i'd say keep the stay-anonymous option inside the modal as well.

@Taz03
Copy link
Member

Taz03 commented Jan 7, 2023

@kavink98 r u still active, or do u want someone else to take over this pr?

@kavink98
Copy link
Contributor Author

kavink98 commented Jan 7, 2023 via email

@github-actions
Copy link

github-actions bot commented Feb 7, 2023

This pull request is stale because it has been open 30 days with no activity. Remove stale label, comment or add the valid label or this will be closed in 5 days.

@github-actions github-actions bot added the stale label Feb 7, 2023
@Taz03
Copy link
Member

Taz03 commented Feb 7, 2023

@kavink98 should someone else take over this pr?

@github-actions github-actions bot added valid This issue/PR is validated and ready to be picked. This auto adds items to TJ project board. and removed stale labels Feb 8, 2023
@Taz03 Taz03 added stale and removed valid This issue/PR is validated and ready to be picked. This auto adds items to TJ project board. labels Mar 6, 2023
@Taz03
Copy link
Member

Taz03 commented Mar 11, 2023

done in #800

@Taz03 Taz03 closed this Mar 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

/modmail modal support

4 participants