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

Make Notification and Make Mail Consistency #54211

Closed
wants to merge 4 commits into from

Conversation

AhmedAlaa4611
Copy link

There is no consistency between make:notification and make:mail without arguments.

make:notification asks about:

1- The name of the notification.
2- Whether to create a markdown view or not.
3- What is the name of the view.

While make:mail asks about:

1- The name of the mail.
2- Whether to create a view or an empty view or not.

I have noticed a few things:

1- There is no need to ask about the name of the view while creating the notification because our command should use naming conventions to guess it.

2- There is no need to ask about creating an empty view while creating the mail, It should only ask about whether to create a markdown view or not.

3- getOptions() method used in both of them but in different places in the classes.

4- getView() method is written in one class but the other uses it's content inside another method.

These things are important for consistency.

According to PR #52355 and #52057

1- Replacing `select` with `confirm`.
2- Modify the `getView()` method for consistency with `NotificationMakeCommand`.
3-  Place the `getOptions()` method to the end of the class for consistency with `NotificationMakeCommand`.
1- No need to ask about the markdown view name, use naming conventions to guess it.

2- Added the `getView()` method  for consistency with `MailMakeCommand`.
1- Remove `testItCanGenerateMailWithViewWithNoInitialInput()` method.

2- make some adjustments to the `testItCanGenerateMailWithNoInitialInput()` and `testItCanGenerateMailWithMarkdownViewWithNoInitialInput()` methods
1- Eliminating the need to ask about the markdown view name in `testItCanGenerateNotificationFileWithMarkdownTemplateWithNotInitialInput()` method
@taylorotwell
Copy link
Member

I think the only thing I would change is adding a suggested name for the make:mail Markdown view and no other changes in this PR.

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.

2 participants