diff --git a/frontend/src/components/c-zoom-commit-message.vue b/frontend/src/components/c-zoom-commit-message.vue new file mode 100644 index 0000000000..20ee4f78ff --- /dev/null +++ b/frontend/src/components/c-zoom-commit-message.vue @@ -0,0 +1,273 @@ + + + + + diff --git a/frontend/src/views/c-zoom.vue b/frontend/src/views/c-zoom.vue index 2e93e3f93c..74fd0afd72 100644 --- a/frontend/src/views/c-zoom.vue +++ b/frontend/src/views/c-zoom.vue @@ -75,9 +75,9 @@ v-for="fileType in fileTypes", v-bind:key="fileType", v-bind:style="{\ - 'background-color': fileTypeColors[fileType],\ - 'color': getFontColor(fileTypeColors[fileType])\ - }" + 'background-color': fileTypeColors[fileType],\ + 'color': getFontColor(fileTypeColors[fileType])\ + }" ) input.mui-checkbox--fileType(type="checkbox", v-bind:value="fileType", v-on:change="updateSelectedFileTypesHash", v-model="selectedFileTypes") @@ -86,63 +86,10 @@ .zoom__day(v-for="day in selectedCommits", v-bind:key="day.date") h3(v-if="info.zTimeFrame === 'week'") Week of {{ day.date }} h3(v-else) {{ day.date }} - //- use tabindex to enable focus property on div - .commit-message( - tabindex="-1", - v-for="slice in day.commitResults", - v-bind:key="slice.hash", - v-bind:class="{ 'message-body active': slice.messageBody !== '' }" - ) - span.code-merge-icon(v-if="slice.isMergeCommit") - font-awesome-icon(icon="code-merge") - span   - a.message-title(v-bind:href="getSliceLink(slice)", - v-bind:class="!isBrokenLink(getSliceLink(slice)) ? '' : 'broken-link'", target="_blank") - .within-border {{ slice.messageTitle.substr(0, 50) }} - .not-within-border(v-if="slice.messageTitle.length > 50") - |{{ slice.messageTitle.substr(50) }} - span(data-cy="changes")   (+{{ slice.insertions }} -{{ slice.deletions }} lines)   - .hash - span {{ slice.hash.substr(0, 7) }} - span.fileTypeLabel( - v-if="containsAtLeastOneSelected(Object.keys(slice.fileTypesAndContributionMap))", - v-for="fileType in\ - Object.keys(slice.fileTypesAndContributionMap)", - vbind:key="fileType", - v-bind:style="{\ - 'background-color': fileTypeColors[fileType],\ - 'color': getFontColor(fileTypeColors[fileType])\ - }" - ) {{ fileType }} - template(v-if="slice.tags") - .tag( - v-for="tag in slice.tags", - vbind:key="tag", - tabindex="-1", v-bind:class="[`${slice.hash}`, tag]" - ) - font-awesome-icon(icon="tags") - span  {{ tag }} - a( - v-if="slice.messageBody !== ''", - v-on:click="toggleSelectedCommitMessageBody(slice)" - ) - .tooltip( - v-on:mouseover="onTooltipHover(`${slice.hash}-show-hide-message-body`)", - v-on:mouseout="resetTooltip(`${slice.hash}-show-hide-message-body`)" - ) - font-awesome-icon.commit-message--button(icon="ellipsis-h") - span.tooltip-text( - v-bind:ref="`${slice.hash}-show-hide-message-body`" - ) Click to show/hide the commit message body - .body(v-if="slice.messageBody !== ''", v-show="slice.isOpen") - pre {{ slice.messageBody }} - .dashed-border - template( - v-if="showDiffstat" - ) - c-stacked-bar-chart( - v-bind:bars="getContributionBars(slice)" - ) + template(v-for="slice in day.commitResults", v-bind:key="slice.hash") + c-zoom-commit-message(v-bind:slice="slice", + v-bind:selected-file-types="selectedFileTypes", v-bind:file-type-colors="fileTypeColors", + v-bind:info="info", v-bind:show-diffstat="showDiffstat")