Skip to content

Commit

Permalink
fix(microsoft-todo): Add support for to-do.microsoft.com domain
Browse files Browse the repository at this point in the history
- Insert the button to the left of the star button
- Follow integration convention
  - Show button on task item hover
  - Always show active button

Closes #1312
  • Loading branch information
shantanuraj committed Apr 25, 2019
1 parent b7b7bb3 commit 88ca011
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ Please consider the following with your pull request:

![](https://user-images.githubusercontent.com/6432028/54681215-b8dd3280-4b03-11e9-8bf9-c75712b655b2.png)

>See the [Microsoft To-Do](https://github.com/toggl/toggl-button/blob/master/src/scripts/content/microsoft-to-do.js) integration for reference.
**All buttons:**
* Make sure we're not leaking styles or breaking the layout of the UI.
* The text used as timer description should be tailored to the majority of users. E.g. if ticket ID is an important piece of information, it should be included. If it's not important information (e.g. never actually shown in the UI, only in URLs) it should not be included.
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/content/microsoft-to-do.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ togglbutton.render('.taskItem-body:not(.toggl)', { observe: true }, function (
});

container.appendChild(link);
elem.appendChild(container);
elem.insertBefore(container, elem.lastElementChild);
});
4 changes: 2 additions & 2 deletions src/scripts/origins.js
Original file line number Diff line number Diff line change
Expand Up @@ -509,8 +509,8 @@ export default {
url: '*://ticktick.com/*,*://*.ticktick.com/*',
name: 'TickTick'
},
'todo.microsoft.com': {
url: '*://*.todo.microsoft.com/*',
'to-do.microsoft.com': {
url: '*://*.to-do.microsoft.com/*',
name: 'Microsoft To-Do',
file: 'microsoft-to-do.js'
},
Expand Down
12 changes: 12 additions & 0 deletions src/styles/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -1640,3 +1640,15 @@ label > .toggl-button.outlook {
cursor: default !important;
text-decoration: none !important;
}

/********* Microsoft To-Do *********/
.toggl-button.microsoft-todo {
visibility: hidden;
pointer-events: none;
}

.toggl-button.microsoft-todo.active,
.taskItem-body:hover .toggl-button.microsoft-todo {
visibility: visible;
pointer-events: all;
}

0 comments on commit 88ca011

Please sign in to comment.