Skip to content

Show clear feedback when snippet activation fails #516

Description

@code-snippets-bot

Problem

When activation fails because a snippet contains invalid code, the activation switch on the snippets table may appear enabled temporarily without explaining that the snippet remains inactive. Opening the snippet afterward shows that it was not activated.

Forum report: https://wordpress.org/support/topic/issue-related-to-the-the-snippet-toggle-button-behavior/

Expected behavior

  • A snippet that fails validation remains visibly inactive.
  • The switch returns immediately to its confirmed state.
  • A clear, actionable notice explains that activation failed and no activation change was made.
  • Activation and deactivation failures provide consistent feedback in both table and card views.
  • Bulk actions report partial failures rather than silently ignoring them.

Related implementation

PR #488 adds user-facing feedback for failed snippet actions on the management screen.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions