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

[MM-24708] Added What's New modal for Channel Sidebar Phase 2 changes #5883

Merged
merged 15 commits into from
Jul 22, 2020

Conversation

devinbinnie
Copy link
Member

Summary

Copy of #5711 that was closed due to the feature branch being deleted.
See there for details.

Ticket Link

https://mattermost.atlassian.net/browse/MM-24708

@devinbinnie devinbinnie added 2: Dev Review Requires review by a core commiter 3: QA Review Requires review by a QA tester labels Jul 9, 2020
@esethna esethna added the Do Not Merge Should not be merged until this label is removed label Jul 9, 2020
@esethna esethna added this to the v5.26 milestone Jul 9, 2020
@esethna
Copy link
Contributor

esethna commented Jul 9, 2020

Awaiting the updated GIF (blocked on working out bugs with sidebar before we capture it)

show: boolean;
}

export default class GenericModal extends React.PureComponent<Props, State> {
Copy link
Contributor

Choose a reason for hiding this comment

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

What is the benefit of a class vs. functional component here?

Copy link
Member Author

Choose a reason for hiding this comment

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

Maybe I'm not understanding functional components properly. but this component does have some internal logic and state that need to be defined, so I didn't think that was possible with an FC.

Copy link
Contributor

Choose a reason for hiding this comment

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

My idea was to try move towards FC with the use of React hooks. You can achieve all that using this unless you are exposing the instance methods via refs (we should also try avoiding that btw :P). But I won't block this PR.

Copy link
Member Author

Choose a reason for hiding this comment

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

Do you feel like it's worth reworking this component to do that? I'm not sure about the effort since I haven't worked with hooks yet, but I guess I need to try it out at some point.

Copy link
Contributor

Choose a reason for hiding this comment

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

No you are right, I won't block this PR but we can discuss in the Hangouts how we wan't to proceed with hooks and FC.

components/edit_category_modal/edit_category_modal.tsx Outdated Show resolved Hide resolved
@hmhealey
Copy link
Member

@andrewbrown00 Here's the modal with the preview gif. How's it look?
image

@hmhealey hmhealey added CherryPick/Approved Meant for the quality or patch release tracked in the milestone and removed Do Not Merge Should not be merged until this label is removed labels Jul 18, 2020
@andrewbrown00
Copy link

andrewbrown00 commented Jul 18, 2020

Thanks @hmhealey, will you make the GIF wider to align to the right edge of the button; so the padding is equal on the left and right side of the GIF.

It’s fine if the modal gets a bit taller.

@hmhealey
Copy link
Member

I removed the fixed height from the image and made sure it scaled down properly on smaller screens.

Screen Shot 2020-07-18 at 09 28 54

Screen Shot 2020-07-18 at 09 28 44

Screen Shot 2020-07-18 at 9 29 37 AM

@andrewbrown00 andrewbrown00 added the Setup Cloud Test Server Setup a test server using Mattermost Cloud label Jul 19, 2020
@hmhealey hmhealey removed the 2: Dev Review Requires review by a core commiter label Jul 20, 2020
@hmhealey hmhealey requested review from prapti and removed request for jgilliam17 July 20, 2020 13:17
@hmhealey
Copy link
Member

Andrew pointed out that this opens up immediately when the user enables the sidebar from Account Settings. I'm going to see if there's a way to delay it until either the Account Settings closes or the user next refreshes. Ideally, we'd show it after the modal closes, but if there's no easy way to do that, then next refresh might be okay.

@hmhealey hmhealey self-assigned this Jul 20, 2020
@prapti
Copy link
Contributor

prapti commented Jul 21, 2020

In testing queue.

@hmhealey
Copy link
Member

Having the What's New modal appear over the Account Settings modal is a bit weird, but we've decided to leave it as-is for 5.26. We've filed a follow up to possibly change it in the future: https://mattermost.atlassian.net/browse/MM-27163

Copy link
Contributor

@prapti prapti left a comment

Choose a reason for hiding this comment

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

"What's New" modal works as expected. Tested in Chrome, Firefox, Safari and Desktop app, both as system admin and regular user.
Approving.

@prapti prapti added 4: Reviews Complete All reviewers have approved the pull request and removed 3: QA Review Requires review by a QA tester Setup Cloud Test Server Setup a test server using Mattermost Cloud labels Jul 22, 2020
@mm-cloud-bot
Copy link

Test server destroyed

@hmhealey hmhealey merged commit 0ded2cf into mattermost:master Jul 22, 2020
@mattermod
Copy link
Contributor

@devinbinnie
Error trying doing the automated Cherry picking. Please do this manually

+++ Updating remotes...
Fetching upstream
Fetching origin
+++ Updating remotes done...
+++ Creating local branch automated-cherry-pick-of-#5883-upstream-release-5.26-1595425446
Branch 'automated-cherry-pick-of-#5883-upstream-release-5.26-1595425446' set up to track remote branch 'release-5.26' from 'upstream'.
+++ Downloading patch to /tmp/5883.patch (in case you need to do this again)

+++ About to attempt cherry pick of PR. To reattempt:
  $ git am -3 /tmp/5883.patch

Applying: Genericized new modal design into component
Using index info to reconstruct a base tree...
M	i18n/en.json
Falling back to patching base and 3-way merge...
Auto-merging i18n/en.json
Applying: Architecture and functionality for What's New modal
Using index info to reconstruct a base tree...
M	i18n/en.json
Falling back to patching base and 3-way merge...
Auto-merging i18n/en.json
Applying: Added tests for generic modal and lint/type fixes
Applying: Styling of what's new modal
Using index info to reconstruct a base tree...
M	i18n/en.json
Falling back to patching base and 3-way merge...
Auto-merging i18n/en.json
Applying: Update redux to use new constants
Applying: Removed debug code
Applying: PR feedback
Applying: Bug fix and moved to ModalController
Using index info to reconstruct a base tree...
M	components/sidebar/index.ts
M	components/sidebar/sidebar.tsx
M	utils/constants.jsx
Falling back to patching base and 3-way merge...
Auto-merging utils/constants.jsx
Auto-merging components/sidebar/sidebar.tsx
Auto-merging components/sidebar/index.ts
CONFLICT (content): Merge conflict in components/sidebar/index.ts
Patch failed at 0008 Bug fix and moved to ModalController
Use 'git am --show-current-patch' to see the failed patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

+++ Conflicts detected:

UU components/sidebar/index.ts

+++ Aborting in-progress git am.

+++ Returning you to the master branch and cleaning up.

hmhealey added a commit that referenced this pull request Jul 22, 2020
…#5883)

* Genericized new modal design into component

* Architecture and functionality for What's New modal

* Added tests for generic modal and lint/type fixes

* Styling of what's new modal

* Update redux to use new constants

* Removed debug code

* PR feedback

* Bug fix and moved to ModalController

* Use React.ReactNode instead of string | JSX.Element

* Address feedback

* Add example gif

* Remove fixed height on What's New image and fix modal size on mobile

Co-authored-by: Harrison Healey <[email protected]>
@hmhealey
Copy link
Member

Manually cherry-picked onto release-5.26

@hmhealey hmhealey added CherryPick/Done Successfully cherry-picked to the quality or patch release tracked in the milestone and removed CherryPick/Approved Meant for the quality or patch release tracked in the milestone labels Jul 22, 2020
@amyblais amyblais added Changelog/Not Needed Does not require a changelog entry Docs/Not Needed Does not require documentation labels Jul 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
4: Reviews Complete All reviewers have approved the pull request Changelog/Not Needed Does not require a changelog entry CherryPick/Done Successfully cherry-picked to the quality or patch release tracked in the milestone Docs/Not Needed Does not require documentation
Projects
None yet
9 participants