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

feat: add quick messaging to fluent person-card #1958

Merged
merged 42 commits into from
Mar 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
f7efa1a
update: add quick message field to person-card overview
Mnickii Nov 15, 2022
37548e5
update: use Chat graph entity to create chat and send chat message
Mnickii Nov 17, 2022
e7ebd89
update: add chat permissions and mgt-person-card to developer test page
Mnickii Nov 17, 2022
01d5252
update: remove overview section double line
Mnickii Nov 17, 2022
4148c91
Update packages/mgt-components/src/components/mgt-person-card/mgt-per…
Mnickii Nov 17, 2022
1154836
Update packages/mgt-components/src/components/mgt-person-card/mgt-per…
Mnickii Nov 17, 2022
421c970
Update packages/mgt-components/src/components/mgt-person-card/mgt-per…
Mnickii Nov 22, 2022
60c6f4e
update: update box placeholder, fix build
Mnickii Dec 5, 2022
6c93b66
update: break down sections into own components
Mnickii Dec 8, 2022
018a89d
update: break down sections into own components-edit index
Mnickii Dec 8, 2022
8dc0736
update: fix build
Mnickii Dec 8, 2022
f31ce09
update: fix clear chatbox on sent message
Mnickii Dec 16, 2022
2830790
update: uncomment base section styles
Mnickii Dec 16, 2022
839ab7e
update: pull in latest changes from next/fluentui, fix file section s…
Mnickii Feb 1, 2023
df4a8f9
refactor: change CSS props for smoother RTL
musale Feb 3, 2023
52bac1c
Merge branch 'next/fluentui' into mnickii/person-card-fluent-quick-me…
Mnickii Feb 9, 2023
0ac0b4e
fix: set the license text on the files
musale Feb 10, 2023
9d7e854
fix: use set-var to set the correct theme colors of border-top
musale Feb 10, 2023
6603790
fix: add new shared variables and update existing ones
musale Feb 10, 2023
e33af1c
fix: add theme file for profile component
musale Feb 10, 2023
d02ac3d
fix: add a them file for the organization component
musale Feb 10, 2023
2759d8c
fix: add a theme file for the contact component
musale Feb 10, 2023
26c2f2b
fix: add title for the person card file component
musale Feb 10, 2023
90e5ce6
fix: add a theme for person with correct tokens
musale Feb 10, 2023
1bea516
fix: remove unused CSS tokens, add new CSS tokens
musale Feb 10, 2023
8575912
fix: use latest yarn file
musale Feb 10, 2023
fa154a3
Merge branch 'next/fluentui' into mnickii/person-card-fluent-quick-me…
musale Feb 10, 2023
b06f731
update: fix File section title
Mnickii Feb 13, 2023
5880f1d
remove Base Card Section for file-list
Mnickii Feb 15, 2023
76ab4bb
Merge branch 'next/fluentui' of https://github.com/microsoftgraph/mic…
Mnickii Feb 15, 2023
d9ec6ac
fix file-list overview section
Mnickii Feb 15, 2023
1e32432
Merge branch 'next/fluentui' into mnickii/person-card-fluent-quick-me…
Mnickii Feb 16, 2023
c3314e3
Update: Add confirmation icon
Mnickii Feb 17, 2023
6c4154e
fix keyboard enter
Mnickii Feb 17, 2023
0562650
Merge branch 'mnickii/person-card-fluent-quick-message' of https://gi…
Mnickii Feb 17, 2023
f79fdf4
Update packages/mgt-components/src/components/mgt-person-card/mgt-per…
Mnickii Mar 1, 2023
dc9cc9e
Update packages/mgt-components/src/components/mgt-person-card/mgt-per…
Mnickii Mar 1, 2023
79d71cc
Merge branch 'next/fluentui' into mnickii/person-card-fluent-quick-me…
Mnickii Mar 2, 2023
2cf0fd2
update: replace send message with fluent-button
Mnickii Mar 2, 2023
3e9354c
update: remove fluent-button disabled styles
Mnickii Mar 2, 2023
104ac1f
improving message send button disable flow
gavinbarron Mar 2, 2023
3e05dfe
fixing indents in html blocks
gavinbarron Mar 2, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import { MgtTemplatedComponent, mgtHtml } from '@microsoft/mgt-element';
import { html, TemplateResult } from 'lit';
import { property } from 'lit/decorators.js';

import { IDynamicPerson } from '../../../graph/types';
import { MgtPersonCard } from '../mgt-person-card';
import { IDynamicPerson } from '../graph/types';
import { MgtPersonCard } from './mgt-person-card/mgt-person-card';

