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

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']) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>';
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

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

@zimbatm
Copy link
Member

zimbatm commented Feb 21, 2020

/cc @garbas who is re-working the homepage

@domenkozar domenkozar requested a review from garbas April 1, 2020 23:00
Copy link
Member

@garbas garbas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants