Skip to content

Commit df894e6

Browse files
emlynmacvhuseinova-msftpalattergithub-actions[bot]Leah-Xia-Microsoft
authored
Remove Fluent NorthStar (#3578)
* Remove Fluent NorthStar * Replace Chat components with fluent 9 and fluent-contrib-chat * Update styling for various bug fixes * Update storybook and documentation --------- Co-authored-by: vhuseinova-msft <98852890+vhuseinova-msft@users.noreply.github.com> Co-authored-by: Patrick Latter <73612854+palatter@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Leah Xia <107075081+Leah-Xia-Microsoft@users.noreply.github.com>
1 parent 5903018 commit df894e6

764 files changed

Lines changed: 6343 additions & 3675 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
name: Update Chat snapshots
2+
3+
on:
4+
pull_request:
5+
types: [labeled]
6+
7+
# cancel workflow when a newer version of the workflow is triggered on the same github ref
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
precondition:
14+
name: Determine if this workflow is applicable
15+
runs-on: ubuntu-latest
16+
outputs:
17+
met: ${{ steps.label.outputs.found || steps.workflow_dispatch.outputs.found }}
18+
steps:
19+
- uses: actions/checkout@v3
20+
with:
21+
fetch-depth: 0
22+
# Use a machine account when checking out. This is to workaround the issue where GitHub
23+
# actions, when using the default account, cannot trigger other actions.
24+
# This machine account is only for this PAT, pwd was created and thrown away
25+
# If an update is needed, create a new account, add access to the repo and generate a new PAT
26+
token: ${{ secrets.MACHINE_ACCOUNT_PAT }}
27+
- name: Found required label
28+
id: label
29+
if: ${{ github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'update_chat_snapshots') }}
30+
env:
31+
# Required for running `gh`.
32+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
run: |
34+
echo "found=true" >> $GITHUB_OUTPUT
35+
gh pr edit ${{ github.event.number }} --remove-label update_chat_snapshots
36+
37+
get_matrix:
38+
name: Set CI flavors
39+
needs: precondition
40+
if: needs.precondition.outputs.met
41+
runs-on: ubuntu-latest
42+
outputs:
43+
matrix: ${{ steps.get-matrix.outputs.matrix }}
44+
steps:
45+
- uses: actions/checkout@v3
46+
with:
47+
fetch-depth: 0
48+
- name: Use Node.js v20.x
49+
uses: actions/setup-node@v3
50+
with:
51+
node-version: '20.x'
52+
- id: get-matrix
53+
run: echo "matrix=$(node ./common/scripts/workflow-read-matrix.mjs)" >> $GITHUB_OUTPUT
54+
55+
chat_composite:
56+
needs: [precondition, get_matrix]
57+
if: needs.precondition.outputs.met
58+
name: Update packages/react-composites ChatComposite browser test snapshots
59+
runs-on: ubuntu-latest
60+
strategy:
61+
matrix: ${{ fromJSON(needs.get_matrix.outputs.matrix) }}
62+
steps:
63+
- uses: actions/checkout@v3
64+
with:
65+
fetch-depth: 0
66+
# Use a machine account when checking out. This is to workaround the issue where GitHub
67+
# actions, when using the default account, cannot trigger other actions.
68+
# This machine account is only for this PAT, pwd was created and thrown away
69+
# If an update is needed, create a new account, add access to the repo and generate a new PAT
70+
token: ${{ secrets.MACHINE_ACCOUNT_PAT }}
71+
- name: Checkout branch if on a PR
72+
if: ${{ github.event_name != 'workflow_dispatch' }}
73+
# On the `pull_request` event, actions/checkout@v3 leaves the local checkout in a detached head state.
74+
# Explicitly checkout the target branch so we can push later.
75+
run: git checkout ${{ github.event.pull_request.head.ref }}
76+
- name: Setup bot git information
77+
# User id of github actions bot. See https://api.github.com/users/better-informatics%5Bbot%5D
78+
run: |
79+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
80+
git config user.name "github-actions[bot]"
81+
- name: Use Node.js v20.x
82+
uses: actions/setup-node@v3
83+
with:
84+
node-version: '20.x'
85+
- name: Install rush
86+
run: npm install -g @microsoft/rush@5.100.1
87+
- name: Install dependencies
88+
run: rush install --max-install-attempts 3
89+
- name: Switch flavor for build
90+
if: ${{ matrix.flavor != 'beta' }}
91+
run: rush switch-flavor:${{ matrix.flavor }}
92+
- name: Build packages/react-composites browser tests
93+
working-directory: ./packages/react-composites
94+
run: rushx build:e2e:chat
95+
- name: Install packlets used by browser tests
96+
run: |
97+
cd packages/react-composites
98+
rush build -t .
99+
- name: Update chat snapshot
100+
id: update-chat-snapshots
101+
run: rushx test:e2e:chat:update
102+
working-directory: ./packages/react-composites
103+
env:
104+
CONNECTION_STRING: ${{ secrets.CONNECTION_STRING }}
105+
- name: Upload snapshot diff
106+
if: ${{ always() && steps.update-chat-snapshots.outcome == 'failure' }}
107+
uses: actions/upload-artifact@v3
108+
with:
109+
name: snapshots
110+
path: packages/react-composites/test-results
111+
# Check if files have changed
112+
# More information see: https://stackoverflow.com/questions/3878624/how-do-i-programmatically-determine-if-there-are-uncommitted-changes
113+
- name: Check for snapshot changes
114+
id: changescheck
115+
run: |
116+
if [[ -z $(git status packages -s) ]]
117+
then
118+
echo "hasChanged=false" >> $GITHUB_OUTPUT
119+
else
120+
echo "hasChanged=true" >> $GITHUB_OUTPUT
121+
fi
122+
- name: Push new snapshots, if any
123+
if: ${{ steps.changescheck.outputs.hasChanged == 'true' }}
124+
# Before pushing changes to origin, merge any intervening changes on the upstream branch.
125+
# This allows multiple snapshot update jobs in this action to run concurrently.
126+
# - The only files updated locally are UI snapshots
127+
# - Each job is responsible for a unique set of UI snapshots
128+
# Thus we do not expect any merge conflicts due to the concurrent jobs from this workflows.
129+
#
130+
# If the UI snapshots are updated in the upstream branch while this job was running
131+
# (e.g., due to a merge from the base_ref for a PR), this merge will fail, and the
132+
# workflow will have to be triggered again. This is the desired behavior because the workflow
133+
# should not silently overwrite updates to the target branch.
134+
run: |
135+
git add packages/react-composites/*.png
136+
git commit -m 'Update packages/react-composites ChatComposite browser test snapshots'
137+
git pull origin ${{ needs.get_target_branch.outputs.target }} --no-rebase --no-edit
138+
git push
139+
140+
push_updated_snapshots:
141+
needs: [chat_composite]
142+
if: needs.precondition.outputs.met
143+
name: Push all updated snapshots to branch
144+
runs-on: ubuntu-latest
145+
steps:
146+
- uses: actions/checkout@v3
147+
with:
148+
fetch-depth: 0
149+
# Use a machine account when checking out. This is to workaround the issue where GitHub
150+
# actions, when using the default account, cannot trigger other actions.
151+
# This machine account is only for this PAT, pwd was created and thrown away
152+
# If an update is needed, create a new account, add access to the repo and generate a new PAT
153+
token: ${{ secrets.MACHINE_ACCOUNT_PAT }}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"type": "none",
3+
"area": "improvement",
4+
"workstream": "FluentUI v9",
5+
"comment": "Fixed paddings",
6+
"packageName": "@azure/communication-react",
7+
"email": "98852890+vhuseinova-msft@users.noreply.github.com",
8+
"dependentChangeType": "none"
9+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"type": "none",
3+
"area": "improvement",
4+
"workstream": "FLuentUI v9",
5+
"comment": "Added styles and fixed custom rendering for messages",
6+
"packageName": "@azure/communication-react",
7+
"email": "98852890+vhuseinova-msft@users.noreply.github.com",
8+
"dependentChangeType": "none"
9+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"type": "patch",
3+
"area": "fix",
4+
"workstream": "Fluent UI Migration",
5+
"comment": "Prevent provider from being applied multiple times",
6+
"packageName": "@azure/communication-react",
7+
"email": "73612854+palatter@users.noreply.github.com",
8+
"dependentChangeType": "patch"
9+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"type": "none",
3+
"area": "fix",
4+
"workstream": "FluentUI v9",
5+
"comment": "Fixed issue with black border",
6+
"packageName": "@azure/communication-react",
7+
"email": "98852890+vhuseinova-msft@users.noreply.github.com",
8+
"dependentChangeType": "none"
9+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"type": "none",
3+
"area": "fix",
4+
"workstream": "FluentUI v9",
5+
"comment": "Updated Message Thread rendering logic",
6+
"packageName": "@azure/communication-react",
7+
"email": "98852890+vhuseinova-msft@users.noreply.github.com",
8+
"dependentChangeType": "none"
9+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"type": "none",
3+
"area": "fix",
4+
"workstream": "FluentUI v9",
5+
"comment": "Fixed rtl margins for messages without avatar",
6+
"packageName": "@azure/communication-react",
7+
"email": "98852890+vhuseinova-msft@users.noreply.github.com",
8+
"dependentChangeType": "none"
9+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"type": "none",
3+
"area": "fix",
4+
"workstream": "FluentUI v9",
5+
"comment": "Fixed some repetitions for narrator",
6+
"packageName": "@azure/communication-react",
7+
"email": "98852890+vhuseinova-msft@users.noreply.github.com",
8+
"dependentChangeType": "none"
9+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"type": "none",
3+
"area": "fix",
4+
"workstream": "FluentUI v9",
5+
"comment": "Fixed edit box hover/select styles",
6+
"packageName": "@azure/communication-react",
7+
"email": "98852890+vhuseinova-msft@users.noreply.github.com",
8+
"dependentChangeType": "none"
9+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"type": "patch",
3+
"area": "fix",
4+
"workstream": "Chat message default timestamp localization",
5+
"comment": "Enable localized default date/timestamp",
6+
"packageName": "@azure/communication-react",
7+
"email": "3941071+emlynmac@users.noreply.github.com",
8+
"dependentChangeType": "patch"
9+
}

0 commit comments

Comments
 (0)