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

Remove Tests / Update Compact Collection Page #291

Merged
merged 6 commits into from
Nov 17, 2024
Merged
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
32 changes: 30 additions & 2 deletions css/dark-theme.scss
Original file line number Diff line number Diff line change
@@ -165,6 +165,10 @@
--blocked-seller: #d64c4c;
--icon-green: #5ec93b;
--icon-disabled: #666666;
/* Collection */
--collection-row-hover: #292929;
--collection-row-hover-selected: #222932;
--collection-row-selected: #212e3d;
}
/*
////////////////////////////////////
@@ -192,6 +196,9 @@
--modified-cart-text: #adbeff;
--modified-cart-htag: #c5def7;
--modified-cart-remove-icon: #c5def7;
--collection-row-hover: #25262a;
--collection-row-hover-selected: #172130;
--collection-row-selected: #1d2b40;
}
/*
////////////////////////////////////
@@ -226,6 +233,9 @@
--link: #83a2c8;
--link-visited: #a78fd6;
--blocked-seller: #cd4946;
--collection-row-hover: #1c2128;
--collection-row-hover-selected: #172130;
--collection-row-selected: #1d2b40;
}

.de-dark-theme {
@@ -6258,6 +6268,14 @@
color: var(--text-muted) !important;
}

.MuiDataGrid-columnSeparator {
display: none !important;
}

.MuiTooltip-popper > div {
background: var(--black) !important;
}

figure[class*="card_"] {
border-color: var(--borders) !important;
box-shadow: 0 4px 8px -2px var(--box-shadow-light);
@@ -6546,8 +6564,18 @@
background: var(--row-even) !important;
}

.MuiDataGrid-row:hover {
background: var(--input-bg) !important;
.MuiDataGrid-row {
&:hover {
background: var(--collection-row-hover) !important;

&.Mui-selected {
background: var(--collection-row-hover-selected) !important;
}
}

&.Mui-selected {
background: var(--collection-row-selected) !important;
}
}

.Mui-checked svg path,
4 changes: 2 additions & 2 deletions html/learn.html
Original file line number Diff line number Diff line change
@@ -215,7 +215,7 @@ <h2 id="compactArtist">Compact Artist & Label Pages</h2>

<!-- Compact Collection Header -->
<div class="feature-block">
<h2 id="compactCollection">Compact Collection Header</h2>
<h2 id="compactCollection">Compact Collection Page</h2>
<p>Reduces the overall white space in the header section of the Collection page, removes the top pagination navigation links, reduces font sizes, and moves some UI elements around in order to mimic the old Collection page layout.</p>

<img src="../img/learn/compact-collection-before.jpg" class="max-width" />
@@ -1043,7 +1043,7 @@ <h2 id="thanks">Thank You</h2>
<li class="donor">Rosalyn R.</li>
<li class="donor">Ryan C.</li>
<li>Salvatore C.</li>
<li class="donor">sdsowlsa <span style="color: #fff;">&#9733;</span><span style="color: #fff;">&#9733;</span></li>
<li class="donor">sdsowlsa <span style="color: #fff;">&#9733;</span><span style="color: #fff;">&#9733;</span><span style="color: #fff;">&#9733;</span></li>
<li class="donor">Semen I.</li>
<li class="donor">Shaun G.</li>
<li class="donor">Simon Q.</li>
4 changes: 2 additions & 2 deletions html/popup.html
Original file line number Diff line number Diff line change
@@ -150,8 +150,8 @@ <h2>&#x1F44B; Heads up!</h2>

<!-- Compact Collection -->
<div class="toggle-group">
<p class="label">Compact Collection Header</p>
<div class="meta hide">Compact Collection Pages white space size smaller</div>
<p class="label">Compact Collection Page</p>
<div class="meta hide">Compact Collection Pages header white space size smaller</div>

<div class="onoffswitch">
<input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="toggleCompactCollection" checked>
14 changes: 7 additions & 7 deletions js/extension/dependencies/tests/unit-tests.js
Original file line number Diff line number Diff line change
@@ -219,17 +219,17 @@ resourceLibrary.ready(() => {

let printSymbol = {

de: ['€', '£', '¥', '¥', 'A$', 'CA$', 'CHF', 'SEK', 'NZ$', '₽', 'ZAR', 'MX$', 'R$', '$'],
de: ['€', '£', '¥', '¥', 'A$', 'CA$', 'CHF', 'DKK', 'SEK', 'NZ$', '₽', 'ZAR', 'MX$', 'R$', '$'],

en: ['€', '£', '¥', '¥', 'A$', 'CA$', 'CHF', 'SEK', 'NZ$', '₽', 'ZAR', 'MX$', 'R$', '$'],
en: ['€', '£', '¥', '¥', 'A$', 'CA$', 'CHF', 'DKK', 'SEK', 'NZ$', '₽', 'ZAR', 'MX$', 'R$', '$'],

es: ['€', '£', 'JP¥', 'JP¥', 'AU$', 'CA$', 'CHF', 'SEK', 'NZ$', '₽', 'ZAR', 'MX$', 'R$', 'US$'],
es: ['€', '£', 'JP¥', 'JP¥', 'AU$', 'CA$', 'CHF', 'DKK', 'SEK', 'NZ$', '₽', 'ZAR', 'MX$', 'R$', 'US$'],

fr: ['€', '£UK', '¥JP', '¥JP', '$AU', '$CA', 'CHF', 'SEK', '$NZ', '₽', 'ZAR', 'MX$', 'R$', '$US'],
fr: ['€', '£UK', '¥JP', '¥JP', '$AU', '$CA', 'CHF', 'DKK', 'SEK', '$NZ', '₽', 'ZAR', 'MX$', 'R$', '$US'],

it: ['€', '£', 'JP¥', 'JP¥', 'A$', 'CA$', 'CHF', 'SEK', 'NZ$', '₽', 'ZAR', 'MX$', 'R$', 'USD'],
it: ['€', '£', 'JP¥', 'JP¥', 'A$', 'CA$', 'CHF', 'DKK', 'SEK', 'NZ$', '₽', 'ZAR', 'MX$', 'R$', 'USD'],

ja: ['€', '£', '¥', '¥', 'A$', 'CA$', 'CHF', 'SEK', 'NZ$', '₽', 'ZAR', 'MX$', 'R$', '$']
ja: ['€', '£', '¥', '¥', 'A$', 'CA$', 'CHF', 'DKK', 'SEK', 'NZ$', '₽', 'ZAR', 'MX$', 'R$', '$']
};

console.log('/// Testing printSymbol arrays ///');
@@ -246,7 +246,7 @@ resourceLibrary.ready(() => {
}
});

if (count === 14) {
if (count === 15) {

console.log('%c PASSED ', 'color: limegreen', 'All printSymbols were correctly retrieved');

9 changes: 7 additions & 2 deletions js/extension/features/compact-collection-header.js
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@ rl.ready(() => {
margin-right: 2rem;
}

[class*="content_"] {
#app [class*="content_"] {
margin-top: 1rem;
}
[class*="itemTitle_"] {
@@ -21,12 +21,15 @@ rl.ready(() => {
[class*="itemData_"] {
line-height: 16px;
}
[class*="viewAndShow_"]{
[class*="viewAndShow_"] {
width: 250px !important;
}
[class*="horizontalLinks_"] ul {
padding: 0 .5rem;
}
.MuiDataGrid-cell {
padding: 5px !important;
}

[class*="format_item_"],
[class*="released_"],
@@ -39,6 +42,7 @@ rl.ready(() => {
font-size: 13px !important;
}
`;

rl.attachCss('collection-page', rules);

let collectionItems = 'div[class*="MuiDataGrid-cell--withRenderer"]';
@@ -51,6 +55,7 @@ rl.ready(() => {

// Don't run when viewing someone else's collection
if (!bulkActionsRow) return;

// Relocate Layout buttons
bulkActionsRow.insertAdjacentElement('beforeend', layoutBtns);
document.querySelector('[class*="pagerAndViewContainer_"]').style.display = 'none';
2 changes: 1 addition & 1 deletion js/popup/change-log.js
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@ module.exports = {
current: [
{
features: [{
name: 'Compact Collection Header',
name: 'Compact Collection Page',
description: 'Reduces the white space, font sizes, and rearranges UI elements on the Collection header in order to mimic the old Collection page.',
link: '#compactCollection'
}],
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
"name": "Discogs Enhancer",
"short_name": "Discogs Enhancer",
"description": "Adds a dark theme, block sellers, price comparisons, currency converter, configurable quick search, & more to Discogs!",
"version": "3.8.0",
"version": "3.8.1",
"author": "Matthew Salcido",
"homepage_url": "https://www.discogs-enhancer.com",
"action": {
Loading