From 521272d624e5306f73c605cd13ec853f54c0aae2 Mon Sep 17 00:00:00 2001 From: guyeisenkot <68634672+guyeisenkot@users.noreply.github.com> Date: Sun, 3 Aug 2025 22:35:38 +0300 Subject: [PATCH] Revert "Sort reviewers by update time with timeline view (#103)" (#104) This reverts commit 7c46447d6d4941ab2dc8d480554bb20a58b4a724. --- Gemfile | 4 +--- Gemfile.lock | 3 --- _config.yml | 1 - _layouts/default.html | 39 --------------------------------------- _layouts/reviewer.html | 9 +-------- assets/css/main.scss | 26 -------------------------- index.html | 5 ++--- 7 files changed, 4 insertions(+), 83 deletions(-) diff --git a/Gemfile b/Gemfile index 4170d1e..87b9524 100644 --- a/Gemfile +++ b/Gemfile @@ -9,7 +9,6 @@ gem "base64" group :jekyll_plugins do gem "jekyll-feed", "~> 0.12" gem "jekyll-sitemap" - gem "jekyll-last-modified-at" end # Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem @@ -24,5 +23,4 @@ gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin] # Lock `http_parser.rb` gem to `v0.6.x` on JRuby builds since newer versions of the gem # do not have a Java counterpart. -gem "http_parser.rb", "~> 0.6.0", :platforms => [:jruby] - +gem "http_parser.rb", "~> 0.6.0", :platforms => [:jruby] \ No newline at end of file diff --git a/Gemfile.lock b/Gemfile.lock index 9993c60..8c8a248 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -72,8 +72,6 @@ GEM webrick (~> 1.7) jekyll-feed (0.17.0) jekyll (>= 3.7, < 5.0) - jekyll-last-modified-at (1.3.2) - jekyll (>= 3.7, < 5.0) jekyll-sass-converter (3.1.0) sass-embedded (~> 1.75) jekyll-seo-tag (2.8.0) @@ -169,7 +167,6 @@ DEPENDENCIES http_parser.rb (~> 0.6.0) jekyll (~> 4.3.0) jekyll-feed (~> 0.12) - jekyll-last-modified-at jekyll-sitemap logger minima (~> 2.5) diff --git a/_config.yml b/_config.yml index 4c55bb4..a40a017 100644 --- a/_config.yml +++ b/_config.yml @@ -19,7 +19,6 @@ collections: plugins: - jekyll-feed - jekyll-sitemap - - jekyll-last-modified-at # Exclude from processing exclude: diff --git a/_layouts/default.html b/_layouts/default.html index 6dca23e..596f9a4 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -510,8 +510,6 @@ // Update URL parameters updateUrlParams(); - - insertTimelineDividers(); } function updateReviewerCount(visible, total) { @@ -572,42 +570,6 @@ }); } - function getRelativeTime(date) { - const now = new Date(); - const diff = now - date; - const hours = diff / 3600000; - const days = Math.floor(diff / 86400000); - if (hours < 1) return 'Last 1 Hour'; - if (hours < 12) return 'Last 12 Hours'; - if (days === 0) return 'Today'; - if (days === 1) return 'Yesterday'; - if (days < 7) return 'Last Week'; - if (days < 14) return 'Last 2 Weeks'; - if (days < 21) return 'Last 3 Weeks'; - if (days < 30) return 'Last Month'; - return date.toLocaleDateString(undefined, { year: 'numeric', month: 'short', day: 'numeric' }); - } - - function insertTimelineDividers() { - const grid = document.querySelector('.reviewer-grid'); - if (!grid) return; - grid.querySelectorAll('.timeline-divider').forEach(el => el.remove()); - const cards = Array.from(grid.querySelectorAll('.reviewer-card')).filter(c => c.style.display !== 'none'); - let lastLabel = ''; - cards.forEach(card => { - const created = card.dataset.created; - if (!created) return; - const label = getRelativeTime(new Date(created)); - if (label !== lastLabel) { - const divider = document.createElement('div'); - divider.className = 'timeline-divider'; - divider.textContent = label; - grid.insertBefore(divider, card); - lastLabel = label; - } - }); - } - // Add event listeners when DOM is loaded document.addEventListener('DOMContentLoaded', function () { if (document.getElementById('search')) { @@ -684,7 +646,6 @@ loadDiscussions(pageSlug); } } - window.addEventListener('resize', insertTimelineDividers); }); function openDrawer(slug) { diff --git a/_layouts/reviewer.html b/_layouts/reviewer.html index f94a8b6..48b25cc 100644 --- a/_layouts/reviewer.html +++ b/_layouts/reviewer.html @@ -28,13 +28,6 @@ layout: default Based on {{ page.comments_count | default: "multiple" }} comments -