Skip to content

Feature/timeline conversion2#593

Merged
martinyde merged 66 commits intodevelopfrom
feature/timeline-conversion2
Feb 25, 2026
Merged

Feature/timeline conversion2#593
martinyde merged 66 commits intodevelopfrom
feature/timeline-conversion2

Conversation

@martinyde
Copy link
Copy Markdown
Contributor

@martinyde martinyde commented Jan 22, 2026

Link to ticket

Please add a link to the ticket being addressed by this change.

  • Add project timeline
  • Add project reference fields to several node types to display on timeline
  • Add paragraph for adding custom elements to timeline
  • Add CLAUDE.md file to project
  • Remove old timeline extension
  • Add fixture for project with timeline

Note

@rimi-itk Code review of hoeringsportal_project module, config and added fixture

  • web/modules/custom/hoeringsportal_project/modules/hoeringsportal_project_fixtures
  • web/modules/custom/hoeringsportal_project

Note

@yepzdk Code review of theme

  • web/themes/custom/hoeringsportal

Note

The audit fail github action will be resoleved seperately

Skærmbillede 2026-01-27 kl  10 53 17 Skærmbillede 2026-01-27 kl  10 52 59 Skærmbillede 2026-01-27 kl  10 52 51

martinyde and others added 19 commits January 21, 2026 13:51
- Replaced hardcoded hex colors with project color tokens
- Removed font-family override to inherit from theme
- Created SCSS mixins for status and accent variant styles
- Used @for loop for z-index declarations
- Replaced magic numbers with SCSS variables
- Converted CSS comments to SCSS comments
- Used SCSS nesting for better organization

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Converted var declarations to const/let
- Replaced function callbacks with arrow functions
- Used template literals for string interpolation
- Extracted magic numbers to named constants (SWIPE_THRESHOLD, etc.)
- Applied optional chaining for null checks
- Used destructuring for cleaner property access
- Used shorthand method syntax in Drupal behavior

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Standardized quote style to double quotes

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Addresses PR review feedback:
- $timeline-max-width: uses lg container (960px)
- Description max-width: uses sm container (540px)
- Legend max-width: uses sm container (540px)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Refactor timeline CSS to follow project conventions
Modernize timeline JavaScript to ES6+ syntax
Planning document for replacing "I gang" with auto-generated "I dag" card
that shows current project status from Drupal field.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Field name: use placeholder (exact field name TBD)
- Empty field behavior: card shown without status text
- Edge cases: card appears as first/last item when outside range
- Convert open questions to resolved questions

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Change status label from "I gang" to "I dag" for current cards
- Auto-generate today card with current date in Danish format
- Insert today card at correct chronological position in timeline
- Determine item status (completed/upcoming) based on date comparison
- Pass project_status field to timeline for status display
- Add min-height (200px) to current card to prevent overlap
- Remove implementation plan document (no longer needed)

