new calendar component

Offen
#761 2 Kommentare 11 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Anfängerfreundlichkeit
25/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
javascript, sql
Bereich
frontend, web-dev

Rechercherichtung

Start by comparing sqlpage/templates/chart.handlebars and map.handlebars, then read sqlpage/apexcharts.js and the chart/map component migrations for existing patterns. The proposal also points to the timeline component for color handling and the dynamic component for JSON loading. Done means implementing and integrating the calendar template and JavaScript, registering and documenting its properties, and adding the proposed tests and examples.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

enhancement Winter Of Code 4.0

SQLPage Calendar Component - Technical Design Document

Overview

The Calendar component will allow users to visualize and interact with time-based data in a familiar calendar interface. This document outlines the technical design and implementation strategy.

Component Properties

Top-Level Properties
  1. title (optional)

    • Text displayed above calendar
    • Similar to chart/map components' title implementation
  2. initial_view (optional)

    • Controls initial calendar display format
    • Options: "month", "week", "day"
    • Defaults to "month"
  3. height (optional)

    • Sets fixed calendar height in pixels
    • Similar to chart component's height property
    • Defaults to auto-height
  4. json_url (optional)

    • Enables dynamic event loading
    • Points to SQLPage JSON endpoint
    • Similar to dynamic component's implementation
  5. navigation (optional, boolean)

    • Enables/disables date navigation controls
    • Defaults to true
  6. today (optional, boolean)

    • Shows/hides "Today" button
    • Defaults to true
Row-Level Properties
  1. title (required)

    • Event title text
    • Displayed in calendar cells
  2. start (required)

    • Event start time
    • Supports both date and datetime
  3. end (optional)

    • Event end time
    • Defaults to start time for single-day events
  4. color (optional)

    • Event visual styling
    • Uses SQLPage color system (like chart/timeline components)
  5. url (optional)

    • Click destination
    • Similar to list component's link property
  6. description and description_md (optional)

    • Event details
    • Shown in tooltip/popup
  7. all_day (optional, boolean)

    • Indicates full-day events
    • Affects visual display

Technical Implementation Details

File Structure

Look at these existing files for reference patterns:

  • sqlpage/templates/chart.handlebars - For component template structure
  • sqlpage/apexcharts.js - For JavaScript initialization patterns
  • examples/official-site/sqlpage/migrations/ - For component documentation
Required Changes
  1. Component Registration
  • Location: examples/official-site/sqlpage/migrations/
  • New file: XX_calendar.sql (XX = next number in sequence)
  • Purpose: Register component and document properties
  • Reference: See how chart/map components are documented
  1. Template Creation
  • Location: sqlpage/templates/
  • New file: calendar.handlebars
  • Structure:
    • Card wrapper (like map component)
    • Title section
    • Calendar container
    • Data embedding section
  • Reference: Study map.handlebars for structure
  1. JavaScript Integration
  • Location: sqlpage/
  • New file: calendar.js
  • Key sections:
    • Initialization function
    • Event handling
    • View management
    • Data processing
  • Reference: Study apexcharts.js initialization patterns
Integration Points
  1. JSON API Integration
  • Uses existing JSON component
  • Enables dynamic event loading
  • Reference: Study dynamic component implementation
  1. SQLPage Core Integration
  • Component registration
  • Reference: Study how chart component is integrated
  1. Color System Integration
  • Uses existing SQLPage color system
  • Reference: Study timeline component's color handling

Testing Strategy

  1. Unit Tests
  • Test date handling
  • Validate property processing
  1. Integration Tests
  • Add a spec file to the end to end tests

Documentation

  1. Component Documentation
  • Usage examples
  • Property descriptions
  • Common patterns
  • Location: examples/official-site/sqlpage/migrations/XXX-calendar.sql
  1. Example Application
  • Basic calendar
  • Dynamic calendar
  • Multi-calendar view
  • Location: Create new directory in examples/
Vorherrschende Sprache
Rust
Sterne
2.6k
Forks
175
Ø Merge
14 Std. 16 Min.
Gemergte PRs (30 T.)
43

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus sqlpage/SQLPage

Alle Issues in sqlpage/SQLPage

Ähnliche Issues

Weitere Issues zu Rust

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.