-
Notifications
You must be signed in to change notification settings - Fork 13k
chore: Adds deprecation warning on removeCannedResponse
#37051
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
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
1eb8d42
chore: adds a deprecation warning to removeCannedResponse meteor method
lucas-a-pelegrino b7696b1
chore: replaces use of method for the corresponding endpoint
lucas-a-pelegrino ae92886
docs: adds changeset
lucas-a-pelegrino fb1518b
chore: adds minor improvements to client handling of removing canned …
lucas-a-pelegrino 342abd3
tests: updated tests
lucas-a-pelegrino 2f76da8
tests: removes .only
lucas-a-pelegrino dd3a09f
fix: lint errors
lucas-a-pelegrino 0b22653
fix: removes extra space
lucas-a-pelegrino 4abfe98
tests: updates assertion for requests without _id
lucas-a-pelegrino f90cefb
chore: adds minor improvement to deprecation warning
lucas-a-pelegrino f71fbf4
chore: adds minor improvements to onDelete forwarding
lucas-a-pelegrino 728a8e4
Merge branch 'develop' of github.com:RocketChat/Rocket.Chat into chor…
lucas-a-pelegrino 93e0407
chore: restores original delete canned-responses endpoint
lucas-a-pelegrino 6b7cd03
chore: adds deprecation warning to original endpoint
lucas-a-pelegrino 24042c2
chore: improves deprecation metadata
lucas-a-pelegrino cefbe97
tests: asserts correct status code for invalid url
lucas-a-pelegrino 8b26481
Merge branch 'develop' into chore/v7/CTZ-72
kodiakhq[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "@rocket.chat/meteor": patch | ||
| --- | ||
|
|
||
| Adds deprecation warning on `removeCannedResponse`; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
apps/meteor/client/omnichannel/cannedResponses/RemoveCannedResponseButton.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| import type { IOmnichannelCannedResponse } from '@rocket.chat/core-typings'; | ||
| import { IconButton } from '@rocket.chat/fuselage'; | ||
| import { useTranslation } from 'react-i18next'; | ||
|
|
||
| import { useRemoveCannedResponse } from './useRemoveCannedResponse'; | ||
| import { GenericTableCell } from '../../components/GenericTable'; | ||
|
|
||
| const RemoveCannedResponseButton = ({ id }: { id: IOmnichannelCannedResponse['_id'] }) => { | ||
| const { t } = useTranslation(); | ||
|
|
||
| const handleDelete = useRemoveCannedResponse(id); | ||
|
|
||
| return ( | ||
| <GenericTableCell withTruncatedText> | ||
| <IconButton | ||
| icon='trash' | ||
| small | ||
| title={t('Remove')} | ||
| onClick={(e) => { | ||
| e.stopPropagation(); | ||
| handleDelete(); | ||
| }} | ||
| /> | ||
| </GenericTableCell> | ||
| ); | ||
| }; | ||
|
|
||
| export default RemoveCannedResponseButton; |
11 changes: 6 additions & 5 deletions
11
apps/meteor/client/omnichannel/cannedResponses/useRemoveCannedResponse.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.