mattermost-plugin-playbooks
mattermost-plugin-playbooks copied to clipboard
Mm 44752 add dot menu to lhs
Summary
This PR adds a dot menu to the LHS. Playbook menu items:
- Favorite / Unfavorite
- Copy link
- Leave
Run menu items:
- Favorite / Unfavorite
- Copy link
- Follow / Unfollow
- Leave (Only if participants)
Changelog highlights:
- DotMenu had issues with z-index and content overflow, thanks to @calebroseland switched to using
dropdown
instead. - Moved menu items from
contex_menu
tocontrols
to reuse them in the LHS - Moved shared components to
shared.tsx
https://user-images.githubusercontent.com/4368372/187399285-3803723d-10e4-421f-a7fe-b9e021a38a0b.mp4
Ticket Link
https://mattermost.atlassian.net/browse/MM-44752
Checklist
~~- [ ] Telemetry updated~~ ~~- [ ] Gated by experimental feature flag~~
- [x] Unit tests updated
Something I noticed - for runs, favorite/unfavorite using the dot menu updates the LHS as expected, however the star icon in the run details does not change until a refresh.
Favorite/unfavorite is working better in that the run details star now updates when clicking away and back to the run without a full page refresh, but I still would like that to happen immediately in the same view if possible.
Favorite/unfavorite is working better in that the run details star now updates when clicking away and back to the run without a full page refresh, but I still would like that to happen immediately in the same view if possible.
Unfortunately, there is no easy way to make the live update work for Follow/Unfollow and Favorite/Unfavorite until we move entirely run API to GraphQL. I'll add Jira bugs and will fix them after API is migrated.
Just a detail, you must force a refreshLHS when setting a new owner to force LHS to know about the change, and allow you to leave the run.
Nice catch! thanks.