<commit_before><!--
Copyright (C) 2015 The Android Open Source Project

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

<link rel="import" href="../../../bower_components/polymer/polymer.html">
<link rel="import" href="../../shared/gr-account-link/gr-account-link.html">
<link rel="import" href="../../shared/gr-button/gr-button.html">
<link rel="import" href="../../shared/gr-date-formatter/gr-date-formatter.html">
<link rel="import" href="../../shared/gr-formatted-text/gr-formatted-text.html">
<link rel="import" href="../../shared/gr-rest-api-interface/gr-rest-api-interface.html">

<link rel="import" href="../gr-comment-list/gr-comment-list.html">

<dom-module id="gr-message">
  <template>
    <style>
      :host {
        border-top: 1px solid #ddd;
        display: block;
        position: relative;
      }
      :host(:not([expanded])) {
        cursor: pointer;
      }
      gr-avatar {
        position: absolute;
        left: var(--default-horizontal-margin);
      }
      .collapsed .contentContainer {
        align-items: baseline;
        color: #777;
        display: flex;
        white-space: nowrap;
      }
      .showAvatar.expanded .contentContainer {
        margin-left: calc(var(--default-horizontal-margin) + 2.5em);
        padding: 10px 0;
      }
      .showAvatar.collapsed .contentContainer {
        margin-left: calc(var(--default-horizontal-margin) + 1.75em);
      }
      .hideAvatar.collapsed .contentContainer,
      .hideAvatar.expanded .contentContainer {
        margin-left: 0;
      }
      .showAvatar.collapsed .contentContainer,
      .hideAvatar.collapsed .contentContainer,
      .hideAvatar.expanded .contentContainer {
        padding: .75em 0;
      }
      .collapsed gr-avatar {
        top: .5em;
        height: 1.75em;
        width: 1.75em;
      }
      .expanded gr-avatar {
        top: 12px;
        height: 2.5em;
        width: 2.5em;
      }
      .name {
        font-weight: bold;
      }
      .message {
        max-width: 80ch;
      }
      .collapsed .name,
      .collapsed .content,
      .collapsed .message,
      gr-account-chip {
        display: inline;
      }
      .collapsed gr-comment-list,
      .collapsed .replyContainer,
      .collapsed .hideOnCollapsed,
      .hideOnOpen {
        display: none;
      }
      .collapsed .hideOnOpen {
        display: block;
      }
      .collapsed .content {
        flex: 1;
        min-width: 0;<commit_msg>Tweak style for collapsed gr-message<commit_after><!--
Copyright (C) 2015 The Android Open Source Project

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

<link rel="import" href="../../../bower_components/polymer/polymer.html">
<link rel="import" href="../../shared/gr-account-link/gr-account-link.html">
<link rel="import" href="../../shared/gr-button/gr-button.html">
<link rel="import" href="../../shared/gr-date-formatter/gr-date-formatter.html">
<link rel="import" href="../../shared/gr-formatted-text/gr-formatted-text.html">
<link rel="import" href="../../shared/gr-rest-api-interface/gr-rest-api-interface.html">

<link rel="import" href="../gr-comment-list/gr-comment-list.html">

<dom-module id="gr-message">
  <template>
    <style>
      :host {
        border-top: 1px solid #ddd;
        display: block;
        position: relative;
      }
      :host(:not([expanded])) {
        cursor: pointer;
      }
      gr-avatar {
        position: absolute;
        left: var(--default-horizontal-margin);
      }
      .collapsed .contentContainer {
        align-items: baseline;
        color: #777;
        display: flex;
        white-space: nowrap;
      }
      .showAvatar.expanded .contentContainer {
        margin-left: calc(var(--default-horizontal-margin) + 2.5em);
        padding: 10px 0;
      }
      .showAvatar.collapsed .contentContainer {
        margin-left: calc(var(--default-horizontal-margin) + 1.75em);
      }
      .hideAvatar.collapsed .contentContainer,
      .hideAvatar.expanded .contentContainer {
        margin-left: 0;
      }
      .showAvatar.collapsed .contentContainer,
      .hideAvatar.collapsed .contentContainer,
      .hideAvatar.expanded .contentContainer {
        padding: .75em 0;
      }
      .collapsed gr-avatar {
        top: .5em;
        height: 1.75em;
        width: 1.75em;
      }
      .expanded gr-avatar {
        top: 12px;
        height: 2.5em;
        width: 2.5em;
      }
      .name {
        font-weight: bold;
      }
      .message {
        max-width: 80ch;
      }
      .collapsed .message {
        overflow: hidden;
        text-overflow: ellipsis;
      }
      .collapsed .name,
      .collapsed .content,
      .collapsed .message,
      gr-account-chip {
        display: inline;
      }
      .collapsed gr-comment-list,
      .collapsed .replyContainer,
      .collapsed .hideOnCollapsed,
      .hideOnOpen {
        display: none;
      }
      .collapsed .hideOnOpen {
        display: block;
      }
      .collapsed .content {
        flex: 1;
        margin-right: .25em;
        min-width: 0;
{'fraction_non_alphanumeric': 0.1315745533478043, 'fraction_numerical': 0.01402571380864919, 'mean_word_length': 2.1946666666666665, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '826493', 'n_tokens_mistral': 1870, 'n_tokens_neox': 1791, 'n_words': 445}