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

feat(chat): add support for custom message template #2750

Merged
merged 50 commits into from
Jun 15, 2021
Merged

feat(chat): add support for custom message template #2750

merged 50 commits into from
Jun 15, 2021

Conversation

andreipadolin
Copy link
Contributor

@andreipadolin andreipadolin commented May 24, 2021

Please read and mark the following check list before creating a pull request:

Short description of what this resolves:

Fixes #2134. Fixes #2279.
Update for #2413

BREAKING CHANGE:
NbChatMessageComponent constructor now has a second parameter (NbCustomMessageService).

@codecov
Copy link

codecov bot commented May 24, 2021

Codecov Report

Merging #2750 (91bcfbf) into master (002adc2) will decrease coverage by 6.18%.
The diff coverage is 75.94%.

❗ Current head 91bcfbf differs from pull request most recent head f082f2d. Consider uploading reports for the commit f082f2d to get more accurate results

@@            Coverage Diff             @@
##           master    #2750      +/-   ##
==========================================
- Coverage   84.57%   78.39%   -6.19%     
==========================================
  Files         235      265      +30     
  Lines        8059     8265     +206     
  Branches      710      899     +189     
==========================================
- Hits         6816     6479     -337     
- Misses       1023     1503     +480     
- Partials      220      283      +63     
Impacted Files Coverage Δ
src/framework/auth/components/auth.component.ts 28.57% <0.00%> (-15.88%) ⬇️
...framework/auth/strategies/auth-strategy-options.ts 100.00% <ø> (ø)
.../auth/strategies/oauth2/oauth2-strategy.options.ts 100.00% <ø> (ø)
...ramework/auth/strategies/oauth2/oauth2-strategy.ts 83.57% <ø> (-1.10%) ⬇️
...work/auth/strategies/password/password-strategy.ts 97.59% <ø> (-0.24%) ⬇️
...ponents/accordion/accordion-item-body.component.ts 46.15% <0.00%> (-12.67%) ⬇️
...nents/accordion/accordion-item-header.component.ts 40.00% <0.00%> (-8.28%) ⬇️
...e/components/accordion/accordion-item.component.ts 28.57% <0.00%> (-9.73%) ⬇️
.../theme/components/accordion/accordion.component.ts 41.66% <ø> (-11.67%) ⬇️
...eme/components/calendar-kit/calendar-kit.module.ts 100.00% <ø> (ø)
... and 325 more

@andreipadolin andreipadolin requested a review from yggg May 24, 2021 10:44
@yggg yggg changed the title feat(custom chat messages): added customizable mesages template support feat(chat): allow to provide custom message template May 26, 2021
@yggg yggg changed the title feat(chat): allow to provide custom message template feat(chat): add support for custom message template May 26, 2021
@andreipadolin andreipadolin requested a review from yggg May 28, 2021 08:52
Copy link
Contributor

@yggg yggg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We also need to update docs to tell users about custom message support. You'll find docs on the chat in the chat.component.ts file in the comment above the class declaration. Please, add several sentences on how to provide a custom message template and then reference your example via @stacked-example(Custom message, chat/chat-custom-message.component).
To start the docs app run npm run docs:serve. If you update text in the documentation comment in the chat component file you need to run npm run docs:parse to see the change in the docs app (no need to restart docs app).

@andreipadolin andreipadolin requested a review from yggg May 31, 2021 11:07
yggg added 26 commits June 15, 2021 15:05
To simplify template reading.
To remove unnecessary whitespace
Looks like docs app styles (bootstrap) was leaking into examples,
so there was no top margin in the docs examples, but it was presented
in the user app
Move div class and style to the host element
So all message type has consistent spacing between sender and message
So user template could take up all available space
@yggg yggg merged commit d84497c into akveo:master Jun 15, 2021
@andreipadolin andreipadolin deleted the feature/custom-chat-message branch June 16, 2021 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants