Replace remaining Select2 and jquery-timeago uses with native equivalents. - #2010
Open
shadyvb wants to merge 1 commit into
Open
Replace remaining Select2 and jquery-timeago uses with native equivalents.#2010shadyvb wants to merge 1 commit into
shadyvb wants to merge 1 commit into
Conversation
…ents (XWPENG-55)
Roll the native-select pattern out from the records filter screen to
every remaining Select2 consumer, and drop both frontend dependencies:
- Form_Generator: `select2` field becomes `grouped_select`, a native
<select> that keeps the previous flat parent+children markup and adds
optgroup support for value-less group headers. Only the fixes new
callers require are included (array-value preselection, placeholder
option text, aria-labels).
- Settings exclude rules: author/role is one native select with
Roles/Users optgroups (all users + super-admins + WP-CLI, matching the
previous Ajax dropdown's result set); stored values for deleted users
still render as "N/A"; the IP rule is a plain comma-separated text
input, and Log::record_matches_rules() trims list entries so spaced
input still matches. The unused stream_get_users and stream_get_ips
Ajax actions are removed.
- Alert triggers: author/connector/context/action render native
selects; the preload cap returns with the Ajax combobox in a
follow-up commit.
- Relative timestamps use a new Intl.RelativeTimeFormat helper
(locale-aware via document language) with the previous presentation:
bold relative string alongside the absolute date.
- select2, timeago, and copy-webpack-plugin leave package.json; the
bundled vendor copies no longer ship in build/.
- The predefined date-range select shows its "All Time" placeholder
option again (Select2 used to render it; the native select had an
empty one).
Also regenerate an alert's list title ("Author > Context > Action")
whenever its triggers are edited. Previously the title was built once
at creation, so Quick-Editing an alert kept showing the original
author in the list even though the saved trigger had changed.
Note: also sets `creatable` on one Alerts_Admin_UI unit-test mock,
unbreaking the suite after the webhook alert commit added that property.
shadyvb
added this pull request to stack #1987
September 10, 2026 13:58
5 tasks
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes XWPENG-55.
Rolls the native-select pattern from the records filter screen to every remaining Select2 consumer, and drops both frontend dependencies (select2, jquery-timeago).
select2field becomesgrouped_select(flat parent+children markup plus optgroup support).stream_get_users/stream_get_ipsAjax actions are removed.Stacked on #2009.
Test plan