You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(timeline): restore point config sync with number of posts - #162
Re-applies the BlockEdit changes that were reverted by 4deb32f: building the config for the new count so existing points keep their settings and only new points get defaults, and repairing short saved configs when the block loads.
Description
Type of change
Bug fix (fix:)
New feature (feat:)
Breaking change (BREAKING CHANGE:)
Refactor / chore (refactor: / chore:)
Documentation update (docs:)
Affected package(s)
@devgateway/dvz-wp-commons
@devgateway/create-wp-customizer
@devgateway/upgrade-wp-customizer
plugins/wp-react-blocks-plugin
plugins/wp-react-custom-api
plugins/wp-react-custom-rest-menu
Other plugin / theme / Docker (no changeset needed)
Re-applies the BlockEdit changes that were reverted by 4deb32f: building the
config for the new count so existing points keep their settings and only new
points get defaults, and repairing short saved configs when the block loads.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
An active moderate issue remains because the builder’s defaults omit tooltipFontColor, causing repaired or newly added points to have an undefined tooltip color instead of the established default.
Restores synchronization between timeline post counts and per-point configuration, preserving existing settings, generating defaults for new points, and repairing incomplete saved configurations.
Changes:
Adds buildConfig helpers to both timeline block editors.
Rebuilds point configuration when the post count changes.
Repairs incomplete saved configurations when blocks load.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Both timeline block implementations leave oversized configs unnormalized, so their saved attributes can remain inconsistent with count and retain stale entries.
This only repairs configs that are shorter than count; a config with extra entries is left unchanged, so the saved attribute still does not match the count even though buildConfig promises an exact-length result. This occurs with the registered defaults (8 config entries but a default count of 7), and can also revive stale settings if a block was previously saved with a larger count. Normalize whenever the length differs from count (and persist the trimmed result).
This only repairs configs that are shorter than count; a config with extra entries is left unchanged, so the saved attribute still does not match the count even though buildConfig promises an exact-length result. This occurs with the registered defaults (8 config entries but a default count of 7), and can also revive stale settings if a block was previously saved with a larger count. Normalize whenever the length differs from count (and persist the trimmed result).
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
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.
Re-applies the BlockEdit changes that were reverted by 4deb32f: building the config for the new count so existing points keep their settings and only new points get defaults, and repairing short saved configs when the block loads.
Description
Type of change
fix:)feat:)BREAKING CHANGE:)refactor:/chore:)docs:)Affected package(s)
@devgateway/dvz-wp-commons@devgateway/create-wp-customizer@devgateway/upgrade-wp-customizerplugins/wp-react-blocks-pluginplugins/wp-react-custom-apiplugins/wp-react-custom-rest-menuChecklist
pnpm buildpasses locally