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

commented Sep 9, 2019

image

Fix #11402

@ykzts

This comment has been minimized.

Copy link
Collaborator

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 Sep 9, 2019

@ThibG
ThibG approved these changes Sep 9, 2019
Copy link
Collaborator

left a comment

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')

This comment has been minimized.

Copy link
@ThibG

ThibG Sep 9, 2019

Collaborator

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

This comment has been minimized.

Copy link
@ThibG

ThibG Sep 9, 2019

Collaborator

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

This comment has been minimized.

Copy link
@ThibG

ThibG Sep 9, 2019

Collaborator

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 Sep 9, 2019

@Gargron Gargron merged commit 1110ea1 into master Sep 9, 2019

2 checks passed

build-and-test Workflow: build-and-test
Details
codeclimate All good!
Details

@Gargron Gargron deleted the feature-custom-emoji-admin-categorization branch Sep 9, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.