Feat/select specific fields - #12
Open
MarleenEliza wants to merge 9 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a Structured Text field add-on to let admins enable/disable which custom block styles and inline marks are available per field/block, extending the existing plugin-wide custom styles/marks configuration.
Changes:
- Added a manual field extension (add-on) with a configuration UI to select allowed style/mark slugs per Structured Text field.
- Updated Structured Text hooks to filter custom styles/marks based on the configured field add-on parameters (with a fallback when the add-on isn’t present).
- Updated docs/changelog and bumped package version to
2.0.0.
Reviewed changes
Copilot reviewed 12 out of 16 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| src/utils/fieldParameters.ts | Adds parsing for per-field add-on parameters (allowedStyles/allowedMarks). |
| src/main.tsx | Registers the manual field extension and filters provided styles/marks per field. |
| src/global.d.ts | Updates global type definitions for CustomStyle/CustomStyleNode. |
| src/entrypoints/variables.ts | Updates node option typing and expands dummy styles/marks fixtures. |
| src/entrypoints/ManualFieldExtensionConfigScreen.tsx | New UI screen to configure allowed styles/marks per field add-on. |
| src/entrypoints/ManualFieldExtensionConfigScreen.module.css | Styles for the new field add-on configuration UI. |
| src/entrypoints/ConfigScreen.tsx | Adds a “Please Note” section and updates dummy style/mark creation. |
| src/entrypoints/ConfigScreen.module.css | Minor spacing change for the config form. |
| src/components/StyleCard/StyleCard.tsx | Removes unused imports. |
| src/components/MarkCard/MarkCard.module.css | Removes now-unused CSS module file content. |
| README.md | Fixes marks screenshot path and documents the new field add-on settings. |
| package.json | Bumps package version to 2.0.0. |
| package-lock.json | Updates lockfile metadata and dependency sections for the new release. |
| changelog.md | Adds 2.0.0 entry describing the per-field configuration feature. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
solves #10