-
{{ userName }}
-
-
# {{ conversationId }}
+
{{ inboxName }}
@@ -69,6 +73,9 @@ export default {
...mapGetters({
accountId: 'getCurrentAccountId',
}),
+ conversationsId() {
+ return `# ${this.conversationId}`;
+ },
readableTime() {
if (!this.timestamp) {
return '';
@@ -124,10 +131,6 @@ export default {
.ion-ios-chatboxes-outline {
color: var(--white);
}
- .conversation-id {
- background: var(--w-50);
- color: var(--s-500);
- }
}
}
@@ -149,35 +152,26 @@ export default {
padding: var(--space-smaller) var(--space-one);
}
-.name-wrap {
+.user-wrap {
display: flex;
- width: 20rem;
- .user-name {
- font-size: var(--font-size-default);
- font-weight: var(--font-weight-bold);
- margin-right: var(--space-micro);
+ .name-wrap {
+ max-width: 20rem;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
- }
- .conversation-id {
- background: var(--w-400);
- border-radius: var(--border-radius-normal);
- color: var(--w-50);
- align-items: center;
- font-size: var(--font-size-mini);
- font-weight: var(--font-weight-bold);
- padding: 0 var(--space-smaller);
- white-space: nowrap;
+ .sub-block-title {
+ font-weight: var(--font-weight-bold);
+ margin-right: var(--space-micro);
+ }
}
}
.inbox-name {
border-radius: var(--border-radius-normal);
color: var(--s-500);
- font-size: var(--font-size-normal);
+ font-size: var(--font-size-mini);
font-weight: var(--font-weight-medium);
}
diff --git a/app/javascript/dashboard/routes/dashboard/conversation/search/SearchMessageItem.stories.js b/app/javascript/dashboard/routes/dashboard/conversation/search/SearchMessageItem.stories.js
new file mode 100644
index 000000000..78f0d0deb
--- /dev/null
+++ b/app/javascript/dashboard/routes/dashboard/conversation/search/SearchMessageItem.stories.js
@@ -0,0 +1,47 @@
+import SearchMessage from './SearchMessageItem';
+
+export default {
+ title: 'Components/Search/Messages',
+ component: SearchMessage,
+ argTypes: {
+ userName: {
+ defaultValue: 'John davies',
+ control: {
+ type: 'text',
+ },
+ },
+ timestamp: {
+ defaultValue: '1618046084',
+ control: {
+ type: 'number',
+ },
+ },
+ messageType: {
+ control: {
+ type: 'number',
+ },
+ },
+ content: {
+ defaultValue:
+ 'some designers and developers around the web know this and have put together a bunch of text generators',
+ control: {
+ type: 'text',
+ },
+ },
+ searchTerm: {
+ defaultValue: 'developers',
+ control: {
+ type: 'text',
+ },
+ },
+ },
+};
+
+const Template = (args, { argTypes }) => ({
+ props: Object.keys(argTypes),
+ components: { SearchMessage },
+ template: '
-item>',
+});
+
+export const Messages = Template.bind({});
+Messages.args = {};
diff --git a/app/javascript/dashboard/routes/dashboard/conversation/search/SearchMessageItem.vue b/app/javascript/dashboard/routes/dashboard/conversation/search/SearchMessageItem.vue
index 40da05e99..09a3c6d00 100644
--- a/app/javascript/dashboard/routes/dashboard/conversation/search/SearchMessageItem.vue
+++ b/app/javascript/dashboard/routes/dashboard/conversation/search/SearchMessageItem.vue
@@ -3,7 +3,7 @@
-
{{ userName }}
+
{{ userName }}
@@ -109,10 +109,9 @@ export default {
.name-wrap {
display: flex;
- width: 22rem;
+ max-width: 22rem;
- .user-name {
- font-size: var(--font-size-small);
+ .text-block-title {
font-weight: var(--font-weight-bold);
text-overflow: ellipsis;
overflow: hidden;
@@ -141,6 +140,7 @@ p {
.message-content {
font-size: var(--font-size-small);
margin-bottom: var(--space-micro);
+ margin-top: var(--space-micro);
padding: 0;
line-height: 1.35;
overflow-wrap: break-word;