Skip to content

Release v1.45.0 - #1811

Merged
pattonwebz merged 63 commits into
mainfrom
release/1.45.0
Jun 30, 2026
Merged

Release v1.45.0#1811
pattonwebz merged 63 commits into
mainfrom
release/1.45.0

Conversation

@pattonwebz

Copy link
Copy Markdown
Member

Steve Jones (2):

  • Set "Confirmed accessible" as first/default dismiss reason
  • Add edac_dismiss_reasons filter to allow customizing dismiss options

William Patton (4):

  • [Backport] Release v1.44.1
  • Remove extra WordPress.org plugin tag
  • Focus accordion toggle before clearing dismiss success notice
  • Add edac_after_global_ignore_change action hook to dismiss_issue endpoint

SteveJonesDev and others added 26 commits May 28, 2026 20:07
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>
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
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>
@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 1462edac-4fce-4349-a093-45c700a450ef

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch release/1.45.0

Comment @coderabbitai help to get the list of available commands.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +50 to +58
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 );

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

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.

Suggested change
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' );

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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().

Suggested change
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 );

pattonwebz and others added 2 commits June 30, 2026 22:19
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>
PTC and others added 28 commits June 30, 2026 21:25
…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
@pattonwebz
pattonwebz merged commit dc7ced7 into main Jun 30, 2026
26 checks passed
@github-actions github-actions Bot mentioned this pull request Jun 30, 2026
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants