Skip to content

Commit 44eb1f6

Browse files
Jordan Lovettoalders
authored andcommitted
Upgrade bootstrap to 5.3.5 and remove ttip package
Removing the ttip package is just a start at removing jquery as a dependency. The browser can handle titles itself to create popups so I have just migrated them to use that instead. We still have a couple of jquery uses in the code: - quick command modal popup - Dropdown menu for the login and profile button These are not trivial to remove unlike ttip so I will not include them in this branch
1 parent d719c95 commit 44eb1f6

File tree

4 files changed

+5
-10
lines changed

4 files changed

+5
-10
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
},
2727
"dependencies": {
2828
"@fortawesome/fontawesome-free": "^6.7.2",
29-
"bootstrap": "^3.4.1",
29+
"bootstrap": "^5.3.5",
3030
"brush-cpp": "^4.0.1",
3131
"brush-diff": "^4.0.0",
3232
"brush-javascript": "^4.0.0",

root/base/release.tx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,7 @@
5050
%% ? '/release/' ~ $release.author ~ '/' ~ $release.name
5151
%% : '/dist/' ~ $release.distribution;
5252
<li class="nav-header no-margin-top">
53-
<div class="ttip" data-toggle="tooltip" data-placement="bottom" title="The date that this version of [% $release.distribution %] was released.">
54-
<span class="relatize">[% datetime($release.date).to_http %]</span>
55-
</div>
53+
<span>Released <span class="relatize">[% datetime($release.date).to_http %]</span></span>
5654
</li>
5755
%% include inc::release_status { maturity => $release.maturity }
5856
%% block left_nav_lead -> {
@@ -101,7 +99,7 @@
10199
</li>
102100
%% if defined $distribution.river.bus_factor {
103101
<li>
104-
<div class="ttip" data-toggle="tooltip" data-placement="bottom" title="The # people with an indexing permission on [% $release.distribution %] who have released something to CPAN in the last 2 years (i.e. the # people likely able to release critical fixes in a timely manner)">
102+
<div title="The # people with an indexing permission on [% $release.distribution %] who have released something to CPAN in the last 2 years (i.e. the # people likely able to release critical fixes in a timely manner)">
105103
Bus factor: [% $distribution.river.bus_factor %]
106104
</div>
107105
</li>

root/inc/dependencies.tx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
<li><a href="/pod/[% $dep %]" title="[% $dep %]" class="ellipsis">[% $dep %]</a></li>
88
%% }
99
%% if !$deps.size() && !$release.metadata {
10-
<li><i class="ttip" title="no META file provided">unknown</i></li>
10+
<li><i title="no META file provided">unknown</i></li>
1111
%% }
1212
%% else if $release.metadata.dynamic_config {
13-
<li><i class="ttip" title="dynamic_config enabled">[% $deps.size() ? "and possibly others" : "unknown" %]</i></li>
13+
<li><i title="dynamic_config enabled">[% $deps.size() ? "and possibly others" : "unknown" %]</i></li>
1414
%% }
1515
%% else if !$deps.size() {
1616
<li><i>none</i></li>

root/static/js/cpan.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ const {
1111
const jQuery = require('jquery');
1212
require('bootstrap/js/dropdown.js');
1313
require('bootstrap/js/modal.js');
14-
require('bootstrap/js/tooltip.js');
1514

1615
function setFavTitle(button) {
1716
button.setAttribute('title', button.classList.contains('active') ? 'Remove from favorites' : 'Add to favorites');
@@ -104,8 +103,6 @@ function format_string(input_string, replacements) {
104103
// User customisations
105104
processUserData();
106105

107-
jQuery(".ttip").tooltip(); // bootstrap
108-
109106
for (const el of document.querySelectorAll('.keyboard-shortcuts')) {
110107
el.addEventListener('click', e => {
111108
e.preventDefault();

0 commit comments

Comments
 (0)