This repository has been archived by the owner on Mar 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Hooked up the sidebar next steps bar and some fixes * Integration of state into app for next steps view, close next steps view modal preliminary * Styling and help arrow for modal * Missed a translation * PR feedback * Center the next steps modal * PR feedback * Translation fix
- Loading branch information
1 parent
d461828
commit 77f56af
Showing
22 changed files
with
385 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. | ||
// See LICENSE.txt for license information. | ||
|
||
import {ActionTypes} from 'utils/constants'; | ||
|
||
export function setShowNextStepsView(show: boolean) { | ||
return { | ||
type: ActionTypes.SET_SHOW_NEXT_STEPS_VIEW, | ||
show, | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. | ||
// See LICENSE.txt for license information. | ||
|
||
import {connect} from 'react-redux'; | ||
import {Dispatch, bindActionCreators} from 'redux'; | ||
|
||
import {savePreferences} from 'mattermost-redux/actions/preferences'; | ||
import {makeGetCategory} from 'mattermost-redux/selectors/entities/preferences'; | ||
import {getCurrentUserId} from 'mattermost-redux/selectors/entities/users'; | ||
|
||
import {openModal, closeModal} from 'actions/views/modals'; | ||
import {setShowNextStepsView} from 'actions/views/next_steps'; | ||
import {showNextSteps} from 'components/next_steps_view/steps'; | ||
import {GlobalState} from 'types/store'; | ||
import {Preferences} from 'utils/constants'; | ||
|
||
import SidebarNextSteps from './sidebar_next_steps'; | ||
|
||
function makeMapStateToProps() { | ||
const getCategory = makeGetCategory(); | ||
|
||
return (state: GlobalState) => ({ | ||
active: state.views.nextSteps.show, | ||
showNextSteps: showNextSteps(state), | ||
currentUserId: getCurrentUserId(state), | ||
preferences: getCategory(state, Preferences.RECOMMENDED_NEXT_STEPS), | ||
}); | ||
} | ||
|
||
function mapDispatchToProps(dispatch: Dispatch) { | ||
return { | ||
actions: bindActionCreators({ | ||
savePreferences, | ||
openModal, | ||
closeModal, | ||
setShowNextStepsView, | ||
}, dispatch), | ||
}; | ||
} | ||
|
||
export default connect(makeMapStateToProps, mapDispatchToProps)(SidebarNextSteps); |
69 changes: 69 additions & 0 deletions
69
components/sidebar/sidebar_next_steps/remove_next_steps_modal.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
.RemoveNextStepsModal__helpBox { | ||
position: fixed; | ||
top: 16px; | ||
left: 201px; | ||
z-index: 1050; | ||
} | ||
|
||
.RemoveNextStepsModal__helpText { | ||
font-weight: 600; | ||
font-size: 12px; | ||
line-height: 16px; | ||
text-align: center; | ||
color: var(--center-channel-bg); | ||
display: block; | ||
width: 188px; | ||
margin-left: -12px; | ||
margin-top: 4px; | ||
} | ||
|
||
.modal .GenericModal.modal-dialog.RemoveNextStepsModal { | ||
max-width: 514px; | ||
margin-top: calc(50vh - 133px); | ||
|
||
.GenericModal__header { | ||
text-align: center; | ||
padding-bottom: 8px; | ||
|
||
h1 { | ||
font-size: 24px; | ||
line-height: 32px; | ||
} | ||
} | ||
|
||
.GenericModal__body { | ||
text-align: center; | ||
color: var(--center-channel-color); | ||
} | ||
|
||
.modal-footer { | ||
text-align: center; | ||
} | ||
|
||
.modal-content { | ||
padding: 40px 36px 24px 36px; | ||
} | ||
|
||
.GenericModal__button { | ||
padding: 13px 20px; | ||
line-height: 14px; | ||
|
||
& +.GenericModal__button { | ||
margin-left: 10px; | ||
} | ||
} | ||
} | ||
|
||
.modal-backdrop.in { | ||
clip-path: polygon(0 0, 0 63px, 240px 63px, 240px 0, 100% 0, 100% 100%, 0 100%); | ||
} | ||
|
||
.multi-teams { | ||
& ~ div .modal-backdrop.in { | ||
clip-path: polygon(0 0, 65px 0, 65px 63px, 305px 63px, 305px 0, 100% 0, 100% 100%, 0 100%); | ||
} | ||
|
||
& ~ .RemoveNextStepsModal__helpBox { | ||
left: 266px; | ||
} | ||
} |
Oops, something went wrong.