Skip to content

Commit 6802c05

Browse files
Merge #1211 #1215
1211: Remplace 32x32 PNG with SVG for GitHub mark r=carols10cents The PNG looks blurry on a high-resolution display. This SVG is extracted with Inkscape from `GitHub-Mark.ai` from https://github.com/logos. 1215: Revert "Merge #1194" r=carols10cents While I still like the feature it self, the implementation currently has some issues (see #1209) that I wasn't aware of initially and are not quite as easy to fix. Since I'll be on vacation for the next weeks I won't have time to work on a proper solution for now, so IMHO the best solution is to revert the problematic behavior until this can be fixed correctly. Resolves #1209 /cc @durka @Boscop
3 parents c69ca7a + bc45419 + e110495 commit 6802c05

File tree

9 files changed

+19
-18
lines changed

9 files changed

+19
-18
lines changed

app/controllers/application.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,7 @@ export default Controller.extend(EKMixin, {
2121
}),
2222

2323
actions: {
24-
search(q) {
25-
if (q !== undefined) {
26-
this.set('searchQuery', q);
27-
}
28-
24+
search() {
2925
this.transitionToRoute('search', {
3026
queryParams: {
3127
q: this.get('searchQuery'),

app/controllers/search.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,10 @@ import { computed } from '@ember/object';
33
import { alias, bool, readOnly } from '@ember/object/computed';
44
import { inject as service } from '@ember/service';
55

6-
import { task, timeout } from 'ember-concurrency';
6+
import { task } from 'ember-concurrency';
77

88
import PaginationMixin from '../mixins/pagination';
99

10-
const DEBOUNCE_MS = 250;
11-
1210
export default Controller.extend(PaginationMixin, {
1311
search: service(),
1412
queryParams: ['q', 'page', 'per_page', 'sort'],
@@ -42,13 +40,10 @@ export default Controller.extend(PaginationMixin, {
4240
hasItems: bool('totalItems'),
4341

4442
dataTask: task(function* (params) {
45-
// debounce the search query
46-
yield timeout(DEBOUNCE_MS);
47-
4843
if (params.q !== null) {
4944
params.q = params.q.trim();
5045
}
5146

5247
return yield this.store.query('crate', params);
53-
}).restartable(),
48+
}).drop(),
5449
});

app/templates/application.hbs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<input type="text" class="search" name="q" id="cargo-desktop-search"
2222
placeholder="Click or press 'S' to search..."
2323
value={{searchQuery}}
24-
oninput={{action "search" value="target.value"}}
24+
oninput={{action (mut searchQuery) value="target.value"}}
2525
autofocus="autofocus"
2626
tabindex="1"
2727
required
@@ -106,7 +106,7 @@
106106
<input type="text" class="search" name="q"
107107
placeholder="Search"
108108
value={{searchQuery}}
109-
oninput={{action "search" value="target.value"}}
109+
oninput={{action (mut searchQuery) value="target.value"}}
110110
autocorrect="off"
111111
tabindex="1"
112112
required>

app/templates/team.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
</h2>
1212
</div>
1313
{{#user-link user=model.team data-test-github-link=true}}
14-
<img alt="GitHub profile" title="GitHub profile" src="/assets/GitHub-Mark-32px.png"/>
14+
<img alt="GitHub profile" title="GitHub profile" src="/assets/GitHub-Mark.svg"/>
1515
{{/user-link}}
1616
</div>
1717
</div>

app/templates/user.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
{{ model.user.login }}
55
</h1>
66
{{#user-link user=model.user data-test-user-link=true}}
7-
<img alt="GitHub profile" title="GitHub profile" src="/assets/GitHub-Mark-32px.png"/>
7+
<img alt="GitHub profile" title="GitHub profile" src="/assets/GitHub-Mark.svg"/>
88
{{/user-link}}
99
</div>
1010

public/assets/GitHub-Mark-32px.png

-1.67 KB
Binary file not shown.

public/assets/GitHub-Mark.svg

Lines changed: 10 additions & 0 deletions
Loading

tests/acceptance/team-page-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ test('github link has image in team header', async function(assert) {
2828
await visit('/teams/github:org:thehydroimpulse');
2929

3030
assert.dom('[data-test-heading] [data-test-github-link] img')
31-
.hasAttribute('src', '/assets/GitHub-Mark-32px.png');
31+
.hasAttribute('src', '/assets/GitHub-Mark.svg');
3232
});
3333

3434
test('team organization details has github profile icon', async function(assert) {

tests/acceptance/user-page-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ test('github link has image in user header', async function(assert) {
2727
await visit('/users/thehydroimpulse');
2828

2929
assert.dom('[data-test-heading] [data-test-user-link] img')
30-
.hasAttribute('src', '/assets/GitHub-Mark-32px.png');
30+
.hasAttribute('src', '/assets/GitHub-Mark.svg');
3131
});
3232

3333
test('user details has github profile icon', async function(assert) {

0 commit comments

Comments
 (0)