[IMPROVE] Move 'Reply in Thread' button from menu to message actions (#15685)

* [IMPROVE] Move Reply in Thread button from menu to message actions

* fix review
pull/15878/head
Rodrigo Nascimento 6 years ago committed by GitHub
commit 9b3c190eca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      app/threads/client/messageAction/replyInThread.js
  2. 2
      app/ui-message/client/message.html
  3. 6
      app/ui/client/views/app/room.js
  4. 6
      tests/end-to-end/ui/06-messaging.js
  5. 2
      tests/pageobjects/main-content.page.js

@ -34,7 +34,7 @@ Meteor.startup(function() {
return Boolean(subscription);
},
order: 1,
group: 'menu',
group: 'message',
});
});
});

@ -130,7 +130,7 @@
<div class="message-actions__buttons">
{{#each action in messageActions 'message'}}
<button class="message-actions__button" data-message-action="{{action.id}}">
<button class="message-actions__button" data-message-action="{{action.id}}" title="{{_ action.label}}">
{{> icon block="message-actions__button-icon" icon=action.icon}}
</button>
{{/each}}

@ -627,6 +627,12 @@ export const dropzoneEvents = {
Template.room.events({
...dropzoneEvents,
'click [data-message-action]'(event, template) {
const button = MessageAction.getButtonById(event.currentTarget.dataset.messageAction);
if ((button != null ? button.action : undefined) != null) {
button.action.call(this, event, template);
}
},
'click .js-follow-thread'() {
const { msg } = messageArgs(this);
call('followMessage', { mid: msg._id });

@ -107,10 +107,6 @@ function messageActionsTest() {
mainContent.messageActionMenu.isVisible().should.be.true;
});
it('it should show the reply action', () => {
mainContent.messageReply.isVisible().should.be.true;
});
it('it should show the edit action', () => {
mainContent.messageEdit.isVisible().should.be.true;
});
@ -157,7 +153,7 @@ function messageActionsTest() {
describe('[Usage]', () => {
describe('Reply:', () => {
before(() => {
mainContent.openMessageActionMenu();
mainContent.lastMessage.moveToObject();
});
it('it should reply the message', () => {
mainContent.selectAction('reply');

@ -60,7 +60,7 @@ class MainContent extends Page {
get messageActionMenu() { return browser.element('.rc-popover .rc-popover__content'); }
get messageReply() { return browser.element('[data-id="reply-in-thread"][data-type="message-action"]'); }
get messageReply() { return browser.element('.message:last-child .message-actions__button[data-message-action="reply-in-thread"]'); }
get messageEdit() { return browser.element('[data-id="edit-message"][data-type="message-action"]'); }

Loading…
Cancel
Save