Skip to content

refactor: serve hide CSS from eejsBlock_styles via hideCSS helper#89

Merged
JohnMcLear merged 1 commit into
mainfrom
chore/adopt-hidecss-helper
May 10, 2026
Merged

refactor: serve hide CSS from eejsBlock_styles via hideCSS helper#89
JohnMcLear merged 1 commit into
mainfrom
chore/adopt-hidecss-helper

Conversation

@JohnMcLear
Copy link
Copy Markdown
Member

Moves the hide-error-gritter CSS from a client-side postAceInit hook (which appends a <style> to <body> after editor init) to a server-side eejsBlock_styles hook via hideCSS() from ep_plugin_helpers.

Behavioral improvement: the CSS is now in the initial HTML response, so error notifications are hidden from the very first paint. The previous approach left a brief window between page load and postAceInit where errors could flash on screen.

Selector and display rule are unchanged.

Wave 4 of the Phase 4 sweep.

Previously this plugin injected the gritter-error CSS client-side
from postAceInit, which means error notifications could briefly
flash on screen between page load and editor init. Switching to
server-side eejsBlock_styles via the hideCSS helper from
ep_plugin_helpers makes the CSS available with the initial
HTML response, so errors are hidden from the very first paint.

Behavioral changes:
- Drops the static/js/disable_error_messages.js client file in
  favor of a server index.js.
- Updates ep.json to reflect the hook move (client_hooks.postAceInit
  → hooks.eejsBlock_styles).
- Same selector (#gritter-container > .error), same display: none
  rule.
@qodo-code-review
Copy link
Copy Markdown

ⓘ You've reached your Qodo monthly free-tier limit. Reviews pause until next month — upgrade your plan to continue now, or link your paid account if you already have one.

@JohnMcLear JohnMcLear merged commit e280ae0 into main May 10, 2026
3 checks passed
@JohnMcLear JohnMcLear deleted the chore/adopt-hidecss-helper branch May 10, 2026 13:44
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.

1 participant