Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ jobs:

- name: 💬 Comment PR with results
if: github.event_name == 'pull_request'
uses: actions/github-script@v7
uses: actions/github-script@v8
with:
script: |
const fs = require('fs');
Expand Down
62 changes: 31 additions & 31 deletions .github/workflows/frontend-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,37 +23,37 @@ jobs:
test:
name: Run JavaScript Tests
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18, 20]

steps:
- name: 📂 Checkout repository
uses: actions/checkout@v5

- name: 🟢 Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'

- name: 📦 Install dependencies
run: |
npm ci
# Also install optional reporter if needed
npm install jest-html-reporter --save-dev || true

- name: 🧪 Run unit tests
run: npm test -- --coverage --ci --maxWorkers=2
env:
CI: true

- name: 📊 Generate coverage report
if: matrix.node-version == '20' # Only run coverage on one version
run: |
npm run test:coverage || true

- name: 📤 Upload coverage to Codecov
if: matrix.node-version == '20'
uses: codecov/codecov-action@v5
Expand All @@ -62,7 +62,7 @@ jobs:
flags: frontend
name: frontend-coverage
fail_ci_if_error: false

- name: 📋 Upload test results
if: always()
uses: actions/upload-artifact@v4
Expand All @@ -72,27 +72,27 @@ jobs:
coverage/
test-report.html
retention-days: 7

- name: 💬 Comment PR with results
if: github.event_name == 'pull_request' && matrix.node-version == '20'
uses: actions/github-script@v7
uses: actions/github-script@v8
with:
script: |
const fs = require('fs');
let coverageText = '📊 **Frontend Test Coverage Report**\n\n';

try {
// Try to read coverage summary if it exists
const coveragePath = './coverage/coverage-summary.json';
if (fs.existsSync(coveragePath)) {
const coverage = JSON.parse(fs.readFileSync(coveragePath, 'utf8'));
const total = coverage.total;

coverageText += '| Metric | Coverage | Status |\n';
coverageText += '|--------|----------|--------|\n';

const getStatus = (pct) => pct >= 80 ? '✅' : pct >= 70 ? '⚠️' : '❌';

coverageText += `| Lines | ${total.lines.pct}% | ${getStatus(total.lines.pct)} |\n`;
coverageText += `| Statements | ${total.statements.pct}% | ${getStatus(total.statements.pct)} |\n`;
coverageText += `| Functions | ${total.functions.pct}% | ${getStatus(total.functions.pct)} |\n`;
Expand All @@ -103,19 +103,19 @@ jobs:
} catch (error) {
coverageText += `⚠️ Could not parse coverage report: ${error.message}\n`;
}

// Find and update or create comment
const { data: comments } = await github.rest.issues.listComments({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
});
const botComment = comments.find(comment =>
comment.user.type === 'Bot' &&

const botComment = comments.find(comment =>
comment.user.type === 'Bot' &&
comment.body.includes('Frontend Test Coverage Report')
);

if (botComment) {
await github.rest.issues.updateComment({
owner: context.repo.owner,
Expand All @@ -135,22 +135,22 @@ jobs:
lint-js:
name: Lint JavaScript
runs-on: ubuntu-latest

steps:
- name: 📂 Checkout repository
uses: actions/checkout@v5

- name: 🟢 Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'

- name: 📦 Install ESLint
run: |
npm install --save-dev eslint
npm install --save-dev eslint-plugin-jest || true

- name: 🔍 Run ESLint
run: |
npx eslint static/js/*.js --ignore-pattern "*.min.js" || true
Expand All @@ -160,42 +160,42 @@ jobs:
name: Integration Tests
runs-on: ubuntu-latest
needs: test

steps:
- name: 📂 Checkout repository
uses: actions/checkout@v5

- name: 🟢 Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'

- name: 💎 Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'
bundler-cache: true

- name: 📦 Install dependencies
run: |
npm ci
bundle install

- name: 🏗️ Build Jekyll site
run: |
bundle exec jekyll build
env:
JEKYLL_ENV: test

- name: 🧪 Run integration tests
run: |
npm run test:integration || echo "No integration tests yet"
continue-on-error: true

- name: 📤 Upload built site
uses: actions/upload-artifact@v4
with:
name: built-site
path: _site/
retention-days: 1
retention-days: 1
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -176,4 +176,3 @@ utils/tidy_conf/data/.tmp/

# Node modules
node_modules/

2 changes: 1 addition & 1 deletion _config.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,4 @@ force_polling: false
# Ensure JavaScript files are always fresh
sass:
style: expanded # Easier to debug
sourcemap: never # Don't generate sourcemaps
sourcemap: never # Don't generate sourcemaps
2 changes: 1 addition & 1 deletion _config_dev.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Development configuration - single language only
languages: ["en"]
languages: ["en"]
6 changes: 3 additions & 3 deletions _includes/action_bar.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<!-- Check if conference is saved/series followed (would come from JavaScript) -->

<!-- Desktop: Colored Line Indicator -->
<div class="action-indicator"
<div class="action-indicator"
role="button"
tabindex="0"
data-conf-id="{{ conf_id }}"
Expand Down Expand Up @@ -53,8 +53,8 @@
</div>

<!-- Mobile: Bookmark Button -->
<button class="mobile-action-bookmark"
<button class="mobile-action-bookmark"
data-conf-id="{{ conf_id }}"
aria-label="Save conference">
<i class="far fa-bookmark"></i>
</button>
</button>
2 changes: 1 addition & 1 deletion _includes/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ function update_filtering(data) {
} else {
// Fallback for legacy support
console.warn('ConferenceFilter module not loaded, using legacy filtering');

// Defensive check for data parameter
if (!data || typeof data !== 'object') {
console.error('update_filtering called with invalid data:', data);
Expand Down
16 changes: 8 additions & 8 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</head>
<body>
{% include header.html %}

{% if page.show_masthead %}
{% capture masthead_title %}
{% if page.masthead_title %}
Expand All @@ -19,36 +19,36 @@
{% t page.title %}
{% endif %}
{% endcapture %}

{% capture masthead_hook %}
{% if page.masthead_hook %}
{{ page.masthead_hook }}
{% endif %}
{% endcapture %}

{% capture masthead_description %}
{% if page.masthead_description %}
{{ page.masthead_description }}
{% endif %}
{% endcapture %}

{% include masthead.html url=page.url title=masthead_title hook=masthead_hook description=masthead_description %}
{% endif %}

<div class="container" id="main-content">
{{ content }}
</div>

{% if page.extra_js %}
{% for js in page.extra_js %}
<script type="text/javascript" src="{{ js | prepend: site.baseurl_root }}?t={{site.time | date: '%s'}}"></script>
{% endfor %}
{% endif %}

{% if page.include_footer %}
<footer>{% include_cached footer.html %}</footer>
{% else %}
{% include sneks.html %}
{% endif %}
</body>
</html>
</html>
2 changes: 1 addition & 1 deletion _layouts/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@
{{ content }}

<!-- Consolidated Conference Filtering -->
<script type="text/javascript" src="{{ "/static/js/conference-filter.js" | prepend:site.baseurl_root }}?t={{site.time | date: '%s'}}"></script>
<script type="text/javascript" src="{{ "/static/js/conference-filter.js" | prepend:site.baseurl_root }}?t={{site.time | date: '%s'}}"></script>
2 changes: 1 addition & 1 deletion _layouts/page.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
layout: default
---

{{ content }}
{{ content }}
4 changes: 2 additions & 2 deletions _pages/my-conferences.html
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ <h6>Quick Subscribe</h6>
<div class="col-md-6">
<h2>My Conference Dashboard</h2>
<p class="text-muted">
<span id="conference-count">0</span> favorite conferences |
<span id="conference-count">0</span> favorite conferences |
<span id="series-count">0</span> series subscriptions
</p>
</div>
Expand Down Expand Up @@ -266,4 +266,4 @@ <h6>Series Notifications:</h6>
<!-- Toasts will be added here dynamically -->
</div>


4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
{% assign confs = site.data.conferences | sort: "cfp" | reverse %}
{% for conf in confs %}
{% assign subs = conf.sub | split: "," %}
<div id="{{conf.conference | slugify: "latin"}}-{{conf.year}}"
<div id="{{conf.conference | slugify: "latin"}}-{{conf.year}}"
class="ConfItem {% for sub in subs %} {{sub | strip}}-conf {% endfor %}"
data-conf-id="{{conf.conference | slugify: "latin"}}-{{conf.year}}"
data-conf-name="{{conf.conference}}"
Expand Down Expand Up @@ -43,7 +43,7 @@ <h1 id="archive-link"><a href="{% tl archive %}">{% t titles.visit_archive %}</a
</div>
<br><br>
</div>

<script type="text/javascript" charset="utf-8">
// Global conference data for lazy loading
window.conferenceData = window.conferenceData || {};
Expand Down
Loading
Loading