The today card displays:
- Status badge: "I dag"
- Date: Current month and year in Danish (e.g., "Januar 2026")
- Title: "Projektstatus"
- Description: Project status from Drupal field (if set)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add demo status text "Åben for borgerindragelse" for prototype
- Hide both title and description when project status is empty
- Add conditional check for title in card template

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Change default view from horizontal to vertical
- Remove opacity (0.6) from upcoming cards to avoid contrast issues

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add $timeline-shadow-default and $timeline-shadow-hover variables
- Apply subtle default shadow (0 2px 4px rgb(0 0 0 / 6%))
- Apply prominent hover shadow (0 4px 12px rgb(0 0 0 / 12%))
- Use consistent shadows on: cards, mini-nav, and timeline dots

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…tag.aarhus.dk into feature/timeline-conversion2
Timeline: Auto-generated 'I dag' card with date-based status
martinyde and others added 10 commits January 26, 2026 10:29
Creates a Timeline Demo Project with:
- Timeline enabled (field_show_timeline = TRUE)
- 4 timeline note paragraphs with varying dates
- References to existing hearing, dialogue, decision, and public meeting fixtures

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add timeline fixtures with demo project
- Add legend component with status labels (#602)
- Skip today marker in carousel slides, show only as dot (#599)
- Reorder horizontal view: dots first, cards, then pager (#601)
- Add clickable dots with month/year labels on horizontal timeline (#600)
- Fix card text content layout for horizontal view (#604)
- Fix action button alignment with flex layout (#603)
- Auto-navigate to latest non-upcoming card on load
- Exclude timeline fields from raw content output

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Assign unique IDs to timeline notes (note-{paragraph_id}) instead of
  empty strings, so each note can be individually tracked
- Improve scroll tracking to ignore hidden horizontal view duplicates
  by checking element dimensions before processing intersection events
- Change scoring algorithm to prefer cards that contain the viewport
  center, ensuring small cards like notes are properly highlighted

Fixes #609

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add comprehensive documentation including project overview, development
commands, architecture details, coding standards, and configuration.
Includes core module descriptions and Docker service information.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
yepzdk and others added 10 commits January 27, 2026 12:30
Added vertical padding to the horizontal line container to prevent
the active/hover scaled dots (1.5x) from being clipped by overflow hidden.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Default to horizontal view on mobile viewports (< 768px)
- Update toggle buttons and panels to reflect viewport-based default
- Add single-column vertical layout for mobile with timeline on left
- Position dots correctly on timeline line with connector to cards

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…d-dots

Add windowed dot navigation on mobile horizontal timeline
- Add determineAccentColor() method for content-type based colors:
  - Green for hearing, decision, dialogue
  - Pink for course, public_meeting
  - Blue for notes
- Improve fixtures with both past and future timeline content
- Fix date handling for different content types in fixtures
- Always apply accent class in timeline cards

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The duplicate require("./accordion.js") statement was accidentally
introduced in commit 720088d. This removes the unnecessary duplicate
import that caused the accordion script to be loaded twice.

Fixes #613

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…te-accordion-import

Remove duplicate accordion.js import
@martinyde martinyde marked this pull request as ready for review January 28, 2026 09:54
@martinyde martinyde requested review from rimi-itk and yepzdk January 28, 2026 10:03
Copy link
Copy Markdown
Contributor

@rimi-itk rimi-itk left a comment

Choose a reason for hiding this comment

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

This is really good! Some suggestions added, some questions asked and a change requested.

Comment thread config/sync/core.entity_form_display.node.dialogue.default.yml Outdated
Comment thread web/modules/custom/hoeringsportal_project/hoeringsportal_project.module Outdated
Comment thread web/modules/custom/hoeringsportal_project/src/Helper/ProjectHelper.php Outdated
Comment thread web/modules/custom/hoeringsportal_project/src/Helper/ProjectHelper.php Outdated
Comment thread web/modules/custom/hoeringsportal_project/src/Helper/ProjectHelper.php Outdated
Comment thread web/modules/custom/hoeringsportal_project/src/Helper/ProjectHelper.php Outdated
Comment thread web/modules/custom/hoeringsportal_project/src/Helper/ProjectHelper.php Outdated
Comment thread web/modules/custom/hoeringsportal_project/src/Helper/ProjectHelper.php Outdated
Comment thread config/sync/field.field.node.course.field_project_reference.yml Outdated
Copy link
Copy Markdown
Contributor

@yepzdk yepzdk left a comment

Choose a reason for hiding this comment

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

Approved, some possible cleanup, might need to be addressed.

Comment thread web/themes/custom/hoeringsportal/assets/timeline-data.json Outdated
martinyde and others added 12 commits January 28, 2026 15:19
…lper.php

Co-authored-by: Mikkel Ricky <rimi@aarhus.dk>
…lper.php

Co-authored-by: Mikkel Ricky <rimi@aarhus.dk>
This commit addresses several issues with the mini-timeline navigation:

1. Remove static "Today" indicator from mini-nav
   - The duplicate indicator at the bottom was confusing since "today"
     already appears as a dot in the timeline list

2. Fix double-click issue for mini-nav dots
   - Added isProgrammaticScroll flag to prevent scroll tracking from
     overriding the active state during smooth scrolling
   - Active state is now set immediately on click, before scrolling starts

3. Fix scroll tracking skipping notes
   - Replaced IntersectionObserver with a scroll event listener
   - The new approach checks ALL cards on every scroll (debounced at ~60fps)
   - This ensures smaller cards like notes are properly detected when
     they're at the viewport center
   - The scoring logic remains the same: cards containing the viewport
     center get highest priority

4. Clean up unused CSS
   - Removed .project-timeline-mini-nav__today* styles

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The file had unresolved git stash conflict markers that caused PHP
parse errors, preventing the hoeringsportal_project_fixtures module's
services from registering in the Drupal container. This broke
fixtures:load because ProjectLandingPageFixture (a sibling service)
was unavailable as a dependency.

- Remove all conflict markers (<<<<<<, =======, >>>>>>>)
- Move comprehensive project fixture code from updateNodeProjectReference()
  to load() where it belongs
- Resolve getDependencies() to include all four fixture dependencies
  needed by the timeline demo
@martinyde martinyde merged commit 7256630 into develop Feb 25, 2026
18 of 21 checks passed
@martinyde martinyde deleted the feature/timeline-conversion2 branch February 25, 2026 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants