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

Add space after mention #622

Merged
merged 3 commits into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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
Loading