Skip to content

Commit 81167ef

Browse files
UI Improvements: dark mode fixes, clearer hover styles, disable dropdowns, and responsive design table (#1024)
* update dropdown hovers, tech icons, gradients, * improve darmode * update color contrast darkmode * fix css and html linting * disable dropdowns in html * disable category dropdowns until loaded
1 parent 86b23d4 commit 81167ef

File tree

12 files changed

+585
-544
lines changed

12 files changed

+585
-544
lines changed

src/js/components/drilldownHeader.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,19 @@ function setCategories(categories) {
3434
cellTemplate.textContent = `+ ${more} more`;
3535
list.appendChild(cellTemplate);
3636
}
37+
} else {
38+
const list = document.querySelector('.intro .category-list');
39+
list.remove();
3740
}
3841
}
3942

4043
function setDescription(description) {
4144
if(description && description !== "") {
4245
const descr = document.querySelector('p.app-description');
4346
descr.textContent = description;
47+
} else {
48+
const descr = document.querySelector('p.app-description');
49+
descr.remove();
4450
}
4551
}
4652

src/js/techreport/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,7 @@ class TechReport {
366366
},
367367
];
368368

369+
const filters = document.querySelectorAll('.filters select');
369370
Promise.all(filterApis.map(api => {
370371
const url = `${Constants.apiBase}/${api.endpoint}`;
371372

@@ -380,6 +381,8 @@ class TechReport {
380381
FilterComponent.updateTechnologies();
381382
FilterComponent.updateRank();
382383
FilterComponent.updateGeo();
384+
385+
filters.forEach(filter => filter.removeAttribute('disabled'));
383386
});
384387
}
385388

src/js/techreport/tableLinked.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,18 +102,22 @@ class TableLinked {
102102
cell = document.createElement('th');
103103
cell.classList.add('app-cell');
104104

105+
const wrapper = document.createElement('span');
106+
wrapper.classList.add('app-wrapper');
107+
105108
const img = document.createElement('span');
106109
const imgUrl = `https://cdn.httparchive.org/static/icons/${encodeURI(technology[0]?.icon)}`;
107110
img.setAttribute('aria-hidden', 'true');
108111
img.setAttribute('style', `background-image: url(${imgUrl})`);
109112
img.classList.add('app-img');
110-
cell.append(img);
113+
wrapper.append(img);
111114

112115
const formattedApp = DataUtils.formatAppName(app);
113116
const link = document.createElement('a');
114117
link.setAttribute('href', `/reports/techreport/tech?tech=${app}&geo=${geo}&rank=${rank}`);
115118
link.innerHTML = formattedApp;
116-
cell.append(link);
119+
wrapper.append(link);
120+
cell.append(wrapper);
117121
} else if (column.type === 'checkbox') {
118122
cell = this.addColumnCheckbox(app);
119123
} else if(column.key === 'client') {

static/css/techreport/general.css

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ strong {
3939
}
4040

4141
:is(a, button, select):focus-visible {
42-
outline: 1.5px solid var(--color-teal-dark);
42+
outline: 1.5px solid var(--focus-default);
4343
outline-offset: 1.5px;
4444
border-radius: 3px;
4545
}
@@ -68,7 +68,7 @@ nav li:hover {
6868
padding: 1.5rem;
6969
background: var(--color-card-background);
7070
border-radius: var(--card-radius);
71-
border: 1px solid var(--color-card-border-light);
71+
border: 1px solid var(--color-card-border);
7272
box-shadow: var(--card-shadow);
7373
transition: padding 0.35s;
7474
}
@@ -124,6 +124,7 @@ nav li:hover {
124124
width: 25rem;
125125
max-width: 100vw;
126126
position: relative;
127+
border-right: 1px solid var(--color-card-border);
127128
}
128129

129130
.split-view:has(.filters.hidden) .page-content {

0 commit comments

Comments
 (0)