Skip to content
This repository has been archived by the owner on Mar 4, 2020. It is now read-only.

fix(ChatMessage): action menu doesn't disappear on click #1590

Merged
merged 42 commits into from
Jul 11, 2019

Conversation

mnajdova
Copy link
Contributor

@mnajdova mnajdova commented Jul 8, 2019

The action menu on the ChatMessages in Teams theme, should be open or closed based on the user interaction with the options within. For example, clicking on the emoticons, should close it, but clicking on the '...' should leave it open for the client to be able to choose one of the options.

For this to be possible, we need to allow the user to control this in some way. Currently the showing/hiding of the action menu is done only by changing the opacity of it, based on the state's focused prop. The simplest way to allow the user to control this is adding a boolean variable that can alter these styles - showActionMenu. In the future, if we decide that adding/hiding the action menu is a common thing, we may make this component AutoControlled and change it via the props.

In my opinion this is the simplest way of fixing the issue, but we still need to make insure that we are not breaking any of the prev accessibility. @sophieH29 @jurokapsiar can we test this and ensure that the focusing behavior is still working as expected?

@mnajdova mnajdova changed the title [ [WIP] fix(ChatMessage): action menu doesn't disappear on click Jul 8, 2019
@codecov
Copy link

codecov bot commented Jul 8, 2019

Codecov Report

Merging #1590 into master will decrease coverage by 0.06%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1590      +/-   ##
==========================================
- Coverage   71.53%   71.47%   -0.07%     
==========================================
  Files         848      848              
  Lines        6932     6938       +6     
  Branches     1997     2003       +6     
==========================================
  Hits         4959     4959              
- Misses       1967     1973       +6     
  Partials        6        6
Impacted Files Coverage Δ
...emes/teams/components/Chat/chatMessageVariables.ts 0% <ø> (ø) ⬆️
.../themes/teams/components/Chat/chatMessageStyles.ts 2.32% <0%> (-0.38%) ⬇️
packages/react/src/components/Menu/MenuItem.tsx 34.04% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fdc888f...c3b6ad0. Read the comment docs.

@mnajdova mnajdova changed the title [WIP] fix(ChatMessage): action menu doesn't disappear on click fix(ChatMessage): action menu doesn't disappear on click Jul 8, 2019
-updated changelog
@vercel vercel bot temporarily deployed to staging July 11, 2019 09:06 Inactive
@@ -18,11 +17,5 @@ export default () => (
>
<ImportantAndMentionMessages />
</ComponentPrototype>
<ComponentPrototype
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removing this prototype as the reactions with popup is already included in the first one

@vercel vercel bot temporarily deployed to staging July 11, 2019 09:24 Inactive
@mnajdova mnajdova merged commit f755bfc into master Jul 11, 2019
@delete-merged-branch delete-merged-branch bot deleted the fix/chat-message-action-menu branch July 11, 2019 11:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants