mirror of
https://github.com/discourse/discourse.git
synced 2026-08-11 02:59:07 +08:00
Stacked on #42469 — review that one first. This PR's diff against `main` will show both; the second commit is the one to look at. None of the code removed here was reachable. ### Stylesheets - FullCalendar v4 class names (`.fc-unthemed`, `.fc-list-item-add-to-calendar`) left behind by the v6 upgrade - The pre-Glimmer `widget-dropdown` blocks, in two places - `.event-invitees .header` and its subtree — the component has never rendered a `.header` child. It was `display: none` on itself, which is the tell. - `.event-actions .event-status` — a descendant selector, but both class names have always been on the *same* element, so it has never matched - `&.auto` / `&.small` / `&.medium` / `&.large` on `.group-timezones` — the markdown rule emits `data-size`, and the sanitiser allowlist permits only that attribute, so the class form is unreachable even in old cooked HTML - `.invitee .status`, `.combo-box.user-timezone`, `.event-dates .participants`, `.event-dates .separator`, and a few other selectors with no emitter ### JavaScript `event-relative-date` is the one worth a look. Its initializer ran a 60 second timer for the lifetime of the page to recompute `.event-relative-date.topic-list` elements — but the component that renders that class has never emitted `topic-list`, so every tick walked an empty NodeList. Removing the initializer takes the recurring timer with it. The rest have no callers: a helper, a model, an options builder and an empty route/controller pair that nothing imports, plus three getters in the event builder that are shadowed by the compact editor's own copies. ### Ruby The `EventStarted` job is never enqueued — the `DiscourseEvent` it triggers is fired directly by `monitor_event_dates`. ### How this was checked Every candidate was checked against dynamic class construction (`concat`, template literals, BEM helpers), cooked post HTML and the markdown sanitiser allowlists, third-party DOM (FullCalendar, chat, core), and both shipped themes, before being removed. Anything that could not be positively ruled out was left in place. 261 JS tests and the plugin's system, job and model specs pass. Three failures in the suite reproduce identically on a clean checkout — two are local test-database pollution and one is a local ImageMagick font issue. ### Deliberately left alone - Serializer attributes (`is_ongoing`, `is_private`, `is_public`, `capacity`) — externally visible API, a local grep can't clear them - The `split_grouped_events_by_timezone_threshold` site setting — needs the deprecation path - ~16 apparently unused i18n keys — worth a separate pass, since a couple need per-key checks against similarly named symbols and there are translation-sync implications - Two `replaceIcon` notification registrations — removing a live one silently breaks an icon for no gain
21 lines
280 B
SCSS
Vendored
21 lines
280 B
SCSS
Vendored
.discourse-post-event {
|
|
.discourse-post-event-widget {
|
|
border-width: 1px;
|
|
}
|
|
|
|
.event-dates {
|
|
.date {
|
|
max-width: 75vw;
|
|
}
|
|
}
|
|
|
|
.event-invitees-status {
|
|
font-size: var(--font-down-1);
|
|
}
|
|
|
|
.creators {
|
|
.created-by {
|
|
display: none;
|
|
}
|
|
}
|
|
}
|