Skip to content

Commit

Permalink
fix(zendesk): Fix Zendesk integration (#2091)
Browse files Browse the repository at this point in the history
Button is showing up again and description auto-complete is fixed.

Closes #2044
  • Loading branch information
nunofmn authored Jun 3, 2022
1 parent 66816c6 commit f66349f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/content/zendesk.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

// Zendesk new UI Jul 2021
togglbutton.render(
'.omni-conversation-pane [class^=Header]:not(.toggl)',
'.omni-conversation-pane>div>div:not(.toggl)',
{ observe: true },
(elem) => {
const getProject = () => {
Expand All @@ -19,7 +19,7 @@ togglbutton.render(
const getDescription = () => {
const ticketId = document.querySelector('header div[data-selected=true]').attributes['data-entity-id'].value || ''

const input = elem.querySelector('[class^=Left] input');
const input = elem.querySelector('input[aria-label=Subject]');
const title = (input ? input.value : '').trim();

return [`#${ticketId}`, title].filter(Boolean).join(' ');
Expand All @@ -32,7 +32,7 @@ togglbutton.render(
projectName: getProject
});

elem.querySelector('div[class^=Right]').appendChild(link);
elem.appendChild(link);
}
);

Expand Down
4 changes: 4 additions & 0 deletions src/styles/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,10 @@ a.toggl-button.toggl-plan {
font-weight: initial;
}

.toggl-button.zendesk--2021 {
align-self: center;
}

/********* ANYDO *********/
.toggl-button.anydo {
color: #099acb;
Expand Down

0 comments on commit f66349f

Please sign in to comment.