Журнал изменений

Журнал изменений

Фильтр и поиск

Всего: 1347 Доступных коммитов | Отфильтровано: 1347 Коммиты | Страница: 35 из 135
09.07.2026
Refactor: geo-ip meta display context
Автор: Eduard Laas | Дата: 22:35 09.07.2026

Geoip::getIpHtml() feeds 20+ call sites: comment/forum/pm meta rows where the IP renders as a green pill, and plain admin/frontend lists. The pill look lived in scoped context CSS; the renderer now signals the meta context explicitly and the last scoped chip rules leave the lite theme.

Core changes:

  1. Renderer (core/classes/geoip.php):
  • getIpHtml(string $ip, bool $meta = false) passes an is_geo_meta flag to the span fragment; default keeps every existing call site unchanged
  1. Meta call sites (core/system.php, core/user.php, modules/forum/index.php):
  • Comments, private message view and forum posts pass meta = true
  1. Fragment (templates/lite/fragments/span.html):
  • is_geo_meta adds sl-chip sl-chip-success ahead of the sl-geo-ip hook
  1. CSS (templates/lite/assets/css/theme.css):
  • Drop the scoped .sl-cargs / .sl-fp-meta geo-ip pill rules
  • Add .sl-chip.sl-geo-ip a { color: inherit } so the inner IP link keeps the chip tone (replaces the two scoped link rules)

Benefits:

  • The last context re-implementation of the chip recipe is gone
  • Display context is an explicit contract instead of CSS scoping

Technical notes:

  • Same accepted chip-metric shift as the date/edit chips: padding 8 -> 11px, gap 4 -> 6px; verified via computed-style probes (only those two diffs)
  • Chip path verified live as moderator on a commented page; plain path is parameter-default identical, admin theme fragment ignores the new flag
  • php -l clean on all touched PHP files
Refactor: changelog buttons on theme sl-but
Автор: Eduard Laas | Дата: 22:32 09.07.2026

The changelog module carried a private button system (sl-changelog-button primary/secondary) that duplicated the role of the theme-wide .sl-but pill. The filter and reset buttons now fall through to the default button class.

Core changes:

  1. Module (modules/changelog/index.php):
  • Drop the is_changelog_primary / is_changelog_secondary flags from the filter and reset button fragments
  1. Emitter (templates/lite/fragments/button.html):
  • Remove both changelog branches; the buttons take the sl-but default
  1. CSS (templates/lite/assets/css/theme.css):
  • Delete the .sl-changelog-button* blocks
  • Rescope the mobile flex rule to .sl-changelog-filter-actions .sl-but so the buttons keep their full-width wrap layout on narrow screens

Benefits:

  • One button component across the theme; changelog stops shipping its own
  • Filter card visuals now follow the theme automatically

Technical notes:

  • Intended visual change confined to the changelog filter card: flat blue buttons become the standard theme pills
  • Verified with desktop and 480px screenshots (layout intact) and php -l
  • Card/commit styling and --sl-changelog-* tokens untouched
Refactor: migrate chip aliases to canonical sl-chip tones
Автор: Eduard Laas | Дата: 22:29 09.07.2026

theme.css kept three ~15-line selector lists only to map ~30 semantic meta names (sl-date, sl-hits, sl-favor, ...) onto the shared chip recipe and its six tones. Emitters now output the canonical classes directly; the semantic names stay in the markup as hooks for JS/htmx and context rules.

Core changes:

  1. Emitters (templates/lite/fragments + partials):
  • span.html, inline-badge.html, date-badge.html, card.html, link.html, comment-action-ajax.html, table-row.html, main-content-item.html, main-carousel-item.html, partials/view.html emit sl-chip plus the tone matching the current rendering
    • Non-link elements keep their alias tone (info/success/warn/danger)
    • Links emit plain sl-chip: the a.alias selector always beat the bare tone list, so every link chip already rendered the success default
    • is_comments skips sl-chip when chip_tone is set to avoid a duplicate class token (voting comments link passes both)
  1. CSS cleanup (templates/lite/assets/css/theme.css):
  • Base, link-default and tone blocks keep only .sl-chip / a.sl-chip / .sl-chip-<tone> selectors; alias selectors removed
  • Dead .sl-news-info selector dropped (no emitter anywhere)
  • Hover block generalized to .sl-chip:has(> a):hover; favourite toggles keep their hook-based hover (spans are clickable via htmx)
  • Context rules untouched: .sl-block-modules .sl-module and the site-card .sl-rate-sites positioning keep working via the retained hooks

Benefits:

  • Chip vocabulary defined once; new meta labels need no CSS edits
  • Markup declares its component explicitly instead of via a CSS alias map

Technical notes:

  • .sl-votes, .sl-coms and .sl-favor remain in the DOM as JS/AJAX hooks (voting live refresh in plugins/system/slaed.js, favourite toggle)
  • Verified: 132 computed-style probes of the post-migration markup are identical to the pre-migration rendering; live home/news/forum pixel diffs confined to dynamic counters; DOM hook classes asserted live
Refactor: forum meta chips on canonical sl-chip
Автор: Eduard Laas | Дата: 22:19 09.07.2026

The forum/comment meta rows re-implemented the chip recipe with scoped selectors (.sl-cargs > *, .sl-fp-meta .sl-grey > *) instead of using the shared chip component. Date and edit badges now come out of the emitter as canonical info chips.

Core changes:

  1. Emitter (templates/lite/fragments/inline-badge.html):
  • is_comment_date and is_topic_edit branches emit sl-chip sl-chip-info
    • sl-topic-post / sl-topic-edit stay in the markup as semantic hooks
    • All three producers (comments, forum posts, private messages) render into the same meta rows, verified before the change
  1. Context CSS (templates/lite/assets/css/theme.css):
  • Drop the scoped pill recipe and tint for date/edit badges
  • Keep a full scoped pill rule for .sl-geo-ip until Geoip::getIpHtml() can signal the meta display context (follow-up package)
  • Remove .sl-topic-post/.sl-topic-edit from the plain-glyph list; those entries were unreachable outside the chip contexts
  • Add a compact rule so date/edit chip glyphs keep the 13px meta size

Benefits:

  • One chip recipe instead of a parallel scoped implementation
  • Emitters own the component classes; contexts stop restyling markup

Technical notes:

  • Accepted micro-shift on these chips only: padding 8px -> 11px and icon gap 4px -> 6px (canonical chip metrics); verified with computed-style probes and live forum topic / comment screenshots
  • Geo-ip pill verified pixel-identical via probes
Refactor: drop sl-thide and .selected legacy vocabularies in lite
Автор: Eduard Laas | Дата: 22:14 09.07.2026

The lite theme carried two redundant state vocabularies: .sl-thide as an exact duplicate of .sl-none (display: none) and a third .selected tab-state class toggled by the shared tab script alongside .sl-is-active and aria-selected. Nothing in templates emits .selected.

Core changes:

  1. Visibility utility (templates/lite):
  • Replace sl-thide with sl-none in menu.html, layouts/bare.html, layouts/admin.html and the is_top_hidden branch of fragments/link.html
  • Drop the .sl-thide rule from theme.css
    • Admin theme untouched: its .sl-thide is a different component (collapsed block + footer icon buttons), verified before scoping
  1. Tab state (plugins/system/slaed.js, templates/lite/assets/css/theme.css):
  • Stop toggling the legacy selected class in the shared tab script and drop it from the initial-tab detection
  • Remove the .sl-tabs-link.selected selector; .sl-is-active and aria-selected remain the canonical pair
    • Safe for the admin theme: its CSS styles only .sl-is-active

Benefits:

  • One visibility utility and one tab-state vocabulary across the lite theme
  • Shared tab script writes only state that stylesheets actually consume

Technical notes:

  • Verified with computed-style probes (only the two intended diffs: the removed .sl-thide rule and the orphaned .selected styling) and a live admin tab-switching run (activation, aria, panel display, clean console)
  • No PHP involved; markup contract (is_top_hidden flag) unchanged
