Rework forms, statistics, design and the sidebar foot in 1.15.0
CMS quality / php (8.2) (push) Canceled after 0s
CMS quality / php (8.4) (push) Canceled after 0s
CMS quality / browser (push) Canceled after 0s
CMS quality / mysql (push) Canceled after 0s

Forms are an editor now: one card per field with add and remove, the
technical name derived from the label, options only for a choice, and a
new "Aussehen" section with a button label and four colours (field border
and background, button and button text) that travel to the page as one
rule per form inside the hashed style block. A live preview draws the
form with the site's default button and names the text contrast.

Statistics open with six figures (views against the same span before,
average per day, busiest day, pages, referred views, missing addresses),
a chart with grid lines and a title per bar, a weekday chart and ranked
lists with share bars. The design screen shows the palette as colour
cards with seven ready-made palettes, picks the base colours from the
palette, previews every font in itself and the typography as a sample.
The sidebar ends in an account card with role and a logout icon.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
kantarciandClaude Fable 5.1 committed 2026-09-15 07:59:30 +02:00
1 parent a4ee04533c
commit 160c394c3f
25 files changed
+1293 -278

No files matched your search

+34
View File
@@ -156,6 +156,40 @@ final class StatisticsTest extends TestCase
// The hours are summed over the whole range, so both days contribute to 14:00.
self::assertSame(5, $overview['hours'][14]['count']);
self::assertCount(24, $overview['hours']);
// Die Summen, die eine Zahl einordnen: nichts davor, der staerkste Tag ist heute, eine
// Adresse lief ins Leere, vier Aufrufe kamen ueber einen Verweis, zwei Seiten wurden gesehen.
self::assertSame(0, $overview['previousTotal']);
self::assertSame('2026-09-12', $overview['busiestDay']);
self::assertSame(1, $overview['missingTotal']);
self::assertSame(4, $overview['referred']);
self::assertSame(2, $overview['pageCount']);
// Der 12.09.2026 ist ein Samstag, drei Tage davor ein Mittwoch; jeder Wochentag kommt in
// sieben Tagen genau einmal vor, der Schnitt ist also die Summe.
self::assertCount(7, $overview['weekdays']);
self::assertSame(['weekday' => 6, 'count' => 4, 'average' => 4.0], $overview['weekdays'][5]);
self::assertSame(['weekday' => 3, 'count' => 1, 'average' => 1.0], $overview['weekdays'][2]);
self::assertSame(0.0, $overview['weekdays'][0]['average']);
}
public function testTheOverviewComparesWithTheSameLengthOfTimeBefore(): void
{
// Three views eight to ten days ago lie in the seven days before a seven-day range.
foreach ([8, 9, 10] as $daysAgo) {
$this->stats->record('/', 200, '', 'kant-it.de', $this->now->modify(sprintf('-%d days', $daysAgo)));
}
// And one 14 days ago is already outside that comparison window.
$this->stats->record('/', 200, '', 'kant-it.de', $this->now->modify('-14 days'));
$this->stats->record('/', 200, '', 'kant-it.de', $this->now);
$overview = $this->stats->overview(7, $this->now);
self::assertSame(1, $overview['total']);
self::assertSame(3, $overview['previousTotal']);
// A 404 in the period before does not count as a view there either.
$this->stats->record('/weg', 404, '', 'kant-it.de', $this->now->modify('-9 days'));
self::assertSame(3, $this->stats->overview(7, $this->now)['previousTotal']);
// Without a single view there is no busiest day to point at.
self::assertNull($this->stats->overview(3, $this->now->modify('-30 days'))['busiestDay']);
}
public function testOlderDaysAreCompactedAndTheOldestAreRemoved(): void