Skip to content

Commit 4863995

Browse files
authored
Merge pull request #2213 from microsoftgraph/main-to-next-1
chore: merge main to next/fluentui
2 parents 87e6c2f + 8334f41 commit 4863995

File tree

16 files changed

+221
-142
lines changed

16 files changed

+221
-142
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @microsoftgraph/microsoft-graph-toolkit-write

CODE_OF_CONDUCT.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Microsoft Open Source Code of Conduct
2+
3+
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
4+
5+
Resources:
6+
7+
- [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/)
8+
- [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)
9+
- Contact [[email protected]](mailto:[email protected]) with questions or concerns

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"bootstrap": "lerna bootstrap --useWorkspaces",
4141
"clean": "lerna run --parallel --stream --scope @microsoft/* clean",
4242
"link": "lerna link --force-local",
43-
"lint": "eslint -c .eslintrc.js 'packages/*/src/**/*.ts'",
43+
"lint": "eslint -c .eslintrc.js --quiet 'packages/*/src/**/*.ts'",
4444
"pack": "shx rm -rf artifacts/*.tgz && lerna exec --stream --scope @microsoft/* -- npm pack",
4545
"prepare": "lerna bootstrap --force-local",
4646
"sass": "lerna run sass --scope @microsoft/*",

packages/mgt-components/src/components/mgt-people-picker/mgt-people-picker.ts

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -926,27 +926,31 @@ export class MgtPeoplePicker extends MgtTemplatedComponent {
926926
*/
927927
protected renderSearchResults(people: IDynamicPerson[]) {
928928
const filteredPeople = people.filter(person => person.id);
929-
930929
return html`
931930
<ul
932931
id="suggestions-list"
933932
class="searched-people-list"
934933
role="listbox"
935-
aria-label="${this.strings.suggestedContacts}">
936-
${repeat(
937-
filteredPeople,
938-
person => person.id,
939-
person => html`
940-
<li
941-
role="option"
942-
id="${person.id}"
943-
aria-label=" ${this.strings.suggestedContact} ${person.displayName}"
944-
class="searched-people-list-result"
945-
@click="${() => this.handleSuggestionClick(person)}">
946-
${this.renderPersonResult(person)}
947-
</li>
948-
`
949-
)}
934+
aria-live="polite"
935+
>
936+
${repeat(
937+
filteredPeople,
938+
person => person.id,
939+
person => {
940+
const lineTwo = person.jobTitle || (person as User).mail;
941+
const ariaLabel = `${this.strings.suggestedContact} ${person.displayName} ${lineTwo ?? ''}`;
942+
return html`
943+
<li
944+
id="${person.id}"
945+
aria-label="${ariaLabel}"
946+
class="searched-people-list-result"
947+
role="option"
948+
@click="${e => this.handleSuggestionClick(person)}">
949+
${this.renderPersonResult(person)}
950+
</li>
951+
`;
952+
}
953+
)}
950954
</ul>
951955
`;
952956
}
@@ -1753,7 +1757,8 @@ export class MgtPeoplePicker extends MgtTemplatedComponent {
17531757
if (this._arrowSelectionCount === -1) {
17541758
this._arrowSelectionCount = 0;
17551759
} else {
1756-
this._arrowSelectionCount = (this._arrowSelectionCount + 1) % peopleList.children.length;
1760+
this._arrowSelectionCount =
1761+
(this._arrowSelectionCount + 1 + peopleList.children.length) % peopleList.children.length;
17571762
}
17581763
}
17591764
}

packages/mgt-components/src/components/mgt-person/mgt-person.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ $person-line4-text-line-height: var(--person-line4-text-line-height, 16px);
113113
border: $person-avatar-border;
114114
border-radius: $person-avatar-border-radius;
115115
margin-block-start: $person-avatar-top-spacing;
116-
position: absolute;
117116
}
118117

119118
.initials,

packages/mgt-components/src/components/mgt-person/mgt-person.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,26 @@
55
* -------------------------------------------------------------------------------------------
66
*/
77

8+
import { MgtTemplatedComponent, ProviderState, Providers, customElement, mgtHtml } from '@microsoft/mgt-element';
89
import { Contact, Presence } from '@microsoft/microsoft-graph-types';
910
import { html, TemplateResult } from 'lit';
1011
import { property, state } from 'lit/decorators.js';
1112
import { classMap } from 'lit/directives/class-map.js';
1213
import { findPeople, getEmailFromGraphEntity } from '../../graph/graph.people';
1314
import { getGroupImage, getPersonImage } from '../../graph/graph.photos';
1415
import { getUserPresence } from '../../graph/graph.presence';
15-
import { getUserWithPhoto } from '../../graph/graph.userWithPhoto';
1616
import { findUsers, getMe, getUser } from '../../graph/graph.user';
17+
import { getUserWithPhoto } from '../../graph/graph.userWithPhoto';
1718
import { AvatarSize, IDynamicPerson, ViewType } from '../../graph/types';
18-
import { Providers, ProviderState, MgtTemplatedComponent, mgtHtml, customElement } from '@microsoft/mgt-element';
1919
import '../../styles/style-helper';
20-
import { getSvg, SvgIcon } from '../../utils/SvgHelper';
20+
import { SvgIcon, getSvg } from '../../utils/SvgHelper';
2121
import { MgtPersonCard } from '../mgt-person-card/mgt-person-card';
2222
import '../sub-components/mgt-flyout/mgt-flyout';
2323
import { MgtFlyout } from '../sub-components/mgt-flyout/mgt-flyout';
2424
import { PersonCardInteraction } from './../PersonCardInteraction';
2525
import { styles } from './mgt-person-css';
26+
import { MgtPersonConfig, PersonViewType, avatarType } from './mgt-person-types';
2627
import { strings } from './strings';
27-
import { PersonViewType, MgtPersonConfig, avatarType } from './mgt-person-types';
2828

2929
export { PersonCardInteraction } from '../PersonCardInteraction';
3030

packages/mgt-components/src/components/mgt-picker/mgt-picker.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,8 @@ export class MgtPicker extends MgtTemplatedComponent {
195195
if (this.isLoadingState && !this.response) {
196196
return this.renderTemplate('loading', null);
197197
} else if (this.hasTemplate('error')) {
198-
return this.renderTemplate('error', this.error ? this.error : null, 'error');
198+
const error = this.error ? (this.error as Error) : null;
199+
return this.renderTemplate('error', { error }, 'error');
199200
} else if (this.hasTemplate('no-data')) {
200201
return this.renderTemplate('no-data', null);
201202
}

packages/mgt-components/src/components/mgt-search-box/mgt-search-box.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* -------------------------------------------------------------------------------------------
66
*/
77

8-
import { html, TemplateResult } from 'lit';
8+
import { CSSResult, html, TemplateResult } from 'lit';
99
import { property } from 'lit/decorators.js';
1010
import { customElement, MgtBaseComponent } from '@microsoft/mgt-element';
1111
import { fluentSearch } from '@fluentui/web-components';

0 commit comments

Comments
 (0)