Skip to content

Commit

Permalink
Remove hover effect that expands a line + remove 00 decimals.
Browse files Browse the repository at this point in the history
  • Loading branch information
Florimond committed Sep 29, 2020
1 parent 86b169e commit ce27208
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
13 changes: 11 additions & 2 deletions outlook/src/classes/Lead.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,18 @@ class Lead {
static fromJSON(o: Object): Lead {
var lead = new Lead();
lead.id = o['id'];
lead.name = o['name'];
lead.expectedRevenue = o['expected_revenue'];
lead.name = o['name'];;
lead.logged = o['logged'];

let expectedRevenue = o['expected_revenue'];
// Detects 00 decimals and remove them to make more space a reduce noise.
if (expectedRevenue.search(/\.00\D*$/) != -1) { // if it ends with ".00" or ".00 $" or ".00 €", etc.
expectedRevenue = expectedRevenue.replace(/\.00/, '');
} else if (expectedRevenue.search(/,00\D*$/) != -1) { // if it ends with ",00" or ",00 $" or ",00 €", etc.
expectedRevenue = expectedRevenue.replace(/,00/, '');
}
lead.expectedRevenue = expectedRevenue;

return lead;
}

Expand Down
5 changes: 4 additions & 1 deletion outlook/src/taskpane/components/Company/CompanyInsights.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,15 @@ const classNames: IListGhostingExampleClassObject = mergeStyleSets({
borderBottom: `1px solid ${semanticColors.bodyDivider}`,
display: "flex",
/*cursor: 'pointer',*/
/*
selectors: {
"&:hover .CompanyInsightValue": {
whiteSpace: "normal",
overflow: "visible",
textOverflow: "-",
overflowWrap: "break-word"
}
}
}*/
}
],
itemImage: {
Expand All @@ -63,12 +64,14 @@ const classNames: IListGhostingExampleClassObject = mergeStyleSets({
marginLeft: "1em"
},
itemIndex: [
/*
fonts.medium,
{
whiteSpace: "nowrap",
overflow: "hidden",
textOverflow: "ellipsis"
}
*/
/*marginBottom: 10*/
],
chevron: {
Expand Down
4 changes: 3 additions & 1 deletion outlook/src/taskpane/components/Leads/LeadList/LeadList.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,15 @@
.opportunity .title {
/*border: 1px solid red;*/
width: 200px;
/*
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
*/
}

.opportunity .title:hover {
white-space: normal;
/*white-space: normal;*/
}

.opportunity .price {
Expand Down

0 comments on commit ce27208

Please sign in to comment.