import '../../sub-components/mgt-spinner/mgt-spinner';
import './sub-components/mgt-spinner/mgt-spinner';

/**
* A base class for building person card subsections.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
* -------------------------------------------------------------------------------------------
*/

@import '../../../styles/shared-styles.scss';
@import '../../../../../../node_modules/office-ui-fabric-core/dist/sass/References';
@import '../styles/shared-styles.scss';
@import '../../../../node_modules/office-ui-fabric-core/dist/sass/References';

$font-color: var(--font-color, #323130);

Expand Down
9 changes: 9 additions & 0 deletions packages/mgt-components/src/components/components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ import './mgt-person/mgt-person-types';
import './mgt-tasks/mgt-tasks';
import './mgt-teams-channel-picker/mgt-teams-channel-picker';
import './mgt-todo/mgt-todo';
import './mgt-contact/mgt-contact';
import './mgt-messages/mgt-messages';
import './mgt-organization/mgt-organization';
import './mgt-profile/mgt-profile';
import './mgt-theme-toggle/mgt-theme-toggle';

export * from './mgt-agenda/mgt-agenda';
Expand All @@ -35,4 +39,9 @@ export * from './mgt-person/mgt-person-types';
export * from './mgt-tasks/mgt-tasks';
export * from './mgt-teams-channel-picker/mgt-teams-channel-picker';
export * from './mgt-todo/mgt-todo';
export * from './mgt-contact/mgt-contact';
export * from './mgt-contact/mgt-contact';
export * from './mgt-messages/mgt-messages';
export * from './mgt-organization/mgt-organization';
export * from './mgt-profile/mgt-profile';
export * from './mgt-theme-toggle/mgt-theme-toggle';
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,9 @@
*/

@import '../base-person-card-section.scss';
@import '../../../../styles/shared-styles.scss';
@import '../../../../styles/shared-sass-variables.scss';

$person-card-contact-link-color: var(--person-card-contact-link-color, #{$commblue_primary});
$person-card-contact-link-hover-color: var(--person-card-contact-link-hover-color, #004578);
@import '../../styles/shared-styles.scss';
@import '../../styles/shared-sass-variables.scss';
@import './mgt-contact.theme.scss';

:host {
position: relative;
Expand Down Expand Up @@ -60,7 +58,7 @@ $person-card-contact-link-hover-color: var(--person-card-contact-link-hover-colo
line-height: 19px;

.part__link {
color: $person-card-contact-link-color;
color: set-var(person-card-contact-link-color, $theme-default, $contact-theme);
font-family: $font-family;
font-size: 14px;
cursor: pointer;
Expand All @@ -71,7 +69,7 @@ $person-card-contact-link-hover-color: var(--person-card-contact-link-hover-colo
display: inline-block;

&:hover {
color: $person-card-contact-link-hover-color;
color: set-var(person-card-contact-link-hover-color, $theme-default, $contact-theme);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/

@import '../../styles/shared-sass-variables.scss';

$contact-theme: (
person-card-contact-link-color: (
_var: --person-card-contact-link-color,
light: $link__color--light,
dark: $link__color--dark
),
person-card-contact-link-hover-color: (
_var: --person-card-contact-link-hover-color,
light: $link__color__hover--light,
dark: $link__color__hover--dark
)
);

@include create-themes($contact-theme);
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import { html, TemplateResult } from 'lit';
import { TeamsHelper, customElement } from '@microsoft/mgt-element';
import { classMap } from 'lit/directives/class-map.js';

import { getEmailFromGraphEntity } from '../../../../graph/graph.people';
import { getEmailFromGraphEntity } from '../../graph/graph.people';
import { BasePersonCardSection } from '../BasePersonCardSection';
import { styles } from './mgt-person-card-contact-css';
import { getSvg, SvgIcon } from '../../../../utils/SvgHelper';
import { styles } from './mgt-contact-css';
import { getSvg, SvgIcon } from '../../utils/SvgHelper';
import { strings } from './strings';

/**
Expand All @@ -40,12 +40,12 @@ type Protocol = 'mailto:' | 'tel:';
* The contact details subsection of the person card
*
* @export
* @class MgtPersonCardProfile
* @class MgtContact
* @extends {MgtTemplatedComponent}
*/
@customElement('person-card-contact')
// @customElement('mgt-person-card-contact')
export class MgtPersonCardContact extends BasePersonCardSection {
@customElement('contact')
// @customElement('mgt-contact')
export class MgtContact extends BasePersonCardSection {
/**
* Array of styles to apply to the element. The styles should be defined
* using the `css` tag function.
Expand Down Expand Up @@ -143,7 +143,7 @@ export class MgtPersonCardContact extends BasePersonCardSection {
*
* @readonly
* @type {string}
* @memberof MgtPersonCardContact
* @memberof MgtContact
*/
public get displayName(): string {
return this.strings.contactSectionTitle;
Expand All @@ -155,7 +155,7 @@ export class MgtPersonCardContact extends BasePersonCardSection {
* Render the icon for display in the navigation ribbon.
*
* @returns {TemplateResult}
* @memberof MgtPersonCardContact
* @memberof MgtContact
*/
public renderIcon(): TemplateResult {
return getSvg(SvgIcon.Contact);
Expand All @@ -165,7 +165,7 @@ export class MgtPersonCardContact extends BasePersonCardSection {
* Reset any state in the section
*
* @protected
* @memberof MgtPersonCardContact
* @memberof MgtContact
*/
public clearState() {
super.clearState();
Expand All @@ -178,7 +178,7 @@ export class MgtPersonCardContact extends BasePersonCardSection {
* Render the compact view
*
* @returns {TemplateResult}
* @memberof MgtPersonCardContact
* @memberof MgtContact
*/
protected renderCompactView(): TemplateResult {
let contentTemplate: TemplateResult;
Expand Down Expand Up @@ -214,7 +214,7 @@ export class MgtPersonCardContact extends BasePersonCardSection {
*
* @protected
* @returns {TemplateResult}
* @memberof MgtPersonCardContact
* @memberof MgtContact
*/
protected renderFullView(): TemplateResult {
let contentTemplate: TemplateResult;
Expand All @@ -241,7 +241,7 @@ export class MgtPersonCardContact extends BasePersonCardSection {
* @protected
* @param {IContactPart} part
* @returns {TemplateResult}
* @memberof MgtPersonCardContact
* @memberof MgtContact
*/
protected renderContactPart(part: IContactPart): TemplateResult {
let isPhone = false;
Expand Down Expand Up @@ -270,9 +270,12 @@ export class MgtPersonCardContact extends BasePersonCardSection {
<div class="part__title">${part.title}</div>
<div class="part__value" title=${part.title}>${valueTemplate}</div>
</div>
<div class="part__copy" aria-role="button" aria-label=${this.strings.copyToClipboardButton} title=${
this.strings.copyToClipboardButton
}>
<div
class="part__copy"
aria-role="button"
aria-label=${this.strings.copyToClipboardButton}
title=${this.strings.copyToClipboardButton}
>
${getSvg(SvgIcon.Copy)}
</div>
</div>
Expand All @@ -283,7 +286,7 @@ export class MgtPersonCardContact extends BasePersonCardSection {
* Handle the click event for contact parts
*
* @protected
* @memberof MgtPersonCardContact
* @memberof MgtContact
*/
protected handlePartClick(e: MouseEvent, value: string): void {
if (value) {
Expand All @@ -303,7 +306,7 @@ export class MgtPersonCardContact extends BasePersonCardSection {
* Send a chat message to the user
*
* @protected
* @memberof MgtPersonCardContact
* @memberof MgtContact
*/
protected sendChat(upn: string): void {
if (!upn) {
Expand All @@ -329,7 +332,7 @@ export class MgtPersonCardContact extends BasePersonCardSection {
* Send an email to the user
*
* @protected
* @memberof MgtPersonCardContact
* @memberof MgtContact
*/
protected sendEmail(email: string): void {
this.sendLink('mailto:', email);
Expand All @@ -339,7 +342,7 @@ export class MgtPersonCardContact extends BasePersonCardSection {
* Send a call to the user
*
* @protected
* @memberof MgtPersonCardContact
* @memberof MgtContact
*/
protected sendCall = (phone: string): void => {
this.sendLink('tel:', phone);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,18 @@ $progress-ring-size: var(--progress-ring-size, 24px);
:host {
font-family: $font-family;
font-size: $font-size;

.title {
font-size: 14px;
font-weight: 600;
color: set-var(title__color__subtitle, $theme-default, $common);
padding: 20px 0 12px;
line-height: 19px;
}
}

:host .root {
padding-inline-start: 20px;
}

:host .file-list-wrapper {
Expand All @@ -43,6 +55,12 @@ $progress-ring-size: var(--progress-ring-size, 24px);
display: flex;
flex-direction: column;
border-radius: 8px;
.title {
font-size: 14px;
font-weight: 600;
color: set-var(title__color__subtitle, $theme-default, $common);
margin: 0 20px -15px 20px;
}

.file-list {
display: flex;
Expand Down
Loading