Skip to content

Commit 371e36a

Browse files
lucaslylburieberry
andauthored
Eco 172 fixed crm (#2194)
* reorganize import for acc,contact,deal and task * account-header-cssvar-control * more deal-event cssvar control * handle-all-account-fitted-format-aspect-ratio * handle-all-deal-fitted-format-aspect-ratio * Revert "reorganize import for acc,contact,deal and task" This reverts commit 4dcfa15. * enhance account-header, priotize to block name always * reorganize and optimze fitted format for account and deal * enhance entity display * enhance components * add overflow to deal-event * enhance fitted format * fix logo size on account fitted * update summary-card component and related file * create page layout component * renabled back deal embedded format * reorganize import * test fix lint * test fix-lint * Design tweaks * Update icons and display names * ignore glint * fix lint --------- Co-authored-by: Burcu Noyan <burcunoyan@gmail.com>
1 parent fd05c79 commit 371e36a

20 files changed

+1414
-1164
lines changed

packages/experiments-realm/components/account-header.gts

+43-14
Original file line numberDiff line numberDiff line change
@@ -26,43 +26,72 @@ class AccountHeader extends GlimmerComponent<AccountHeaderArgs> {
2626
<div class='account-header-info'>
2727
{{#if (has-block 'name')}}
2828
{{yield to='name'}}
29+
{{else}}
30+
<h3 class='account-header-name'>{{@name}}</h3>
2931
{{/if}}
32+
3033
{{#if (has-block 'content')}}
31-
{{yield to='content'}}
34+
<div class='account-header-info-content'>
35+
{{yield to='content'}}
36+
</div>
3237
{{/if}}
3338
</div>
3439
</header>
3540

3641
<style scoped>
3742
.account-header {
38-
display: flex;
39-
align-items: start;
40-
gap: var(--boxel-sp);
43+
display: var(--account-header-display, flex);
44+
align-items: var(--account-header-align-items, start);
45+
gap: var(--account-header-gap, var(--boxel-sp));
4146
min-width: 0;
4247
}
4348
.account-header-logo {
4449
flex-shrink: 0;
4550
width: var(--account-header-logo-size, 60px);
4651
height: var(--account-header-logo-size, 60px);
47-
object-fit: cover;
48-
border-radius: var(--boxel-border-radius-xl);
52+
object-fit: var(--account-header-logo-object-fit, cover);
53+
border-radius: var(
54+
--account-header-logo-border-radius,
55+
var(--boxel-border-radius-xl)
56+
);
4957
}
5058
.default-icon-container {
5159
display: var(--account-header-logo-display, flex);
52-
align-items: center;
53-
justify-content: center;
54-
background-color: var(--boxel-200);
55-
color: var(--boxel-400);
56-
padding: 5px;
60+
align-items: var(--account-header-logo-align-items, center);
61+
justify-content: var(--account-header-logo-justify-content, center);
62+
background-color: var(
63+
--account-header-logo-background-color,
64+
var(--boxel-200)
65+
);
66+
color: var(--account-header-logo-color, var(--boxel-400));
67+
padding: var(--account-header-logo-padding, 5px);
5768
}
5869
.account-header-info {
59-
display: flex;
60-
flex-direction: column;
61-
gap: var(--boxel-sp-xxs);
70+
display: var(--account-header-info-display, flex);
71+
flex-direction: var(--account-header-info-flex-direction, column);
72+
gap: var(--account-header-info-gap, var(--boxel-sp-xxs));
6273
min-width: 0;
6374
width: 100%;
6475
overflow: hidden;
6576
}
77+
.account-header-name {
78+
margin: 0;
79+
font: var(--account-header-name-font, 600 var(--boxel-font-med));
80+
letter-spacing: var(
81+
--account-header-name-letter-spacing,
82+
var(--boxel-lsp-sm)
83+
);
84+
overflow: hidden;
85+
text-overflow: ellipsis;
86+
display: -webkit-box;
87+
-webkit-box-orient: vertical;
88+
-webkit-line-clamp: var(--account-header-name-line-clamp, 1);
89+
}
90+
.account-header-info-content {
91+
display: var(--account-header-info-content-display, flex);
92+
flex-direction: var(--account-header-info-content-flex-direction, row);
93+
gap: var(--account-header-info-content-gap, var(--boxel-sp-xxs));
94+
}
6695
</style>
6796
</template>
6897
}

packages/experiments-realm/components/avatar-group.gts

+33-17
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ interface AvatarGroupSignature {
88
name?: string;
99
userId?: string | null;
1010
};
11-
Blocks: { content: [] };
11+
Blocks: {
12+
name: [];
13+
content: [];
14+
};
1215
Element: HTMLElement;
1316
}
1417

@@ -28,39 +31,52 @@ export default class AvatarGroup extends GlimmerComponent<AvatarGroupSignature>
2831
/>
2932

3033
<div class='avatar-info'>
31-
<h3 class='name'>
32-
{{if @name @name 'No Name Assigned'}}
33-
</h3>
34+
{{#if (has-block 'name')}}
35+
{{yield to='name'}}
36+
{{else}}
37+
<h3 class='avatar-name'>{{@name}}</h3>
38+
{{/if}}
3439

35-
{{yield to='content'}}
40+
{{#if (has-block 'content')}}
41+
<div class='avatar-info-content'>
42+
{{yield to='content'}}
43+
</div>
44+
{{/if}}
3645
</div>
3746
</div>
3847

3948
<style scoped>
4049
.avatar-group {
41-
display: flex;
42-
align-items: center;
43-
gap: var(--boxel-sp-sm);
50+
display: var(--avatar-group-display, flex);
51+
flex-direction: var(--avatar-group-flex-direction, row);
52+
align-items: var(--avatar-group-align-items, center);
53+
gap: var(--avatar-group-gap, var(--boxel-sp-sm));
4454
min-width: 0;
4555
}
4656
.avatar-thumbnail {
4757
flex-shrink: 0;
48-
--profile-avatar-icon-size: 60px;
58+
--profile-avatar-icon-size: var(--avatar-thumbnail-size, 60px);
59+
--profile-avatar-icon-border: var(--avatar-thumbnail-border, 0px);
4960
}
5061
.avatar-info {
5162
min-width: 0;
5263
width: 100%;
5364
overflow: hidden;
5465
}
55-
.name {
56-
-webkit-line-clamp: 1;
57-
text-wrap: nowrap;
58-
text-overflow: ellipsis;
59-
overflow: hidden;
66+
.avatar-name {
6067
margin: 0;
61-
font-size: var(--boxel-font-size);
62-
font-weight: 600;
63-
letter-spacing: var(--boxel-lsp-sm);
68+
font: var(--avatar-name-font, 600 var(--boxel-font-med));
69+
letter-spacing: var(--avatar-name-letter-spacing, var(--boxel-lsp-sm));
70+
overflow: hidden;
71+
text-overflow: ellipsis;
72+
display: -webkit-box;
73+
-webkit-box-orient: vertical;
74+
-webkit-line-clamp: var(--avatar-name-line-clamp, 1);
75+
}
76+
.avatar-info-content {
77+
display: var(--avatar-info-content-display, flex);
78+
flex-direction: var(--avatar-info-content-flex-direction, row);
79+
gap: var(--avatar-info-content-gap, var(--boxel-sp-xxs));
6480
}
6581
</style>
6682
</template>

packages/experiments-realm/components/entity-icon-display.gts

+52-41
Original file line numberDiff line numberDiff line change
@@ -73,63 +73,74 @@ export default class EntityDisplayWithIcon extends GlimmerComponent<EntityDispla
7373
</div>
7474
<style scoped>
7575
.entity-icon-display {
76-
--icon-size: var(--entity-display-icon-size, var(--boxel-icon-sm));
77-
--title-font-size: var(
78-
--entity-display-title-font-size,
79-
var(--boxel-font-size-sm)
80-
);
81-
--title-color: var(--entity-display-title-color, var(--boxel-dark));
82-
--title-font-weight: var(--entity-display-title-font-weight, 600);
83-
--content-font-size: var(
84-
--entity-display-content-font-size,
85-
var(--boxel-font-size-xs)
86-
);
87-
--content-font-weight: var(
88-
--entity-display-content-font-weight,
89-
var(--boxel-font-weight-normal)
90-
);
91-
--content-color: var(--entity-display-content-color, var(--boxel-400));
92-
--content-gap: var(--entity-display-content-gap, var(--boxel-sp-xxxs));
93-
display: flex;
94-
align-items: flex-start;
95-
gap: var(--content-gap);
76+
display: var(--entity-display-display, flex);
77+
align-items: var(--entity-display-align-items, flex-start);
78+
flex-direction: var(--entity-display-flex-direction, row);
79+
gap: var(--entity-display-gap, var(--boxel-sp-xxxs));
9680
}
9781
.entity-icon-display.center {
9882
align-items: center;
9983
}
10084
.entity-icon {
101-
display: inline-flex;
102-
align-items: center;
103-
justify-content: center;
85+
display: var(--entity-display-icon-display, inline-flex);
86+
align-items: var(--entity-display-icon-align-items, center);
87+
justify-content: var(--entity-display-icon-justify-content, center);
10488
flex-shrink: 0;
105-
width: var(--icon-size);
106-
height: var(--icon-size);
89+
width: var(--entity-display-icon-size, var(--boxel-icon-sm));
90+
height: var(--entity-display-icon-size, var(--boxel-icon-sm));
10791
}
10892
.entity-info {
109-
display: flex;
110-
flex-direction: column;
111-
gap: var(--content-gap);
93+
display: var(--entity-display-info-display, flex);
94+
flex-direction: var(--entity-display-info-flex-direction, column);
95+
gap: var(--entity-display-info-gap, var(--boxel-sp-xxxs));
11296
}
11397
.entity-title-tag-container {
114-
display: flex;
115-
flex-wrap: wrap;
116-
align-items: center;
117-
gap: var(--content-gap);
98+
display: var(--entity-display-title-tag-container-display, flex);
99+
flex-wrap: var(--entity-display-title-tag-container-flex-wrap, wrap);
100+
align-items: var(
101+
--entity-display-title-tag-container-align-items,
102+
center
103+
);
104+
gap: var(
105+
--entity-display-title-tag-container-gap,
106+
var(--boxel-sp-xxxs)
107+
);
118108
}
119109
.entity-title {
120-
word-break: break-word;
121-
color: var(--title-color);
122-
font-size: var(--title-font-size);
123-
font-weight: var(--title-font-weight);
110+
color: var(--entity-display-title-color, var(--boxel-dark));
111+
font-size: var(
112+
--entity-display-title-font-size,
113+
var(--boxel-font-size-sm)
114+
);
115+
font-weight: var(--entity-display-title-font-weight, 600);
116+
overflow: hidden;
117+
text-overflow: ellipsis;
118+
display: -webkit-box;
119+
-webkit-box-orient: vertical;
120+
-webkit-line-clamp: var(--entity-display-title-line-clamp, 1);
121+
margin: var(--entity-display-title-margin, 0);
122+
word-break: var(--entity-display-title-word-break, break-word);
124123
}
125124
.entity-title.underline {
126-
text-decoration: underline;
125+
text-decoration: var(--entity-display-title-underline, underline);
127126
}
128127
.entity-content {
129-
margin: 0;
130-
font-size: var(--content-font-size);
131-
font-weight: var(--content-font-weight);
132-
color: var(--content-color);
128+
color: var(--entity-display-content-color, var(--boxel-400));
129+
font-size: var(
130+
--entity-display-content-font-size,
131+
var(--boxel-font-size-xs)
132+
);
133+
font-weight: var(
134+
--entity-display-content-font-weight,
135+
var(--boxel-font-weight-normal)
136+
);
137+
overflow: hidden;
138+
text-overflow: ellipsis;
139+
display: -webkit-box;
140+
-webkit-box-orient: vertical;
141+
-webkit-line-clamp: var(--entity-display-content-line-clamp, 1);
142+
margin: var(--entity-display-content-margin, 0);
143+
word-break: var(--entity-display-content-word-break, break-word);
133144
}
134145
</style>
135146
</template>

0 commit comments

Comments
 (0)