Excluded threadMenu logc into separate Menu component. Changes names from ThreadMenu... to Menu....
The goal is to use the component in different places where menu with actions is needed.
Details
Run web app, thread actions menu in top right corner should still look and behave in the same way.
Diff Detail
- Repository
- rCOMM Comm
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
web/chat/thread-menu.react.js | ||
---|---|---|
182 ↗ | (On Diff #10187) | It looks like the style of this element is specific to thread-menu so it might be a better idea to keep thread-menu.css with only separator class |
web/components/menu.react.js | ||
---|---|---|
18 ↗ | (On Diff #10433) | I've never had to do something like this, so I'm not sure what the best pattern is. This approach strikes me as imperative rather than declarative, and React usually tries to be declarative. But I guess maybe there's no declarative way to do this in React (add a listener to document). It looks like you're handling the lifecycle well. If you have any resources you can link that talk about best practices for this sort of thing in React, that would be great! |
36 ↗ | (On Diff #10433) | React.Children.count is a function that takes a parameter |