iachat/app/javascript/dashboard/components-next
Sivin Varghese 73f768e0bf
fix: Handle slug validation errors in Help Center (#11368)
# Pull Request Template

## Description

This PR fixes an issue with slug validation in the Help Center portal
settings. Previously, users were able to create or update slugs with
invalid characters such as spaces, slashes, and special symbols, which
cause help center to crash.

With this update, slug creation and updates are now properly validated.
Only slugs that match the allowed pattern will be accepted. No spaces,
underscores, slashes, or special characters are allowed.

Examples: **user**, **user-guide**

---

Fixes
https://linear.app/chatwoot/issue/CW-4273/add-validation-for-help-centre-slugs

## Type of change

- [x] Bug fix (non-breaking change which fixes an issue)

## How Has This Been Tested?

### Loom video

https://www.loom.com/share/a2ca5e2104984f28b29539293ffed33a?sid=e5064cb8-6220-4c43-99da-242c25d32027


## Checklist:

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my code
- [x] I have commented on my code, particularly in hard-to-understand
areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream
modules
2025-04-24 16:58:05 +05:30
..
avatar revert: Next bubble improvements (#10795) 2025-01-29 20:04:45 -08:00
banner chore: Update buttons in dashboard (#11145) 2025-03-31 17:21:32 -07:00
breadcrumb feat(v4): Add new contact details screen (#10504) 2024-12-03 21:29:47 -08:00
button chore: Update buttons in conversation screens - 2 (#11134) 2025-03-21 21:54:54 +05:30
Campaigns feat: Support bigger font size in dashboard (#10974) 2025-02-27 12:10:33 +05:30
captain feat: Add support for feature spotlight components (#11012) 2025-03-18 13:17:42 -07:00
checkbox feat: Add support for bulk action for Captain FAQs (#10905) 2025-02-27 17:05:33 -08:00
colorpicker feat: Update button component (#10362) 2024-10-29 14:00:24 +05:30
combobox chore: Update styles in settings pages (#11070) 2025-03-18 14:40:02 -07:00
Contacts chore: Remove sorting by phone_number from contact list (#11271) 2025-04-09 18:41:18 +05:30
Conversation/ConversationCard fix: sentry issues (#10695) 2025-01-16 15:49:48 +05:30
copilot fix: Display error message on empty response from Captain (#11302) 2025-04-15 13:20:06 +05:30
CustomAttributes feat(v4): Add new contact details screen (#10504) 2024-12-03 21:29:47 -08:00
dialog feat: Implement UI for Agent Bots in settings and remove CSML support (#11276) 2025-04-16 18:02:49 +05:30
dropdown-menu chore: Update styles in settings pages (#11070) 2025-03-18 14:40:02 -07:00
Editor chore: Improve new conversation form (#10687) 2025-01-15 13:10:09 +05:30
feature-spotlight feat: Add support for feature spotlight components (#11012) 2025-03-18 13:17:42 -07:00
filter chore: Update buttons in dashboard (#11145) 2025-03-31 17:21:32 -07:00
flag feat: Flag icon component (#10564) 2024-12-10 11:53:24 +05:30
HelpCenter fix: Handle slug validation errors in Help Center (#11368) 2025-04-24 16:58:05 +05:30
icon feat: Instagram Inbox using Instagram Business Login (#11054) 2025-04-08 10:47:41 +05:30
Inbox fix: v4 ui issues (#10652) 2025-01-08 18:17:50 +05:30
inline-input chore: Update styles in settings pages (#11070) 2025-03-18 14:40:02 -07:00
input chore: Update styles in settings pages (#11070) 2025-03-18 14:40:02 -07:00
Label chore(v4): Update colors (#10700) 2025-01-16 15:27:23 +05:30
message chore: Audit message characters across all channels (#11343) 2025-04-21 14:46:51 +05:30
NewConversation chore: Add cache to improve widget performance (#11163) 2025-03-24 16:04:49 -07:00
pagination feat: Support bigger font size in dashboard (#10974) 2025-02-27 12:10:33 +05:30
phonenumberinput chore: Update styles in settings pages (#11070) 2025-03-18 14:40:02 -07:00
selectmenu feat: Add the new select menu component (#10445) 2024-11-19 14:25:45 -08:00
sidebar chore: deprecate report_v4 feature flag and remove gating logic (#11320) 2025-04-17 08:52:56 +05:30
spinner feat: Add Spinner to new components (#10303) 2024-10-16 17:53:46 -07:00
switch feat: Support bigger font size in dashboard (#10974) 2025-02-27 12:10:33 +05:30
tabbar feat: Update button component (#10362) 2024-10-29 14:00:24 +05:30
taginput feat(v4): Compose a new conversation from a phone number. (#10568) 2024-12-17 18:07:58 +05:30
textarea chore: Update styles in settings pages (#11070) 2025-03-18 14:40:02 -07:00
CardLayout.vue feat: Add support for bulk action for Captain FAQs (#10905) 2025-02-27 17:05:33 -08:00
EmptyStateLayout.vue feat: Support bigger font size in dashboard (#10974) 2025-02-27 12:10:33 +05:30