Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restyle chore: upgrade packages #408

Merged
merged 3 commits into from
Aug 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
138 changes: 70 additions & 68 deletions coverage/lcov-report/block-navigation.js
Original file line number Diff line number Diff line change
@@ -1,87 +1,89 @@
/* eslint-disable */
var jumpToCode = (function init() {
// Classes of code we would like to highlight in the file view
var missingCoverageClasses = ['.cbranch-no', '.cstat-no', '.fstat-no'];
// Classes of code we would like to highlight in the file view
var missingCoverageClasses = ['.cbranch-no', '.cstat-no', '.fstat-no'];

// Elements to highlight in the file listing view
var fileListingElements = ['td.pct.low'];
// Elements to highlight in the file listing view
var fileListingElements = ['td.pct.low'];

// We don't want to select elements that are direct descendants of another match
var notSelector = ':not(' + missingCoverageClasses.join('):not(') + ') > '; // becomes `:not(a):not(b) > `
// We don't want to select elements that are direct descendants of another
// match
var notSelector = ':not(' + missingCoverageClasses.join('):not(') + ') > '; // becomes `:not(a):not(b) > `

// Selecter that finds elements on the page to which we can jump
var selector =
fileListingElements.join(', ') +
', ' +
notSelector +
missingCoverageClasses.join(', ' + notSelector); // becomes `:not(a):not(b) > a, :not(a):not(b) > b`
// Selecter that finds elements on the page to which we can jump
var selector =
fileListingElements.join(', ') +
', ' +
notSelector +
missingCoverageClasses.join(', ' + notSelector); // becomes `:not(a):not(b) > a, :not(a):not(b) > b`

// The NodeList of matching elements
var missingCoverageElements = document.querySelectorAll(selector);
// The NodeList of matching elements
var missingCoverageElements = document.querySelectorAll(selector);

var currentIndex;
var currentIndex;

function toggleClass(index) {
missingCoverageElements
.item(currentIndex)
.classList.remove('highlighted');
missingCoverageElements.item(index).classList.add('highlighted');
}

function makeCurrent(index) {
toggleClass(index);
currentIndex = index;
missingCoverageElements.item(index).scrollIntoView({
behavior: 'smooth',
block: 'center',
inline: 'center'
});
}
function toggleClass(index) {
missingCoverageElements.item(currentIndex).classList.remove('highlighted');
missingCoverageElements.item(index).classList.add('highlighted');
}

function goToPrevious() {
var nextIndex = 0;
if (typeof currentIndex !== 'number' || currentIndex === 0) {
nextIndex = missingCoverageElements.length - 1;
} else if (missingCoverageElements.length > 1) {
nextIndex = currentIndex - 1;
}
function makeCurrent(index) {
toggleClass(index);
currentIndex = index;
missingCoverageElements
.item(index)
.scrollIntoView({
behavior: 'smooth',
block: 'center',
inline: 'center',
});
}

makeCurrent(nextIndex);
function goToPrevious() {
var nextIndex = 0;
if (typeof currentIndex !== 'number' || currentIndex === 0) {
nextIndex = missingCoverageElements.length - 1;
} else if (missingCoverageElements.length > 1) {
nextIndex = currentIndex - 1;
}

function goToNext() {
var nextIndex = 0;
makeCurrent(nextIndex);
}

if (
typeof currentIndex === 'number' &&
currentIndex < missingCoverageElements.length - 1
) {
nextIndex = currentIndex + 1;
}
function goToNext() {
var nextIndex = 0;

makeCurrent(nextIndex);
if (
typeof currentIndex === 'number' &&
currentIndex < missingCoverageElements.length - 1
) {
nextIndex = currentIndex + 1;
}

return function jump(event) {
if (
document.getElementById('fileSearch') === document.activeElement &&
document.activeElement != null
) {
// if we're currently focused on the search input, we don't want to navigate
return;
}
makeCurrent(nextIndex);
}

switch (event.which) {
case 78: // n
case 74: // j
goToNext();
break;
case 66: // b
case 75: // k
case 80: // p
goToPrevious();
break;
}
};
return function jump(event) {
if (
document.getElementById('fileSearch') === document.activeElement &&
document.activeElement != null
) {
// if we're currently focused on the search input, we don't want to
// navigate
return;
}

switch (event.which) {
case 78: // n
case 74: // j
goToNext();
break;
case 66: // b
case 75: // k
case 80: // p
goToPrevious();
break;
}
};
})();
window.addEventListener('keydown', jumpToCode);
21 changes: 10 additions & 11 deletions coverage/lcov-report/components/GlobalContext.tsx.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,41 +15,41 @@
}
</style>
</head>

<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../index.html">All files</a> / <a href="index.html">components</a> GlobalContext.tsx</h1>
<div class='clearfix'>

<div class='fl pad1y space-right2'>
<span class="strong">19.86% </span>
<span class="quiet">Statements</span>
<span class='fraction'>29/146</span>
</div>


<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Branches</span>
<span class='fraction'>0/0</span>
</div>


<div class='fl pad1y space-right2'>
<span class="strong">0% </span>
<span class="quiet">Functions</span>
<span class='fraction'>0/1</span>
</div>


<div class='fl pad1y space-right2'>
<span class="strong">19.86% </span>
<span class="quiet">Lines</span>
<span class='fraction'>29/146</span>
</div>


</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
Expand Down Expand Up @@ -520,4 +520,3 @@ <h1><a href="../index.html">All files</a> / <a href="index.html">components</a>
<script src="../block-navigation.js"></script>
</body>
</html>

21 changes: 10 additions & 11 deletions coverage/lcov-report/components/common/styles/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,41 +15,41 @@
}
</style>
</head>

<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../../index.html">All files</a> components/common/styles</h1>
<div class='clearfix'>

<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>19/19</span>
</div>


<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Branches</span>
<span class='fraction'>3/3</span>
</div>


<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>2/2</span>
</div>


<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>19/19</span>
</div>


</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
Expand Down Expand Up @@ -113,4 +113,3 @@ <h1><a href="../../../index.html">All files</a> components/common/styles</h1>
<script src="../../../block-navigation.js"></script>
</body>
</html>

21 changes: 10 additions & 11 deletions coverage/lcov-report/components/common/styles/index.ts.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,41 +15,41 @@
}
</style>
</head>

<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../../index.html">All files</a> / <a href="index.html">components/common/styles</a> index.ts</h1>
<div class='clearfix'>

<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>19/19</span>
</div>


<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Branches</span>
<span class='fraction'>3/3</span>
</div>


<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>2/2</span>
</div>


<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>19/19</span>
</div>


</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
Expand Down Expand Up @@ -139,4 +139,3 @@ <h1><a href="../../../index.html">All files</a> / <a href="index.html">component
<script src="../../../block-navigation.js"></script>
</body>
</html>

21 changes: 10 additions & 11 deletions coverage/lcov-report/components/common/test/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,41 +15,41 @@
}
</style>
</head>

<body>
<div class='wrapper'>
<div class='pad1'>
<h1><a href="../../../index.html">All files</a> components/common/test</h1>
<div class='clearfix'>

<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>83/83</span>
</div>


<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Branches</span>
<span class='fraction'>1/1</span>
</div>


<div class='fl pad1y space-right2'>
<span class="strong">14.28% </span>
<span class="quiet">Functions</span>
<span class='fraction'>1/7</span>
</div>


<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>83/83</span>
</div>


</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
Expand Down Expand Up @@ -113,4 +113,3 @@ <h1><a href="../../../index.html">All files</a> components/common/test</h1>
<script src="../../../block-navigation.js"></script>
</body>
</html>

Loading