Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions app/assets/stylesheets/_gitter.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
.gitter-open-chat-button {
background-color: $hb-purple;
font-size: 9px;
right: 16px;
padding: 0.5em 2em;
&:hover {
background-color: $hb-purple-dark;
}
&:focus {
background-color: $hb-purple-dark;
}

.ui-icon-x-thin {
position: relative;
margin-left: -4px;
font-size: 7px;
float: right;
left: 14px;
}
}
1 change: 1 addition & 0 deletions app/assets/stylesheets/flex_layout.css.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
@import "milestone";
@import "date_picker";
@import "sidebar";
@import "gitter";

body {
word-wrap: break-word;
Expand Down
3 changes: 1 addition & 2 deletions app/views/layouts/ember.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,12 @@
</head>
<body class="flex-body" id="application">

<%= render partial: "shared/analytics" %>
<script>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we want to remove this, just disable Intercom in Segment.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can do that as well, though for the ember app I believe the only thing we use it for is the intercom chat widget.

Copy link
Member

@dahlbyk dahlbyk Jan 24, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

98% sure we also feed GA via Segment for tracking the board page view.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh right for the board page you on GA you are correct.

window.EMOJIS = <%= emojis.to_json.html_safe %>;
window.HUBOARD_ENV = <%= Rails.application.config.client_environment.to_json.html_safe %>;
</script>
<%= content_for :javascripts %>

<%= render partial: "shared/gitter" %>

<script>
$(function() {
Expand Down
17 changes: 17 additions & 0 deletions app/views/shared/_gitter.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<script>
((window.gitter = {}).chat = {}).options = {
room: "huboard/huboard",
activationElement: ".gitter-open-chat-button"
};

function hideGitter(){
var gitter = document.getElementsByClassName("gitter-open-chat-button")[0];
gitter.style.display = "none";
window.gitter.chat.defaultChat.destroy();
}
</script>
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>

<a href="https://gitter.im/huboard/huboard" class="gitter-open-chat-button">
Chat with us!<i class="ui-icon-x-thin" onclick="hideGitter()"></i>
</a>