Dismiss tour from overlay (#2525)

* Shows "(Deleted User)" instead of UUID when user not found (#2354) (#2465)

* Shows "(Deleted User)" instead of long, unreadable UUID in case the user is not found

In case a user is not found, at present unreadable and long UUIDs are shown which kill the look and feel of the application. This patch replaces the UUID with a more explanatory string.

* Update server/services/store/mattermostauthlayer/mattermostauthlayer.go

Co-authored-by: Doug Lauder <wiggin77@warpmail.net>
(cherry picked from commit 68819185a4)

Co-authored-by: Akshay Vasudeva Rao <51395864+akkivasu@users.noreply.github.com>

* Update CHANGELOG.md for v0.15

Added one more merged PR to the list

* Added ability to dismiss tour from overlay

* GH-2212 - Update global link on board (#2492) (#2495)

(cherry picked from commit 49df41f9b2)

Co-authored-by: Asaad Mahmood <asaadmahmood@users.noreply.github.com>

* GH-2387 - Fixing link in comments (#2480) (#2498)

(cherry picked from commit 5e2cf0b386)

Co-authored-by: Asaad Mahmood <asaadmahmood@users.noreply.github.com>

* Addead feature to start product tour on using the welcome template (#2468)

* Fixed a bug where images of the welcome board were not copied over. (#2453)

* Fixed a buig where images of welcome board were not copied over

* Lint fixes

* Fixed test

* Fixed test

* Fixed intended behavio

* lint fixes

* Fixed tests

* Fixed tests

Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Akshay Vasudeva Rao <51395864+akkivasu@users.noreply.github.com>
Co-authored-by: Winson Wu <93531870+wuwinson@users.noreply.github.com>
Co-authored-by: Asaad Mahmood <asaadmahmood@users.noreply.github.com>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
This commit is contained in:
Harshil Sharma 2022-03-12 03:16:32 +05:30 committed by GitHub
parent 2cead9a444
commit a53e947489
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 65 additions and 6 deletions

View file

@ -55,6 +55,7 @@ describe('components/cardDialog', () => {
cards: {
[card.id]: card,
},
current: card.id,
},
boards: {
boards: {

View file

@ -98,6 +98,7 @@ describe('components/centerPanel', () => {
cards: {
templates: [card1, card2],
cards: [card1, card2],
current: card1.id,
},
views: {
views: {

View file

@ -1,6 +1,6 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import React from 'react'
import React, {useEffect} from 'react'
import {FormattedMessage} from 'react-intl'
@ -10,8 +10,21 @@ import './add_properties.scss'
import {Utils} from '../../../utils'
import addProperty from '../../../../static/addProperty.gif'
import {CardTourSteps, TOUR_CARD} from '../index'
import {BaseTourSteps, CardTourSteps, TOUR_BASE, TOUR_CARD} from '../index'
import TourTipRenderer from '../tourTipRenderer/tourTipRenderer'
import {OnboardingBoardTitle, OnboardingCardTitle} from '../../cardDetail/cardDetail'
import {useAppDispatch, useAppSelector} from '../../../store/hooks'
import {
getMe,
getOnboardingTourCategory,
getOnboardingTourStarted,
getOnboardingTourStep,
patchProps,
} from '../../../store/users'
import {IUser, UserConfigPatch, UserPropPrefix} from '../../../user'
import mutator from '../../../mutator'
import {getCurrentBoard} from '../../../store/boards'
import {getCurrentCard} from '../../../store/cards'
const AddPropertiesTourStep = (): JSX.Element | null => {
const title = (
@ -29,6 +42,53 @@ const AddPropertiesTourStep = (): JSX.Element | null => {
const punchout = useMeasurePunchouts(['.octo-propertyname.add-property'], [])
const me = useAppSelector<IUser|null>(getMe)
const dispatch = useAppDispatch()
const board = useAppSelector(getCurrentBoard)
const isOnboardingBoard = board ? board.title === OnboardingBoardTitle : false
const card = useAppSelector(getCurrentCard)
const isOnboardingCard = card ? card.title === OnboardingCardTitle : false
const onboardingTourStarted = useAppSelector(getOnboardingTourStarted)
const onboardingTourCategory = useAppSelector(getOnboardingTourCategory)
const onboardingTourStep = useAppSelector(getOnboardingTourStep)
// start the card tour if onboarding card is opened up
// and the user is still on the base tour
useEffect(() => {
async function task() {
if (!me || !card) {
return
}
const should = card.id &&
isOnboardingBoard &&
isOnboardingCard &&
onboardingTourStarted &&
onboardingTourCategory === TOUR_BASE &&
onboardingTourStep === BaseTourSteps.OPEN_A_CARD.toString()
if (!should) {
return
}
const patch: UserConfigPatch = {}
patch.updatedFields = {}
patch.updatedFields[UserPropPrefix + 'tourCategory'] = TOUR_CARD
patch.updatedFields[UserPropPrefix + 'onboardingTourStep'] = CardTourSteps.ADD_PROPERTIES.toString()
const updatedProps = await mutator.patchUserConfig(me.id, patch)
if (updatedProps) {
dispatch(patchProps(updatedProps))
}
}
// this hack is needed to allow performing async task in useEffect
task()
}, [card])
return (
<TourTipRenderer
key='AddPropertiesTourStep'

View file

@ -4,10 +4,7 @@
align-items: center;
justify-content: center;
margin-left: auto;
&-clickable {
cursor: pointer;
}
cursor: pointer;
&,
&::before,