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

[FIX] set-toolbar-items postMessage #11109

Merged
merged 5 commits into from
Jun 14, 2018
Merged

[FIX] set-toolbar-items postMessage #11109

merged 5 commits into from
Jun 14, 2018

Conversation

ggazzo
Copy link
Member

@ggazzo ggazzo commented Jun 12, 2018

We had some refactors and this code was deleted...

image
image

@ggazzo ggazzo requested a review from rodrigok June 12, 2018 18:48
@engelgabriel engelgabriel temporarily deployed to rocket-chat-pr-11109 June 12, 2018 18:48 Inactive
@ggazzo ggazzo temporarily deployed to rocket-chat-pr-11109 June 12, 2018 18:48 Inactive
@ggazzo ggazzo added this to Review/QA in June/2018 via automation Jun 13, 2018
@ggazzo ggazzo added this to the 0.66.0 milestone Jun 13, 2018
@ggazzo ggazzo requested a review from tassoevan June 14, 2018 19:33
id: key,
...toolbar.buttons[key]
};
});
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe compact mapper function as

id => ({ id, ...toolbar.buttons[id] })

fireGlobalEvent('click-toolbar-button', { id: this.id });
$('button', e.currentTarget).blur();
Copy link
Contributor

Choose a reason for hiding this comment

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

e.currentTarget.querySelector('body').blur() should match the required browser supported.

function(err) {
if (err) {
return handleError(err);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you avoid some extra lines using an arrow function?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes we can!

@engelgabriel engelgabriel temporarily deployed to rocket-chat-pr-11109 June 14, 2018 20:14 Inactive
Copy link
Contributor

@tassoevan tassoevan left a comment

Choose a reason for hiding this comment

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

Exception in template helper: TypeError: Cannot read property 'buttons' of undefined
    at Object.postButtons (http://localhost:3000/packages/rocketchat_ui-flextab.js?hash=3e0ec2c95f4ca5993a961c6c2f5eee027e4cabc2:3719:39)
    at http://localhost:3000/packages/blaze.js?hash=a1ff2d6d5ecd59ee11e2ba260b8650a9d1140f59:3051:16
    at http://localhost:3000/packages/blaze.js?hash=a1ff2d6d5ecd59ee11e2ba260b8650a9d1140f59:1715:16
    at http://localhost:3000/packages/blaze.js?hash=a1ff2d6d5ecd59ee11e2ba260b8650a9d1140f59:3103:66
    at Function.Template._withTemplateInstanceFunc (http://localhost:3000/packages/blaze.js?hash=a1ff2d6d5ecd59ee11e2ba260b8650a9d1140f59:3744:12)
    at http://localhost:3000/packages/blaze.js?hash=a1ff2d6d5ecd59ee11e2ba260b8650a9d1140f59:3102:27
    at Object.Spacebars.call (http://localhost:3000/packages/spacebars.js?hash=547cf8e466d1d52603d19bd5f48fb5df184fd237:172:18)
    at Template.RoomsActionTab.HTML.DIV.class (http://localhost:3000/packages/rocketchat_ui-flextab.js?hash=3e0ec2c95f4ca5993a961c6c2f5eee027e4cabc2:127:22)
    at Blaze.View.<anonymous> (http://localhost:3000/packages/spacebars.js?hash=547cf8e466d1d52603d19bd5f48fb5df184fd237:264:18)
    at http://localhost:3000/packages/blaze.js?hash=a1ff2d6d5ecd59ee11e2ba260b8650a9d1140f59:1934:20

@ggazzo ggazzo changed the title [FIX] set-toolbar-items working again [FIX] set-toolbar-items postMessage Jun 14, 2018
@ggazzo ggazzo merged commit 3d81ff0 into develop Jun 14, 2018
June/2018 automation moved this from Review/QA to Closed Jun 14, 2018
@ggazzo ggazzo deleted the fix-set-toolbar-button branch June 14, 2018 21:43
@rodrigok rodrigok mentioned this pull request Jun 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
June/2018
  
Closed
Development

Successfully merging this pull request may close these issues.

None yet

3 participants