Refactor: merge duplicate CSS blocks in lite theme
Автор: Eduard Laas | Дата: 22:09 09.07.2026

Several components had their declarations split across distant blocks or duplicated outright, hiding the effective values from readers. This change consolidates each component into a single block with zero visual diff.

Core changes:

  1. Buttons (templates/lite/assets/css/theme.css):
  • Merge the .sl-but colour block into the base pill block in the Buttons section
    • hover/active/disabled and htmx-request loader rules moved along with it
    • background shorthand kept before background-clip to preserve the cascade
  1. Radio groups (templates/lite/assets/css/theme.css):
  • Fold the stray .sl-radio-group override (misplaced under the Associations comment) into the primary block
    • Keeps the effective computed values: flex, wrap, centered, gap md
  1. Progress bars (templates/lite/assets/css/theme.css):
  • Move the fill width transition from the voting section into the main .sl-progress-line div block
  1. Popover arrows (templates/lite/assets/css/theme.css):
  • Move --sl-float-arrow-color into the source .sl-tip and .sl-menu panel blocks and drop the late micro-blocks
  1. Misc duplicates (templates/lite/assets/css/theme.css):
  • position: relative moved into the main .sl-block block (vote tools anchor)
  • Early .sl-login-avatar block removed (fully subsumed by the login block)
  • Duplicate flex declarations dropped from .sl-fp-nickname

Benefits:

  • One source of truth per component; no conflicting same-specificity overrides
  • Readers see the real effective values where the component is defined

Technical notes:

  • CSS-only change, verified with computed-style probes (167 probes identical) and full-page screenshot diffs on catalog, home, news and forum pages
  • No markup, PHP or JS involved; no behavior change
Fix: native button reset for sl-but-mini
Автор: Eduard Laas | Дата: 21:57 09.07.2026

Mini chip buttons rendered as native <button> elements picked up the UA border and appearance, breaking the flat 26px pill look shared with anchor-based mini buttons.

Core changes:

  1. Mini chip button base (templates/lite/assets/css/theme.css):
  • Add border: 0 and appearance: none to .sl-but-mini
    • -webkit-appearance included for older WebKit builds
    • Anchor and span variants are unaffected (no UA chrome to reset)

Benefits:

  • Identical rendering for <button>, <a> and <span> mini chip controls

Technical notes:

  • CSS-only change, no markup or PHP involved
  • No backward compatibility impact
Feature: live voting widget with status indicators and count-up
Автор: Eduard Laas | Дата: 18:43 09.07.2026

Ports the approved demo designs into the system: the voting widget gains animated results, live auto-refresh driven by the global live_u config, and unified play/stop status glyphs across every context.

