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

Avoid colour indications on outdated channels #95

Merged

Conversation

@turboMaCk
Copy link
Member

@turboMaCk turboMaCk commented Jan 11, 2020

This removes the colour indicator from Last updated labels.
For outdated channels this label is now always grey.

cc @grahamc This is the change we've talked about in DMs on Twitter few days ago.

image

This removes the colour indicator from `Last updated` labels.
For outdated channels this label is now always grey.
@@ -169,12 +169,15 @@ init()
var m = moment.unix(update_times[channel]['update_time']);
jobset['update_time_relative'] = m.fromNow()
jobset['update_time_local'] = m.format()
if (m > moment().subtract(3, 'days')) {
// do not use color indications on outdated channels
if (jobset['current']) {

This comment has been minimized.

@turboMaCk

turboMaCk Jan 11, 2020
Author Member

this condition implements the change.


if (record['job_history'][record['job_history'].length - 1] == 0) {
row.getElementsByClassName("status")[0].innerHTML += '<span class="label label-important">Build problem</span>';
status.innerHTML += '<span class="label label-important">Build problem</span>';

This comment has been minimized.

@turboMaCk

turboMaCk Jan 11, 2020
Author Member

these are just mechanical changes to usage of variables instead of quariing the DOM for the same element multiple times.

  1. lines are now shorter
  2. quering the dom is relatively expesive operation so this is just a sort of micro optimization.

I hope the naming makes sense but please review it. In the end I'm not a native speaker and don't want to confuse others by my poor naming choices.

@turboMaCk
Copy link
Member Author

@turboMaCk turboMaCk commented Feb 19, 2020

ping @grahamc this is ready for merge. Feel free to close PR if you no longer want to see this change.

@turboMaCk turboMaCk requested a review from grahamc Feb 20, 2020
@zimbatm
Copy link
Member

@zimbatm zimbatm commented Feb 21, 2020

/cc @garbas who is re-working the homepage

@domenkozar domenkozar requested a review from garbas Apr 1, 2020
@garbas
garbas approved these changes Sep 16, 2020
Copy link
Contributor

@garbas garbas left a comment

Sorry for late review. @turboMaCk thank you!

@garbas garbas merged commit d0e9eda into NixOS:master Sep 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.