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

Add batch actions and categories to admin UI for custom emojis #11793

Merged
merged 1 commit into from
Sep 9, 2019

Conversation

Gargron
Copy link
Member

@Gargron Gargron commented Sep 9, 2019

image

Fix #11402

@Gargron Gargron added the moderation Administration and moderation tooling label Sep 9, 2019
@ykzts
Copy link
Sponsor Member

ykzts commented Sep 9, 2019

./spec/controllers/admin/custom_emojis_controller_spec.rb needs to be changed.

@Gargron Gargron force-pushed the feature-custom-emoji-admin-categorization branch from 2f4f79c to 137ef4e Compare September 9, 2019 15:36
Copy link
Contributor

@ClearlyClaire ClearlyClaire left a comment

Choose a reason for hiding this comment

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

LGTM overall, but see inline comments

app/controllers/admin/custom_emojis_controller.rb Outdated Show resolved Hide resolved
.fields-group.fields-row__column.fields-row__column-6
.input.string.optional
.label_input
= f.text_field :category_name, class: 'string optional', placeholder: t('admin.custom_emojis.create_new_category'), 'aria-label': t('admin.custom_emojis.create_new_category')
Copy link
Contributor

Choose a reason for hiding this comment

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

I think those would be better as a single field with autocompletion… that can be left for later though.

redirect_to admin_custom_emojis_path(page: params[:page], **@filter_params)
def batch
@form = Form::CustomEmojiBatch.new(form_custom_emoji_batch_params.merge(current_account: current_account, action: action_from_button))
@form.save
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't we have a flash message to tell the changes were processed?

expect(response).to redirect_to admin_custom_emojis_path
expect(custom_emoji.reload).to have_attributes(disabled: true)
end
end
Copy link
Contributor

Choose a reason for hiding this comment

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

Specs that cover the same use case with the new actions should probably be written.

@Gargron Gargron force-pushed the feature-custom-emoji-admin-categorization branch from 137ef4e to 3457c1f Compare September 9, 2019 20:32
@Gargron Gargron merged commit 1110ea1 into master Sep 9, 2019
@Gargron Gargron deleted the feature-custom-emoji-admin-categorization branch September 9, 2019 20:44
hiyuki2578 pushed a commit to ProjectMyosotis/mastodon that referenced this pull request Oct 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
moderation Administration and moderation tooling
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Admin UI for categorizing custom emojis
3 participants