Core changes:

  1. Voting widget (core/system.php, voting-widget/voting-view):
  • Widget wrapped in .sl-vote with data-sl-vote-live/url on active results; is_lead marks the leading answer (trophy follows the max)
  • Result rows expose data-sl-votes/percent; counters wrapped for JS
  • Corner tool cluster: admin gear menu (now also in the block) before the status glyph, aligned to the block title line
  • Dormant go=1 getVotingView dispatcher case now echoes and serves as the live endpoint; closed polls never render live attributes
  1. Status glyphs (voting-home.html, theme.css, lang/*):
  • One 16px glyph everywhere: play-circle (success, pulse) while the poll is active, stop-circle (warning, static) when it has ended
  • Same inline typography as .sl-tip-icon so both pixel-snap alike; poll list rows show the marker before the info tip
  • _VOTING_ACT/_VOTING_LIVE/_VOTING_END constants in six locales
  1. Client mechanics (plugins/system/slaed.js, theme.css):
  • setVoteBlocks: cold-start intro counts bars, percents and vote numbers up from zero; live polling tweens from previous values, moves the lead class and copies the votes/comments chips verbatim
  • Toggle animations honour data-sl-toggle-display; float panels can right-align to their trigger via data-sl-float-align=end and clamp to the trigger instead of the viewport edge
  • Any htmx .sl-but shows the system loading dots while its request is in flight; interactive option rows with accent-color controls
  1. Voting block query (blocks/voting.php):
  • Four display modes collapsed into one prepared query; random mode uses ORDER BY RAND() LIMIT 1 instead of loading every id

Benefits:

  • Polls feel alive without page reloads and respect reduced motion
  • Status is readable at a glance in the block, the module and lists

Technical notes:

  • Live updates re-render fully only when the answer set changes
  • The totals chip updates without digit animation by request
Refactor: user block overhaul, unified state naming, SVG avatar defaults
Автор: Eduard Laas | Дата: 18:41 09.07.2026

Rebuilds the sidebar user block on a universal PHP data contract, fixes four long-standing bugs found along the way and standardises every cookie and frontend session key on the configurable user_c prefix.

Core changes:

  1. User block (blocks/user_info.php, block-user-info.html):
  • Private message counters via one prepared query, cached in the session for 60s and invalidated by deletePrivatCounts() on every mailbox mutation and on logout (core/user.php)
  • Group and points meta line with next-group progress data (ngroup_name/points/pct), groups resolved in a single query
  • Fixes: sidebar login posted user_pass without a CSRF token (never worked), logout pointed at unknown op sl-logout, settings pointed at the account overview, inbox links led to the missing privat module
  • Unread badge .sl-pm-new replaces the autoplay-blocked audio alert
  1. Session summary (core/system.php, session-summary/session-row):
  • Counters aggregated in one query; detail rows load lazily through the new getUserSessionRows endpoint (hx-trigger click once)
  • Table markup replaced with the div grid shared with the admin theme
  • Optional auto-refresh driven by the new live_u config (admin field plus _LIVE_UPD constant in all six admin locales)
  1. State naming and cookies (core/security.php, core/system.php):
  • Cookies and frontend $_SESSION keys follow $conf[user_c]-<feature>; legacy stats_id/shop cookies migrated with one-release fallbacks
  • Cart links carry the CSRF token the go=2 gate demanded (the cart was silently broken); emptying the cart now clears cookie and superglobal
  1. Avatar defaults (core/user.php, uploads/avatars/default):
  • getUserAvatarUrl() is the single resolver: user.svg, guest.svg and deleted.svg replace the 0/00.gif magic strings across seven call sites; registration stores an empty avatar and the resolver decides
  • Avatar gallery accepts .svg and excludes system files by name

Benefits:

  • Sidebar login, logout and cart actually work again
  • One config knob (live_u) will drive every live block
  • Distribution-safe: pure PHP, no server-specific rules

Technical notes:

  • getCookies() filters to [a-zA-Z0-9_-]; base64 cookies are read from $_COOKIE directly with the user_c prefix
  • Old default/00.gif rows in the users table fall back gracefully
Demo: interactive design labs for user and voting blocks
Автор: Eduard Laas | Дата: 18:41 09.07.2026

Adds six standalone HTML showcases used to iterate on the sidebar user block and the voting widget before porting the chosen designs into the lite theme.

Core changes:

  1. User block labs (demo/user-block-*.html):
  • 42 full-block variants: logged-in, guest, geo details and 2026 trends
    • surfaces (glassmorphism, liquid glass, neumorphism), bento, density
    • live session feed, accordions, group-progress ring, drag constructor
  • All variants reuse real block data and lite theme tokens/classes
  1. Voting block lab (demo/voting-block.html):
  • 17 variants for form and results states on the real widget anatomy
    • system-markup section with effects layered on sl-* selectors only
    • merged live variant that became the shipped widget behaviour

Benefits:

  • Design decisions reviewed in-browser against real markup before touching templates
  • Serves as a reference gallery for future block redesigns
Хотите опробовать SLAED CMS в действии?
Идеи и предложения
Обратная связь
Подтверждение

Поделиться
QR-код

Предварительный просмотр