Skip to content

Commit dedc0b7

Browse files
committed
Fix(web): Add tooltip to project names
So one can see the whole title even when it has overflown.
1 parent bbba86c commit dedc0b7

File tree

3 files changed

+37
-3
lines changed

3 files changed

+37
-3
lines changed

web/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"node-sass": "^6.0.0",
1616
"sass-loader": "^10.0.5",
1717
"semver": "^7.3.7",
18+
"v-tooltip": "^2.1.3",
1819
"vue": "^2.6.10",
1920
"vue-markdown": "^2.2.4",
2021
"vuelidate": "^0.7.4"

web/src/components/Project.vue

+13-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<img :alt="`${project} project logo`" :src="logoURL" @error="() => hideAvatar = true" />
88
</md-avatar>
99
<div>
10-
<div class="md-title">{{ project }}</div>
10+
<div class="md-title" v-tooltip="{ content: project, classes: ['tooltip'] }">{{ project }}</div>
1111
<div class="md-subhead">{{ versions.length }} Versions </div>
1212
</div>
1313
</md-card-header>
@@ -24,6 +24,10 @@
2424

2525
<script>
2626
import ProjectRepository from '@/repositories/ProjectRepository'
27+
import Vue from 'vue'
28+
import VTooltip from 'v-tooltip'
29+
30+
Vue.use(VTooltip)
2731
2832
export default {
2933
name: 'Project',
@@ -78,7 +82,14 @@ export default {
7882
white-space: nowrap;
7983
overflow: hidden;
8084
text-overflow: ellipsis;
81-
85+
86+
}
87+
88+
.tooltip {
89+
background-color: rgb(80, 80, 80);
90+
color: white;
91+
padding: 4px 8px;
92+
border-radius: 4px;
8293
}
8394
8495
.star-div {

web/yarn.lock

+23-1
Original file line numberDiff line numberDiff line change
@@ -917,7 +917,7 @@
917917
"@babel/types" "^7.4.4"
918918
esutils "^2.0.2"
919919

920-
"@babel/runtime@^7.12.13", "@babel/runtime@^7.8.4":
920+
"@babel/runtime@^7.12.13", "@babel/runtime@^7.13.10", "@babel/runtime@^7.8.4":
921921
version "7.19.0"
922922
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.19.0.tgz#22b11c037b094d27a8a2504ea4dcff00f50e2259"
923923
integrity sha512-eR8Lo9hnDS7tqkO7NsV+mKvCmv5boaXFSZ70DnfhcgiEne8hv9oCEd36Klw74EtizEqLsy4YnW8UWwpBVolHZA==
@@ -8551,6 +8551,11 @@ pnp-webpack-plugin@^1.6.4:
85518551
dependencies:
85528552
ts-pnp "^1.1.6"
85538553

8554+
popper.js@^1.16.1:
8555+
version "1.16.1"
8556+
resolved "https://registry.yarnpkg.com/popper.js/-/popper.js-1.16.1.tgz#2a223cb3dc7b6213d740e40372be40de43e65b1b"
8557+
integrity sha512-Wb4p1J4zyFTbM+u6WuO4XstYx4Ky9Cewe4DWrel7B0w6VVICvPwdOpotjzcf6eD8TsckVnIMNONQyPIUFOUbCQ==
8558+
85548559
portfinder@^1.0.26:
85558560
version "1.0.32"
85568561
resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.32.tgz#2fe1b9e58389712429dc2bea5beb2146146c7f81"
@@ -10972,6 +10977,16 @@ uuid@^8.3.2:
1097210977
resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2"
1097310978
integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==
1097410979

10980+
v-tooltip@^2.1.3:
10981+
version "2.1.3"
10982+
resolved "https://registry.yarnpkg.com/v-tooltip/-/v-tooltip-2.1.3.tgz#281c2015d1e73787f13c8956aa295b8c3a73f261"
10983+
integrity sha512-xXngyxLQTOx/yUEy50thb8te7Qo4XU6h4LZB6cvEfVd9mnysUxLEoYwGWDdqR+l69liKsy3IPkdYff3J1gAJ5w==
10984+
dependencies:
10985+
"@babel/runtime" "^7.13.10"
10986+
lodash "^4.17.21"
10987+
popper.js "^1.16.1"
10988+
vue-resize "^1.0.1"
10989+
1097510990
validate-npm-package-license@^3.0.1:
1097610991
version "3.0.4"
1097710992
resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a"
@@ -11104,6 +11119,13 @@ vue-material@^1.0.0-beta-11:
1110411119
vue-github-buttons "^3.1.0"
1110511120
vue-toc "0.0.1"
1110611121

11122+
vue-resize@^1.0.1:
11123+
version "1.0.1"
11124+
resolved "https://registry.yarnpkg.com/vue-resize/-/vue-resize-1.0.1.tgz#c120bed4e09938771d622614f57dbcf58a5147ee"
11125+
integrity sha512-z5M7lJs0QluJnaoMFTIeGx6dIkYxOwHThlZDeQnWZBizKblb99GSejPnK37ZbNE/rVwDcYcHY+Io+AxdpY952w==
11126+
dependencies:
11127+
"@babel/runtime" "^7.13.10"
11128+
1110711129
vue-router@^3.1.3:
1110811130
version "3.6.5"
1110911131
resolved "https://registry.yarnpkg.com/vue-router/-/vue-router-3.6.5.tgz#95847d52b9a7e3f1361cb605c8e6441f202afad8"

0 commit comments

Comments
 (0)