Skip to content

fix: infinite loop caused within block component - #78

Merged
jmikrut merged 1 commit into
masterfrom
fix/block-conditional
Feb 20, 2021
Merged

jmikrut merged 1 commit into
masterfrom
fix/block-conditional

Conversation

@jmikrut

@jmikrut jmikrut commented Feb 20, 2021

Copy link
Copy Markdown
Member

Description

Fixes #77 - wow. We were setting default values for the labels prop within the Blocks component itself, which would cause the memoizedValidate callback to be recreated every render. Voila, infinite loop.

  • I have read and understand the CONTRIBUTING.md document in this repository

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • Existing test suite passes locally with my changes

@jmikrut
jmikrut merged commit d343add into master Feb 20, 2021
@denolfe
denolfe deleted the fix/block-conditional branch July 7, 2022 02:37
yashrajsharan18 added a commit to yashrajsharan18/payload that referenced this pull request Aug 8, 2026
Dynogic added a commit to Dynogic/payload that referenced this pull request Sep 1, 2026
…slug, SSR-correct, condition-aware)

Supersedes payloadcms#8/payloadcms#57 and the hash halves of payloadcms#64/payloadcms#70. A typed `slug` on
NamedTab/UnnamedTab; one derivation (useSearchParams → condition-aware
first slug match → local click → first visible) replaces the four hash
mechanisms, so the addressed tab is in the SSR HTML. replaceState with the
payloadcms#70 identical-URL guard; payload-tab-change fires on every derived change;
admin:hashchange retired. Post-create redirects (client + server) keep
?tab=. hideTabs keys off slug.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LgB5YKnaKZqEP6goS2cNbo
Dynogic added a commit to Dynogic/payload that referenced this pull request Sep 5, 2026
… and tabs, stamped as data-width-tier

A collection/global declares its document view's width tier
(form 950 | wide 1280 | editor 1600 | fullbleed) via admin.custom.widthTier;
a tab overrides it while active via tab.admin.custom.widthTier.
DocumentFields stamps the resolved tier on .document-fields (never inside a
drawer, never in the live-preview pane); TabContent stamps the active tab's
tier on its content div (SSR-correct via payloadcms#78) and finally applies
tab.admin.className. SCSS caps + centers .document-fields, letting any
descendant stamp override the root's tier (widest wins); the form tier
fixes a 638px fields column beside a reserved side column. Tokens
(--page-width-*, --page-fields-column) are the consuming app's, px
references as fallbacks. Shared helpers exported from payload/shared.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01T5GJo9SrABCxiZpYHWzrHg
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.

Adding conditional to blocks field type causes admin UI to hang

1 participant