-
Notifications
You must be signed in to change notification settings - Fork 7k
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
MM-57319 Direct Message modal message improvement #27217
MM-57319 Direct Message modal message improvement #27217
Conversation
*Help text changed, create a modal link created
@begench-g: Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it. I understand the commands that are listed here |
Hello @begench-g, Thanks for your pull request! A Core Committer will review your pull request soon. For code contributions, you can learn more about the review process here. Per the Mattermost Contribution Guide, we need to add you to the list of approved contributors for the Mattermost project. Please help complete the Mattermost contribution license agreement? This is a standard procedure for many open source projects. Please let us know if you have any questions. We are very happy to have you join our growing community! If you're not yet a member, please consider joining our Contributors community channel to meet other contributors and discuss new opportunities with the core team. |
/check-cla |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job. A few changes.
webapp/channels/src/components/more_direct_channels/list/index.ts
Outdated
Show resolved
Hide resolved
webapp/channels/src/components/more_direct_channels/list/list.tsx
Outdated
Show resolved
Hide resolved
Not triggering E2E tests: this PR has 1 commit status(es) or check-runs that are not passing. Ensure all statuses aside from the E2E testing ones are green, before triggering E2E tests. |
Hello @larkox. Can you review it again? I fixed. Thank you for the review! |
webapp/channels/src/components/more_direct_channels/list/list.scss
Outdated
Show resolved
Hide resolved
webapp/channels/src/components/more_direct_channels/list/list.tsx
Outdated
Show resolved
Hide resolved
webapp/channels/src/components/more_direct_channels/list/list.tsx
Outdated
Show resolved
Hide resolved
@begench-g There are several style changes that seem unneeded specially in list.tsx, which make the review quite complicated to track what actually changed. Do you mind reverting the pure stylistic changes? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
As mentioned above, would you mind reverting the stylistic changes here? I assume your editor did them automatically since they look like the changes Prettier makes.
Also, could you fix the broken unit tests like I mentioned on our community server?
webapp/channels/src/components/more_direct_channels/list/list.tsx
Outdated
Show resolved
Hide resolved
webapp/channels/src/components/more_direct_channels/list/list.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One minor change more.
webapp/channels/src/components/more_direct_channels/list/list.tsx
Outdated
Show resolved
Hide resolved
remainingText = ( | ||
<FormattedMessage | ||
id={'multiselect.maxPeople'} | ||
defaultMessage={'Use ↑↓ to browse, ↵ to select. You can\'t add more than 7 people. Please <a>create a channel</a> to include more people.'} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for all the back and forth. Can you make one small change more? I don't expect we ever change the value of MAX_SELECTABLE_VALUES
, but just in case, change the 7 here for a variable ({num}
instead of 7
) and pass it directly the MAX_SELECTABLE_VALUES
in the values. That way, if we ever change it, we don't need to update the translations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I completed the task, but I found another bug. When I try to close the direct message modal using dispatch, I can't find a way to do it; so I used props instead. However, this approach failed in testing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hmhealey Any idea why dispatch may fail here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because the "show" state of the MoreDirectChannels modal is in the component, not in the global store.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd assume that it's because the modal's identifier is different than the one it was opened with. This way of closing the modal is actually preferable though because it's a bit simpler. The only reason you should really need to dispatch closeModal
is if something outside of the modal can close it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making those changes. This looks good to me!
/e2e-tests |
Not triggering E2E tests: this PR has 2 commit status(es) or check-runs that are not passing. Ensure all statuses aside from the E2E testing ones are green, before triggering E2E tests. |
/update-branch |
@begench-g can you please check the CI failures? |
I made updates to the snapshot test and it passed the CI test. |
Test server destroyed |
Summary
Issue #27175. In the Direct Message modal, once the user selects 7 members, the help text below the field is updated to “You can't add more than 7 people. Please create a channel to include more people.” The text ‘create a channel’ is a link and clicking on it dismisses this modal and triggers the Create channel modal.
Ticket Link
Fixes #27175
https://mattermost.atlassian.net/browse/MM-57319
Screenshots
Before:
![Screenshot from 2024-05-31 12-43-55](https://private-user-images.githubusercontent.com/93909709/335490812-975cf39c-2cd9-4842-8242-07d7905b14cd.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk4NjU3NjEsIm5iZiI6MTcxOTg2NTQ2MSwicGF0aCI6Ii85MzkwOTcwOS8zMzU0OTA4MTItOTc1Y2YzOWMtMmNkOS00ODQyLTgyNDItMDdkNzkwNWIxNGNkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MDElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzAxVDIwMjQyMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWIxZjQzZGZlMjJlZjIyODFlZjM5ZjE5Zjk3ZmUyOTM1NTk0YTAzMmI0MzE2NTIyYmQwYWNhM2Q4ZWEwY2E1ZmQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.XcdhUQ6EiKxolO42cTXH1oGbLvLh5jUEzqgA01rx8VM)
![DMmodal](https://private-user-images.githubusercontent.com/93909709/335490977-50353591-582e-4eb2-94cf-c39e155b67f1.gif?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk4NjU3NjEsIm5iZiI6MTcxOTg2NTQ2MSwicGF0aCI6Ii85MzkwOTcwOS8zMzU0OTA5NzctNTAzNTM1OTEtNTgyZS00ZWIyLTk0Y2YtYzM5ZTE1NWI2N2YxLmdpZj9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MDElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzAxVDIwMjQyMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWUwNGU1ZTY3MDVmN2VjYTU3ODlmOWJhMDVkZmRlM2NlNWEyYWM2OGI1MDMwODlhYmMzNGM5ZTQwMDZiODY3NmEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.oqzU9GtoAf6akr0CryvI5BE6qt36iXfgGAjD3LC28Ng)
After:
Release Note
UI change. Direct message modals help text changed