Release v1.45.0 - #1811
Conversation
Wraps the dismiss reasons array in apply_filters() so developers can add, remove, or reorder options without modifying core code. Closes #1511 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Falls back to default reasons if a filter callback returns an invalid type, preventing a fatal TypeError from the array return type hint. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Strip any entries missing label/description string keys rather than returning malformed data that would cause fatal errors in render_reason_fieldset(). Falls back to defaults if the validated result is empty. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
[Backport] Release v1.44.1
Remove the sixth plugin tag ("accessibility scanner") from readme.txt so the plugin remains within WordPress.org's 5-tag limit.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…g-tag Remove extra WordPress.org plugin tag
Co-authored-by: pattonwebz <3902039+pattonwebz@users.noreply.github.com>
Co-authored-by: pattonwebz <3902039+pattonwebz@users.noreply.github.com>
Moves focus to the PanelBody toggle button before unmounting the Notice so keyboard users are not left with lost focus when the notice is dismissed. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…accordion-toggle-after-dismiss-notice-cleared Focus accordion toggle before clearing dismiss success notice
* PRO-1081: Make CodeMirror code viewer resizable - Switch .CodeMirror from fixed height: 100px to min-height: 100px so the box starts compact but can be dragged taller - Add max-height: 600px to keep it bounded by default - Set resize: vertical and overflow: hidden to enable the native resize handle (overflow must be non-visible for CSS resize to work; CodeMirror-scroll handles internal scrolling independently) - Add ResizeObserver in CodeMirrorViewer to call cm.refresh() after each drag, keeping line rendering correct after the container height changes Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * PRO-1081: Tighten ResizeObserver — rAF, guard, cancel on cleanup - Default height 160px (down from 320px) - Guard ResizeObserver construction behind window.ResizeObserver check - Wrap refresh() call in requestAnimationFrame to avoid "ResizeObserver loop limit exceeded" errors; cancel pending rAF on unmount Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
…smiss-reasons Set “Confirmed accessible” as first/default dismiss reason
…ns-to-be-filterable-to-add-or
The merge of develop into this branch left a stray "return [" inside the $default_reasons array literal, breaking PHP syntax and failing CI. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…llow-dismiss-reasons-to-be-filterable-to-add-or Add edac_dismiss_reasons filter to allow customizing dismiss options
The DismissPanel and IssueDetailsModal were reading pro status only from window.edac_editor_app, which is only localized on post edit screens. When the issue modal is opened from the Issues Explorer (an admin page), that global is undefined and isPro evaluates to false — hiding the global dismiss dropdown and silently breaking GlobalDismissModal's forceGlobal behaviour. Add a `pro` key to edac_script_vars (available on all admin pages) and update the two isPro checks to fall back to window.edac_script_vars?.pro so pro detection works regardless of which admin context opens the modal. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
issue?.ignre_global is 0 (a number) when not globally dismissed. When user/date/name are also empty strings, the || chain resolves to 0 and React renders it as text. Replace with isGloballyDismissed which is already computed as a boolean from the same field. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Fires after a successful global dismiss or global reopen so add-ons can sync their own storage without requiring changes to this plugin. Passes issue_id, ignre_global (1=dismissed, 0=reopened), and site_id. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
More generic name covers all ignore state changes, not just global ones. Passes a single array with all relevant fields so add-ons have the full context without needing separate lookups. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…l-dismiss-action-hook Add edac_after_global_ignore_change action hook to dismiss_issue endpoint
- Add a unit test verifying the pro flag in edac_script_vars - Wrap DismissPanel's destructured params across multiple lines (line was 200+ chars) - Guard the window reference in IssueDetailsModal's pro check with typeof window !== 'undefined' - Drop the isPro prop passed to DismissPanel since it duplicated the component's own default Co-Authored-By: Claude <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Code Review
This pull request updates the Accessibility Checker plugin to version 1.45.0, introducing a new edac_dismiss_reasons filter to customize dismiss reasons and an edac_after_ignore_change action hook triggered after ignore state changes. In the UI, the CodeMirror viewer is now vertically resizable with automatic refresh handling via a ResizeObserver, and the default dismiss reason has been changed to 'accessible'. Feedback on these changes highlights a potential crash in CodeMirrorViewer.js if the editor is not fully initialized, suggesting the use of optional chaining. Additionally, it is recommended to dynamically resolve the default dismiss reason in DismissPanel.js to prevent issues if the 'accessible' option is filtered out by developers.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| const cmEl = editorRef.current.codemirror.getWrapperElement(); | ||
| let rafId; | ||
| const observer = window.ResizeObserver | ||
| ? new ResizeObserver( () => { | ||
| cancelAnimationFrame( rafId ); | ||
| rafId = requestAnimationFrame( () => editorRef.current?.codemirror?.refresh() ); | ||
| } ) | ||
| : null; | ||
| observer?.observe( cmEl ); |
There was a problem hiding this comment.
If wp.codeEditor fails to initialize or if editorRef.current is null/undefined, calling editorRef.current.codemirror.getWrapperElement() directly will throw a TypeError and crash the React component. We should use optional chaining and verify that the CodeMirror instance exists before attempting to observe it.
| const cmEl = editorRef.current.codemirror.getWrapperElement(); | |
| let rafId; | |
| const observer = window.ResizeObserver | |
| ? new ResizeObserver( () => { | |
| cancelAnimationFrame( rafId ); | |
| rafId = requestAnimationFrame( () => editorRef.current?.codemirror?.refresh() ); | |
| } ) | |
| : null; | |
| observer?.observe( cmEl ); | |
| const cmEl = editorRef.current?.codemirror?.getWrapperElement(); | |
| let rafId; | |
| const observer = window.ResizeObserver && cmEl | |
| ? new ResizeObserver( () => { | |
| cancelAnimationFrame( rafId ); | |
| rafId = requestAnimationFrame( () => editorRef.current?.codemirror?.refresh() ); | |
| } ) | |
| : null; | |
| observer?.observe( cmEl ); |
| const panelRef = useRef( null ); | ||
| const [ comment, setComment ] = useState( issue?.ignre_comment ? decodeEntities( issue.ignre_comment ) : '' ); | ||
| const [ dismissReason, setDismissReason ] = useState( issue?.ignre_reason || 'false_positive' ); | ||
| const [ dismissReason, setDismissReason ] = useState( issue?.ignre_reason || 'accessible' ); |
There was a problem hiding this comment.
Initializing the default dismiss reason to a hardcoded 'accessible' string can cause issues if a developer filters out 'accessible' via the newly introduced edac_dismiss_reasons PHP filter. In that case, the default selected reason will be an option that is not actually available in the UI. Instead, we should dynamically fallback to the first available option from getDismissReasonOptions().
| const [ dismissReason, setDismissReason ] = useState( issue?.ignre_reason || 'accessible' ); | |
| const reasonOptions = getDismissReasonOptions(); | |
| const defaultReason = reasonOptions?.[0]?.value || 'accessible'; | |
| const [ dismissReason, setDismissReason ] = useState( issue?.ignre_reason || defaultReason ); |
Regenerated via wp i18n make-pot against a production dist build, picking up the dismiss-reason reorder (Confirmed accessible now first). Co-Authored-By: Claude <noreply@anthropic.com>
…slations_june-30-2026-21-25-33332358 PTC accessibility-checker (1985): Automatic Translations June 30, 2026 21:25:33332358
…o-detection-in-dismiss-panel-outside-post-editor fix: expose pro status in edac_script_vars and widen isPro checks in DismissPanel
Steve Jones (2):
William Patton (4):