Commit Graph

2301 Commits

Author SHA1 Message Date
Sivin Varghese
b0d6089bb6 feat: Updates on new components (#10444) 2024-11-20 20:21:35 +05:30
Shivam Mishra
759615d041 fix: Update the dropdown bg to match the design system (#10438)
This PR updates the background used in dropdown to match our design system. Previous PR failed to add this correctly.

---------

Co-authored-by: Pranav <pranav@chatwoot.com>
2024-11-19 14:29:45 -08:00
Sivin Varghese
a7e3d443c9 feat: Add the new select menu component (#10445) 2024-11-19 14:25:45 -08:00
Sivin Varghese
b680fa43ec fix: Country code missing when typing in phone input. (#10439) 2024-11-19 14:38:00 +05:30
Shivam Mishra
c2e2954dfa fix: Remove the warnings generated from the Sidebar component (#10437)
The following warning occurred since the `ChannelLeaf` component was passed extra props. This PR fixes it by passing only the required props
2024-11-18 19:09:09 -08:00
Shivam Mishra
aaa328be87 feat: Add dropdown component (#10358)
This PR adds dropdown primitives to help compose custom dropdowns across the app. The following the sample usage

---------

Co-authored-by: Pranav <pranav@chatwoot.com>
2024-11-18 17:29:27 -08:00
Sivin Varghese
4cfa7e4c97 feat: Remove incoming messages metrics from the agent reports (#10415) 2024-11-14 17:55:24 +05:30
Shivam Mishra
ac729cf0cf feat: update debounce duration for article editor (#10410)
Quick fix for CW-3721 until we work on a better solution
2024-11-13 12:29:50 +05:30
Shivam Mishra
97d7b9d754 feat(ee): Setup @chatwoot/captain NPM library (#10389)
--- 
Co-authored-by: Sojan <sojan@pepalo.com>
Co-authored-by: Pranav <pranavrajs@gmail.com>
2024-11-11 17:39:09 -08:00
Sivin Varghese
db327378fa feat(v4): Add new conversation card component (#10392) 2024-11-07 20:30:56 -08:00
Willian Coqueiro
54740e3bb9 fix: Update the translation for the text used in isTyping method (#10384)
This fix consists of translating the message when another user is typing on the other side.
---
Co-authored-by: Pranav <pranavrajs@gmail.com>
Co-authored-by: Pranav <pranav@chatwoot.com>
2024-11-04 20:04:08 -08:00
Sivin Varghese
579efd933b feat(v4): Update the campaigns page design (#10371)
<img width="1439" alt="Screenshot 2024-10-30 at 8 58 12 PM"
src="https://github.com/user-attachments/assets/26231270-5e73-40fb-9efa-c661585ebe7c">


Fixes
https://linear.app/chatwoot/project/campaign-redesign-f82bede26ca7/overview

---------

Co-authored-by: Pranav <pranavrajs@gmail.com>
Co-authored-by: Shivam Mishra <scm.mymail@gmail.com>
2024-10-31 11:57:13 +05:30
Shivam Mishra
6e6c5a2f02 refactor: use css only last item detection (#10363)
The last item in the sidebar top level group has an indicator specified,
the problem in our case is that the structure can be nested and have sub
groups. So selecting the last item correctly can be tricky.

Previous implementation relied on the using DOM queries to find the last
item from a flat list of children, it would trigger on a `watch`. This
was error-prone as well as non idiomatic. The new approach is CSS-only
and reduces the unnecessary compute required.

Codepen for reference: https://codepen.io/scmmishra/pen/yLmKNLW

---------

Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
2024-10-31 09:39:18 +05:30
Shivam Mishra
2d35fa135b feat: Update colors (#10365) 2024-10-29 22:20:37 -07:00
Sivin Varghese
aa57431c48 fix: Dropdown menu issues (#10364) 2024-10-29 16:10:35 +05:30
Sivin Varghese
0689f59a05 feat: Update button component (#10362) 2024-10-29 14:00:24 +05:30
Sivin Varghese
f73798a1aa feat(v4): Help center portal redesign improvements (#10349) 2024-10-28 21:04:43 -07:00
Shivam Mishra
035a037313 fix: Use addEventListener instead of onmessage to listen to chatwoot-dashboard-app:fetch-info (#10342) 2024-10-28 20:43:47 -07:00
Shivam Mishra
7ba6c1d87d fix: Fix the issues with the new sidebar (#10348)
Co-authored-by: Pranav <pranavrajs@gmail.com>
2024-10-28 20:41:43 -07:00
Shivam Mishra
6df2d76c1e feat: new colors (#10352)
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
Co-authored-by: iamsivin <iamsivin@gmail.com>
2024-10-28 14:27:08 +05:30
Shivam Mishra
80c9434069 feat(v4): Auto-navigate to first menu item on group menu open(#10350)
Ensures users are seamlessly directed to the first available menu item upon opening a group, improving UX by reducing unnecessary clicks. This change enhances navigation flow within groups.

Co-authored-by: Pranav <pranavrajs@gmail.com>
2024-10-25 13:01:29 -07:00
Sivin Varghese
73b6e2cf37 fix: Agents list in bulk action is not loading (#10347)
# Pull Request Template

## Description

This PR fixes the issue where the bulk action inbox assignable agent
list was not showing.

The issue started after merging this [feat: Vite+Vue 3
PR](https://github.com/chatwoot/chatwoot/pull/10047 ).

**Cause of issue**
Previously, `selectedInboxes` was accessed from the `ChatList.vue`
component. However, after moving the bulk action logic from mixin to the
`useBulkActions.js` composable, we were still referencing
`selectedInboxes` from the `ChatList.vue` component, even though it was
being set in the composable. This caused the API failed to load the
assignable agent list.


Ref:https://github.com/chatwoot/chatwoot/blob/develop/app/javascript/dashboard/composables/chatlist/useBulkActions.js#L18

**Solution**
Removed the usage of `selectedInboxes` from the `ChatList.vue` component
ref and using `selectedInboxes` ref directly from the
`useBulkActions.js`

Fixes
https://linear.app/chatwoot/issue/CW-3696/bulk-action-agent-list-is-not-loading

## 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/21e3835b3db04e34b94531ec128b586b?sid=beda60f0-1c8e-457b-b617-379d4af91873


## Checklist:

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my code
- [ ] 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
- [ ] 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
2024-10-24 11:51:40 +05:30
Sivin Varghese
a3855a8d1d feat(v4): Update the help center portal design (#10296)
Co-authored-by: Pranav <pranavrajs@gmail.com>
2024-10-23 22:09:36 -07:00
Shivam Mishra
6d3ecfe3c1 feat: Add new sidebar for Chatwoot V4 (#10291)
This PR has the initial version of the new sidebar targeted for the next major redesign of the app. This PR includes the following changes

- Components in the `layouts-next` and `base-next` directories in `dashboard/components`
- Two generic components `Avatar` and `Icon`
- `SidebarGroup` component to manage expandable sidebar groups with nested navigation items. This includes handling active states, transitions, and permissions.
- `SidebarGroupHeader` component to display the header of each navigation group with optional icons and active state indication.
- `SidebarGroupLeaf` component for individual navigation items within a group, supporting icons and active state.
- `SidebarGroupSeparator` component to visually separate nested navigation items. (They look a lot like header)
- `SidebarGroupEmptyLeaf` component to render empty state of any navigation groups.

----

Co-authored-by: Pranav <pranav@chatwoot.com>
Co-authored-by: Pranav <pranavrajs@gmail.com>
2024-10-23 18:32:37 -07:00
Shivam Mishra
2a832f8ed5 fix: parsing of @ in i18n values (#10334)
Vue i18n has a new [linked message
syntax.](https://vue-i18n.intlify.dev/guide/essentials/syntax.html#linked-messages)
When it encounters `@` it assumes that we're trying to use a linked
message. And tries to parse it as such, in any case, it breaks since the
syntax is not valid and the params are not present. So it causes an
error. This works on dev but on production the error is bubbled up to
the top and rendering breaks.

A lot of folks use Chatwoot with default locale set in the env, this
surfaced the issue for the languages for which the syntax was not
updated

Fixes: https://github.com/chatwoot/chatwoot/issues/10313
2024-10-22 15:43:01 +05:30
Sivin Varghese
3fe771df6f fix: Modal in the context menu disappears unless hovered (#10333)
# Pull Request Template

## Description

This PR resolves the issue where the modal in the context menu
disappears when not being hovered over.

**Cause of issue.**
The problem occurred because the modal-related component was placed
inside `MessageContextMenu.vue`, and the parent wrapper was using the
classes `group-hover:visible invisible`. This caused the modal to only
appear when the message item, where the context menu was opened, was
hovered over.

**Solution**
To fix this, I removed the `group-hover:visible` invisible class from
the parent wrapper and moved it into the `woot-button` within the
`MessageContextMenu.vue` component. Additionally, I added a nested group
with the class group/context-menu, allowing the focus to remain on the
context menu itself.

Fixes
https://linear.app/chatwoot/issue/PR-1415/modal-in-the-context-menu-disappears-unless-hovered

## Type of change

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

## How Has This Been Tested?

**Loom video**

**Before**

https://www.loom.com/share/458f90708664493c86e909a56869d065?sid=0564a508-09a5-4e73-800b-8042140a22ba

**After**

https://www.loom.com/share/c119936d181d406d89468f9482ef6b81?sid=5cf3b1b4-6c66-4f8c-8f93-a62465a93b57

## Checklist:

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my code
- [ ] 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
- [ ] 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
2024-10-22 13:26:56 +05:30
Shivam Mishra
4e64097421 fix: solid colors (#10321)
Fix mismatch in CSS vars for `amber` and `blue` solid colors
2024-10-18 15:59:21 +05:30
Sivin Varghese
dff57013c3 feat: Add article empty state component (#10278) 2024-10-17 19:56:38 -07:00
Sivin Varghese
a37d44758b feat: Add portal empty state (#10277) 2024-10-17 15:51:24 -07:00
Pranav
35b21c1cea feat: Add Spinner to new components (#10303)
- Add Spinner to new components
2024-10-16 17:53:46 -07:00
Sivin Varghese
306a6c6ce0 feat: Add the new portal settings page (#10282) 2024-10-16 10:51:13 -07:00
Sivin Varghese
902a9aa7d7 feat: Add the new design for edit article page (#10285) 2024-10-16 10:50:44 -07:00
Sivin Varghese
a04f8182a2 feat: Add new Locale page (#10275)
Co-authored-by: Pranav <pranavrajs@gmail.com>
2024-10-15 19:21:15 -07:00
Sivin Varghese
6d6dc0c153 feat: Add the new design for the portal category page (#10274)
Co-authored-by: Pranav <pranav@chatwoot.com>
2024-10-15 13:17:28 -07:00
Sivin Varghese
32a9d5b0ce feat: Add a base layout component for the empty states (#10276) 2024-10-15 13:12:32 -07:00
Sivin Varghese
0082c6adb9 feat: Add new Inline Input component (#10281) 2024-10-15 13:11:38 -07:00
Sivin Varghese
431d533635 feat: Add new Avatar component (#10280)
**Screenshot from story**

**Light**
<img width="949" alt="image"
src="https://github.com/user-attachments/assets/b4a61e64-7c1d-408a-9009-13fa1ad43b67">



**Dark**
<img width="949" alt="image"
src="https://github.com/user-attachments/assets/21496540-aea5-4ca6-a92d-e7935b5e03d1">
2024-10-15 13:11:08 -07:00
Sivin Varghese
5fd389e15d feat: Add the new design for article page (#10273) 2024-10-15 13:08:04 -07:00
Sivin Varghese
44be3c9eec feat: Add Help Center layout with portal switcher component (#10272) 2024-10-15 13:07:14 -07:00
Sivin Varghese
7be1ecaf96 feat: Add new ComboBox component (#10267) 2024-10-15 13:03:06 -07:00
Sivin Varghese
f13644245e feat: Add the new Dialog component (#10266) 2024-10-15 13:01:57 -07:00
Sivin Varghese
62f4f127aa feat: Add new breadcrumb component (#10268) 2024-10-15 12:59:50 -07:00
Shivam Mishra
3a0fd9b777 feat: Add support for new colors (#10287)
This PR adds new colors based on the new design targeted for v4. 

Some usage guidelines

- All new colors are prefixed with `n` so to use solid, we use
`bg-n-solid-1`
- To use slate use `text-n-slate-12` it automatically toggles between
radix `slate` and `slateDark`
- The `weak` and `strong` colors are specifically used for borders
2024-10-14 21:13:51 -07:00
Sivin Varghese
dec637ab8a feat: Add new pagination component (#10263) 2024-10-14 21:06:54 -07:00
Shivam Mishra
e0ef007047 fix: Fix Sentry issues from Vite migration (#10262)
Fixes the following issues

- https://chatwoot-p3.sentry.io/issues/5966466083
- https://chatwoot-p3.sentry.io/issues/5966497518
- https://chatwoot-p3.sentry.io/issues/5966555379

For the first one, I am not sure if the fix is 100% correct, since I was
not able to reproduce, but I am confident it will work.

For both, 1st and 2nd issues, the problem came from the fact that we set
individual records to `undefined` when the intent was to remove it,
explicitly using delete fixes the issue.

### Whats up with the store changes?

Glad you asked, this comes down to Vue reactivity, previously Vue didn't
track undefined strictly, it just kinda ignored it, in Vue 3, the
reactivity changed significantly when they introduced ES6 proxies. The
Proxy tracks all property changes, including those set to undefined, so
properties remain enumerable.

So to delete a record, we actually have to the delete it using the
delete keyword, or replace the parent object with a new object splicing
the object to be deleted out.

I am assuming it worked earlier because VueX 3 reactivity was using
Object.defineProperty. Setting it to undefined might have "deleted" it
earlier

---------

Co-authored-by: Pranav <pranav@chatwoot.com>
2024-10-14 10:44:59 -07:00
Sivin Varghese
593270d10b feat: Add the locale card component (#10270) 2024-10-11 15:52:03 -07:00
Sivin Varghese
6986d34bd9 feat: Add the new Category card component (#10271) 2024-10-11 15:51:32 -07:00
Sivin Varghese
694302b930 feat: Add the new Article card component (#10269) 2024-10-11 15:50:54 -07:00
Sivin Varghese
1e9959bb65 feat: Update the design for the dropdown menu component (#10265)
Co-authored-by: Pranav <pranavrajs@gmail.com>
2024-10-11 15:46:13 -07:00
Sivin Varghese
ed9dc6d419 feat: Add the design for the new tab component (#10261)
Co-authored-by: Pranav <pranavrajs@gmail.com>
2024-10-11 15:27:29 -07:00