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

[WIP] Feature: Warning system for #47 #268

Merged
merged 11 commits into from Nov 26, 2016

Conversation

Projects
None yet
4 participants
@Matslom
Copy link
Contributor

Matslom commented Nov 18, 2016

#47

  • Need some js
  • Make better design
  • Warn a user
  • Warn a user for a particular piece of content (post, topic etc)
  • Configurable presets for warning points and reasons
  • Warn using a preset, or custom reason and points
  • Revoke warn
  • Acknowledge with warn

Matslom added some commits Sep 1, 2016

Merge remote-tracking branch 'refs/remotes/origin/warning-system'
Conflicts:
	app/Presenters/UserPresenter.php
	app/Providers/AppServiceProvider.php
	resources/views/layouts/admin.twig
@euantorano
Copy link
Member

euantorano left a comment

Just a couple of minor nitpicks, otherwise this looks good!

*/
public function getPresenterClass()
{
return 'MyBB\Core\Presenters\WarningsPresenter';

This comment has been minimized.

@euantorano

euantorano Nov 18, 2016

Member

Can you please use the ::class syntax here - \MyBB\Core\Presenters\WarningsPresenter::class?

This allows IDEs to change the classes automatically if we rename them for any reason.

*/
public function issuedBy()
{
return $this->belongsTo('MyBB\\Core\\Database\\Models\\User', 'user_id');

This comment has been minimized.

@euantorano

euantorano Nov 18, 2016

Member

Again, please use \MyBB\Core\Database\Models\User::class here.

*/
public function revokedBy()
{
return $this->belongsTo('MyBB\\Core\\Database\\Models\\User', 'revoked_by');

This comment has been minimized.

@euantorano

euantorano Nov 18, 2016

Member

And again, please use ::class 😄

*/
protected $warningTypeModel;

This comment has been minimized.

@euantorano

euantorano Nov 18, 2016

Member

Unnecessary blank line - no big deal but may as well fix it now :)

return $warningType;
}

This comment has been minimized.

@euantorano

euantorano Nov 18, 2016

Member

And another empty line that could be removed.

{
return $this->warningModel->find($warnId);
}

This comment has been minimized.

@euantorano

euantorano Nov 18, 2016

Member

And another empty line 😄

*
* @return mixed
*/
//public function allForUser($user_id);

This comment has been minimized.

@euantorano

euantorano Nov 18, 2016

Member

Is this function going to be implemented, or can it be removed from the interface?

'must_acknowledge' => $request->input('must_acknowledge'),
]);
return redirect()->route('admin.warnings.warning_types')->withSuccess(trans('admin::warnings.warning_type_create_success'));

This comment has been minimized.

@euantorano

euantorano Nov 18, 2016

Member

Could this be split across multiple lines too please?

'must_acknowledge' => $request->input('must_acknowledge'),
]);
return redirect()->route('admin.warnings.warning_types')->withSuccess(trans('admin::warnings.warning_type_edit_success'));

This comment has been minimized.

@euantorano

euantorano Nov 18, 2016

Member

And another long line.

$warningTypes = $this->warningTypesRepository->all();
return view('warnings.warn_user', compact('user', 'contentType', 'contentId', 'warningTypes', 'previewContent'));

This comment has been minimized.

@euantorano

euantorano Nov 18, 2016

Member

Another long line that could be split across multiple lines please.

@euantorano

This comment has been minimized.

Copy link
Member

euantorano commented Nov 18, 2016

Also some code style changes needed it seems.

Thanks for the hard work so far though - this looks really well done!

@Matslom Matslom changed the title [WIP] Warning system [WIP] Feature: Warning system for #47 Nov 18, 2016

Matslom added some commits Nov 19, 2016

@euantorano

This comment has been minimized.

Copy link
Member

euantorano commented Nov 19, 2016

Looks good to me - I remember you saying you weren't too good at JS, so do you want to leave that and either I can add it later or somebody else can?

@Matslom

This comment has been minimized.

Copy link
Contributor

Matslom commented Nov 19, 2016

My js is very messy + I did not do anything with typescript previous. It will be nice if someone can do this.

@euantorano

This comment has been minimized.

Copy link
Member

euantorano commented Nov 19, 2016

No problem, I can do that :)

On 19 Nov 2016, at 20:17, Matslom notifications@github.com wrote:

My js is very messy + I did not do anything with typescript previous. It will be nice if someone can do this.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub #268 (comment), or mute the thread https://github.com/notifications/unsubscribe-auth/AAttcYNBSK_d2F53LOjvjG2w4Fokmwkeks5q_1lNgaJpZM4K2rkj.

@QuietSoul

This comment has been minimized.

Copy link

QuietSoul commented Nov 19, 2016

good work :) @euantorano @Matslom We are waiting for more 👍

@036

This comment has been minimized.

Copy link
Contributor

036 commented Nov 21, 2016

Looks good @Matslom good job.

@euantorano

This comment has been minimized.

Copy link
Member

euantorano commented Nov 26, 2016

Looking very good, thanks!

@euantorano euantorano merged commit 633e228 into mybb:master Nov 26, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@Matslom Matslom deleted the Matslom:warning-system branch Nov 26, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment