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

MM-57319 Direct Message modal message improvement #27217

Merged
merged 25 commits into from
Jun 24, 2024

Conversation

bruno-keiko
Copy link
Contributor

@bruno-keiko bruno-keiko commented May 31, 2024

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
After:
DMmodal

Release Note

UI change. Direct message modals help text changed

Updated help text in Direct Messages modal

   *Help text changed, create a modal link created
@mm-cloud-bot
Copy link

@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

@mattermost-build
Copy link
Contributor

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?
Once you have signed the CLA, please comment with /check-cla and confirm that the CLA check is green.

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.

@bruno-keiko
Copy link
Contributor Author

/check-cla

Copy link
Contributor

@larkox larkox left a 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.

server/config.mk Outdated Show resolved Hide resolved
webapp/channels/src/i18n/en.json Outdated Show resolved Hide resolved
@larkox larkox requested a review from hmhealey May 31, 2024 09:08
@larkox larkox added 2: Dev Review Requires review by a developer 3: QA Review Requires review by a QA tester. May occur at the same time as Dev Review labels May 31, 2024
@unified-ci-app
Copy link
Contributor

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.

@bruno-keiko
Copy link
Contributor Author

Great job. A few changes.

Hello @larkox. Can you review it again? I fixed. Thank you for the review!

@hmhealey hmhealey requested a review from larkox June 13, 2024 13:51
@larkox
Copy link
Contributor

larkox commented Jun 13, 2024

@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?

@hmhealey hmhealey changed the title MM-27175 Direct Message modal message improvement MM-57319 Direct Message modal message improvement Jun 13, 2024
@mm-cloud-bot mm-cloud-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed do-not-merge/release-note-label-needed labels Jun 13, 2024
Copy link
Member

@hmhealey hmhealey left a 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?

Copy link
Contributor

@larkox larkox left a 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.

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.'}
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Member

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

Copy link
Contributor

@larkox larkox left a 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!

Copy link
Member

@hmhealey hmhealey left a 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!

@hmhealey hmhealey removed the 2: Dev Review Requires review by a developer label Jun 18, 2024
@yasserfaraazkhan
Copy link
Contributor

/e2e-tests

@unified-ci-app
Copy link
Contributor

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.

@yasserfaraazkhan
Copy link
Contributor

/update-branch

@yasserfaraazkhan yasserfaraazkhan added the Setup Cloud Test Server Setup an on-prem test server label Jun 20, 2024
@yasserfaraazkhan
Copy link
Contributor

@begench-g can you please check the CI failures?

@yasserfaraazkhan yasserfaraazkhan removed the Setup Cloud Test Server Setup an on-prem test server label Jun 20, 2024
@bruno-keiko
Copy link
Contributor Author

@begench-g can you please check the CI failures?

I made updates to the snapshot test and it passed the CI test.

@yasserfaraazkhan yasserfaraazkhan added the Setup Cloud Test Server Setup an on-prem test server label Jun 24, 2024
@larkox larkox added 4: Reviews Complete All reviewers have approved the pull request and removed 3: QA Review Requires review by a QA tester. May occur at the same time as Dev Review labels Jun 24, 2024
@larkox larkox merged commit 06f5953 into mattermost:master Jun 24, 2024
16 checks passed
@mattermost-build mattermost-build removed the Setup Cloud Test Server Setup an on-prem test server label Jun 24, 2024
@mm-cloud-bot
Copy link

Test server destroyed

@amyblais amyblais added Docs/Needed Requires documentation Changelog/Done Required changelog entry has been written labels Jun 24, 2024
@amyblais amyblais added this to the v9.11.0 milestone Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4: Reviews Complete All reviewers have approved the pull request Changelog/Done Required changelog entry has been written Contributor Docs/Needed Requires documentation release-note Denotes a PR that will be considered when it comes time to generate release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DM Modal Message 'You can add 0 more people' needs improvement
7 participants