Skip to content

Commit 9cd53c3

Browse files
authored
Merge pull request #385 from RahulBojji/rahulbojji/messagebaryamlchanges
Fluent Message bar release changes
2 parents bfaf24e + a31432b commit 9cd53c3

File tree

10 files changed

+1351
-1233
lines changed

10 files changed

+1351
-1233
lines changed

.github/workflows/create-release.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ jobs:
5757
`${process.env.GITHUB_WORKSPACE}/DonutChart/DonutChart`,
5858
`${process.env.GITHUB_WORKSPACE}/Elevation/Elevation`,
5959
`${process.env.GITHUB_WORKSPACE}/Facepile/Facepile`,
60+
`${process.env.GITHUB_WORKSPACE}/FluentMessageBar/FluentMessageBar`,
6061
`${process.env.GITHUB_WORKSPACE}/GaugeChart/GaugeChart`,
6162
`${process.env.GITHUB_WORKSPACE}/HorizontalBarChart/HorizontalBarChart`,
6263
`${process.env.GITHUB_WORKSPACE}/Icon/Icon`,
@@ -143,6 +144,12 @@ jobs:
143144
npm install
144145
npm ci
145146
147+
- name: Install Dependencies in FluentMessageBar
148+
run: |
149+
cd ./FluentMessageBar
150+
npm install
151+
npm ci
152+
146153
- name: Install Dependencies in GaugeChart
147154
run: |
148155
cd ./GaugeChart

.github/workflows/pr_validate_all.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ jobs:
2222
- "./DonutChart"
2323
- "./Elevation"
2424
- "./Facepile"
25+
- "./FluentMessageBar"
2526
- "./GaugeChart"
2627
- "./HorizontalBarChart"
2728
- "./Icon"

FluentMessageBar/.eslintrc.json

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,14 @@
2626
"@typescript-eslint",
2727
"sonarjs"
2828
],
29-
"ignorePatterns": ["**/generated/*.ts"],
29+
"ignorePatterns": [
30+
"**/generated/*.ts"
31+
],
3032
"rules": {
3133
"indent": [
3234
"error",
3335
4
3436
],
35-
"linebreak-style": [
36-
"error",
37-
"windows"
38-
],
3937
"quotes": [
4038
"error",
4139
"single"

FluentMessageBar/FluentMessageBar/ControlManifest.Input.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<property name="URL" display-name-key="URL_Key" description-key="link that appears in the message bar." of-type="SingleLine.Text" usage="input" required="false" />
1919
<property name="AutoHeight" display-name-key="Messagebar_AutoHeight_Display_Key" description-key="Messagebar_AutoHeight_Display_Key" usage="output" of-type="Whole.None" />
2020
<property name="HideDismiss" display-name-key="Messagebar_HideDismiss_Display_Key" of-type="TwoOptions" usage="input" required="true" default-value="false" />
21-
<common-property name="Width" default-value="500" />
21+
<common-property name="Width" default-value="350" />
2222
<common-property name="Height" default-value="55" pfx-default-value="Self.AutoHeight" />
2323
<!-- -->
2424
<data-set name="Items" display-name-key="Messagebar_Toolbar_Items_Display_Key" description-key="Messagebar_Toolbar_Items_Desc_Key" pfx-default-value="Table(&#xD;&#xA; {ItemKey: &quot;mail&quot;, ItemDisplayName: &quot;Contact&quot;, ItemIconName: &quot;Mail&quot;, ItemAppearance: &quot;&quot;, ItemIconStyle: &quot;Regular&quot;, ItemTooltip: &quot;Send mail&quot;, ItemVisible: true, ItemDisabled: false},{ItemKey: &quot;chat&quot;, ItemDisplayName: &quot;Chat&quot;, ItemIconName: &quot;Chat&quot;, ItemAppearance: &quot;&quot;, ItemIconStyle: &quot;Regular&quot;, ItemTooltip: &quot;Chat&quot;})">

FluentMessageBar/FluentMessageBar/_tests_/messagebar-lifecyle.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { FluentMessageBar } from '..';
33
import { MockContext, MockState } from '../__mocks__/mock-context';
44
import { MockDataSet, MockEntityRecord } from '../__mocks__/mock-datasets';
55
import { getMockParameters } from '../__mocks__/mock-parameters';
6-
import { IInputs, IOutputs } from '../generated/ManifestTypes';
6+
import { IInputs } from '../generated/ManifestTypes';
77
import { ItemColumns } from '../ManifestConstant';
88

99
describe('FluentMessageBar', () => {

FluentMessageBar/FluentMessageBar/components/Toolbar/ToolbarComponent.tsx

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,24 @@ export const ToolbarComponent = React.memo((props: CustomToolbarProps) => {
2727
},
2828
};
2929

30-
return (
31-
<Toolbar aria-label={ariaLabel} style={{ gap: 'var(--spacingHorizontalM)', padding: 0 }}>
32-
<ToolbarButton {...buttonProps} className={styles.content}>
33-
<span style={{ display: 'flex', alignItems: 'center', gap: 'var(--spacingHorizontalSNudge)' }}>
34-
{iconToRender}
35-
{item.name}
36-
</span>
37-
</ToolbarButton>
38-
</Toolbar>
30+
const toolbarButton = (<Toolbar aria-label={ariaLabel} style={{ gap: 'var(--spacingHorizontalM)', padding: 0 }}>
31+
<ToolbarButton {...buttonProps} className={styles.content}>
32+
<span style={{ display: 'flex', alignItems: 'center', gap: 'var(--spacingHorizontalSNudge)' }}>
33+
{iconToRender}
34+
{item.name}
35+
</span>
36+
</ToolbarButton>
37+
</Toolbar>);
38+
39+
return (<>
40+
{item.tooltip ? (
41+
<Tooltip content={item.tooltip} relationship="description" withArrow>
42+
{toolbarButton}
43+
</Tooltip>
44+
) : (
45+
toolbarButton
46+
)
47+
}</>
3948
);
4049
}
4150

@@ -67,7 +76,7 @@ export const ToolbarComponent = React.memo((props: CustomToolbarProps) => {
6776
},
6877
};
6978

70-
const toolbarButton = (
79+
const toolbarButtonProps = (
7180
<ToolbarButton {...buttonProps} className={styles.content}>
7281
<span
7382
style={{
@@ -87,10 +96,10 @@ export const ToolbarComponent = React.memo((props: CustomToolbarProps) => {
8796
<OverflowItem key={item.key} id={item.key}>
8897
{item.tooltip ? (
8998
<Tooltip content={item.tooltip} relationship="description" withArrow>
90-
{toolbarButton}
99+
{toolbarButtonProps}
91100
</Tooltip>
92101
) : (
93-
toolbarButton
102+
toolbarButtonProps
94103
)}
95104
</OverflowItem>
96105
);

0 commit comments

Comments
 (0)