Skip to content

Adds default patterns view setting#47

Merged
ronalfy merged 1 commit into
release/2.5from
feat/default-view
May 7, 2026
Merged

Adds default patterns view setting#47
ronalfy merged 1 commit into
release/2.5from
feat/default-view

Conversation

@ronalfy
Copy link
Copy Markdown
Contributor

@ronalfy ronalfy commented May 7, 2026

Introduces a new user-specific setting to define the default filter for the Patterns Library.

This enhancement allows users to:

  • Set their preferred initial view (e.g., "All Local Patterns", "Synced Patterns") when accessing the Patterns Library without specific URL filters.
  • Improve their workflow by automatically applying a chosen filter, making it quicker to find relevant patterns.

The changes involve:

  • Adding a new UI control in the admin settings for users to select their default view.
  • Storing and retrieving this preference via site-scoped user meta.
  • Implementing logic to dynamically apply the saved default view to the Patterns Library when no explicit filters are present in the URL.
  • Introducing utility functions to manage allowed view slugs, sanitize inputs, and merge view presets into query arguments.

@ronalfy ronalfy self-assigned this May 7, 2026
@ronalfy ronalfy added the enhancement New feature or request label May 7, 2026
@ronalfy ronalfy merged commit c522c91 into release/2.5 May 7, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants