Skip to content

Commit

Permalink
Set RefTip max-width to 350px, and make RefTips and subjects fully vi…
Browse files Browse the repository at this point in the history
…sible by hovering the graph visualization and the RefTips, respectively.

In a future VSCode version, hovering the author name will also automatically work for revealing the full subject.
  • Loading branch information
phil294 committed Sep 28, 2024
1 parent e6a89c5 commit 5ca896b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
12 changes: 10 additions & 2 deletions web/src/views/CommitRow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ let calculated_height = computed(() =>
props.height || config.value['row-height'])
</script>
<style scoped>
.commit {
.commit-row {
user-select: none;
}
.info > * {
Expand All @@ -90,6 +90,9 @@ let calculated_height = computed(() =>
min-width: 150px;
display: inline-flex;
}
.info > .subject-wrapper:hover {
overflow: visible;
}
.info > .subject-wrapper > * {
text-overflow: ellipsis;
}
Expand All @@ -100,6 +103,11 @@ let calculated_height = computed(() =>
.info > .subject-wrapper > .vis-resize-handle {
cursor: col-resize;
}
.vis:hover ~ .info > .subject-wrapper > .commit-ref-tips,
/* Works starting Chrome v129 which VSCode doesn't include *yet*. TODO test once shipped */
.info > .subject-wrapper > .commit-ref-tips:has(~ .author:hover) {
max-width: 50px;
}
.info > .datetime,
.info > .author {
color: #808080;
Expand All @@ -113,7 +121,7 @@ let calculated_height = computed(() =>
.info .stats {
width: 91px;
}
.commit.merge .subject {
.commit-row.merge .subject {
color: #808080;
}
</style>
6 changes: 6 additions & 0 deletions web/src/views/RefTip.vue
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,12 @@ let context_menu_provider = computed(() => () => {
border-radius: 7px;
white-space: pre;
margin: 0 1px;
max-width: 350px;
overflow: hidden;
text-overflow: ellipsis;
}
.ref-tip:hover {
max-width: unset;
}
.ref-tip.head {
/* box-shadow: 0px 0px 6px 4px rgba(255,255,255,0.188), 0px 0px 4px 0px rgba(255,255,255,0.188) inset; */
Expand Down

0 comments on commit 5ca896b

Please sign in to comment.