Skip to content

Commit

Permalink
Merge pull request #622 from GetStream/add-space-after-mention
Browse files Browse the repository at this point in the history
Add space after mention
  • Loading branch information
szuperaz authored Jul 3, 2024
2 parents 25e4234 + 2b97101 commit 4e5581a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 21 deletions.
23 changes: 8 additions & 15 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ on:
branches:
- master
- beta
- angular-18
- v5
pull_request:
branches:
- master
- beta
- angular-18
- v5
jobs:
workflow:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -45,13 +45,6 @@ jobs:
- name: Unit tests
run: |
npm run test:ci
# - name: E2e tests
# env:
# STREAM_API_KEY: ${{ secrets.API_KEY }}
# STREAM_USER_ID: ${{ secrets.USER_ID }}
# STREAM_USER_TOKEN: ${{ secrets.USER_TOKEN }}
# run: |
# npm run e2e:ci
- name: Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -66,17 +59,17 @@ jobs:
STREAM_USER_ID: <dynamic user>
STREAM_CHANNELS_FILTER: '{"type": "messaging"}'
run: >
yarn vercel pull --yes --environment=${{ github.ref == 'refs/heads/master' && 'production' || 'preview' }} --token=${{ secrets.VERCEL_TOKEN }} &&
yarn vercel build ${{ github.ref == 'refs/heads/master' && '--prod' || '' }} --token=${{ secrets.VERCEL_TOKEN }} &&
yarn vercel deploy ${{ github.ref == 'refs/heads/master' && '--prod' || '' }} --prebuilt --token=${{ secrets.VERCEL_TOKEN }}
yarn vercel pull --yes --environment=${{ github.ref == 'refs/heads/v5' && 'production' || 'preview' }} --token=${{ secrets.VERCEL_TOKEN }} &&
yarn vercel build ${{ github.ref == 'refs/heads/v5' && '--prod' || '' }} --token=${{ secrets.VERCEL_TOKEN }} &&
yarn vercel deploy ${{ github.ref == 'refs/heads/v5' && '--prod' || '' }} --prebuilt --token=${{ secrets.VERCEL_TOKEN }}
- name: Copy docs from stream-chat-css
run: npm run ${{ (github.ref == 'refs/heads/beta' || contains(github.head_ref, 'beta')) && 'copy-css-docs:v5' || 'copy-css-docs' }}
run: npm run ${{ (github.ref == 'refs/heads/v5' || contains(github.head_ref, 'v5')) && 'copy-css-docs:v5' || 'copy-css-docs' }}
- name: Generate docs
run: |
npm run ${{ (github.ref == 'refs/heads/beta' || contains(github.head_ref, 'beta')) && 'generate-docs:v5' || 'generate-docs' }}
npm run ${{ (github.ref == 'refs/heads/v5' || contains(github.head_ref, 'v5')) && 'generate-docs:v5' || 'generate-docs' }}
- name: Push to docusaurus
uses: GetStream/push-stream-chat-docusaurus-action@main
with:
target-branch: ${{ (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/beta') && 'production' || 'staging' }}
target-branch: ${{ (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/v5') && 'production' || 'staging' }}
env:
DOCUSAURUS_GH_TOKEN: ${{ secrets.DOCUSAURUS_GH_TOKEN }}
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ describe('AutocompleteTextareaComponent', () => {
},
'@'
)
).toBe('@Jack');
).toBe('@Jack ');
});

it('should update mentioned users if sent is triggered', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,11 +221,7 @@ export class AutocompleteTextareaComponent
this.mentionedUsers.push((item.user ? item.user : item) as UserResponse);
this.userMentions.next([...this.mentionedUsers]);
}
return (
triggerChar +
item.autocompleteLabel +
(triggerChar === this.commandTriggerChar ? ' ' : '')
);
return triggerChar + item.autocompleteLabel + ' ';
}

autcompleteSearchTermChanged(searchTerm: string) {
Expand Down

0 comments on commit 4e5581a

Please sign in to comment.