-
Notifications
You must be signed in to change notification settings - Fork 2.7k
[MM-24708] Added What's New modal for Channel Sidebar Phase 2 changes #5883
Conversation
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> { |
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.
What is the benefit of a class vs. functional component 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.
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.
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.
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.
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.
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.
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.
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/sidebar/sidebar_whats_new_modal/sidebar_whats_new_modal.tsx
Outdated
Show resolved
Hide resolved
@andrewbrown00 Here's the modal with the preview gif. How's it look? |
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. |
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. |
In testing queue. |
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 |
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.
"What's New" modal works as expected. Tested in Chrome, Firefox, Safari and Desktop app, both as system admin and regular user.
Approving.
Test server destroyed |
@devinbinnie
|
…#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]>
Manually cherry-picked onto release-5.26 |
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