Skip to content

Feat/detach localization from Mongoose - #74

Merged
jmikrut merged 4 commits into
masterfrom
feat/detach-localization-mongoose
Feb 20, 2021
Merged

jmikrut merged 4 commits into
masterfrom
feat/detach-localization-mongoose

Conversation

@jmikrut

@jmikrut jmikrut commented Feb 18, 2021 •

Copy link
Copy Markdown
Member

Description

This PR removes our localization functionality's close reliance on Mongoose via a custom plugin. It greatly improves the control that we have over how localization works and will pave the way for future database support within Payload.

Fixes #71 and #72

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

Type of change

  • New feature (non-breaking change which adds functionality)

Checklist:

  • I have added tests that prove my fix is effective or that my feature works
  • Existing test suite passes locally with my changes

@jmikrut jmikrut changed the title Feat/detach localization mongoose Feat/detach localization from Mongoose Feb 18, 2021
}

if (schemaType.options.unique) {
schemaType.options.sparse = true;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we'll need to set sparse to true in our buildSchema when a field is both unique && localized

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call!

@jmikrut
jmikrut merged commit ad5f070 into master Feb 20, 2021
@denolfe
denolfe deleted the feat/detach-localization-mongoose 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 Aug 12, 2026
…r Blocks fields (v3.85.0.29)

A consuming app wraps a blocks field in BlocksSelectionProvider to put its
rows into selection mode at runtime: BlockRow swaps the drag handle for a
CheckboxInput, suppresses row actions + the collapse toggle/chevron, and
routes header clicks (plus Enter/Space; role=button while selecting) to
toggle(path, rowId, event) — the MouseEvent rides along for shift-range
selection. Rows identify by (parentPath, row.id) so nested blocks fields
participate under one provider. Default context is inactive: fields without
a provider render byte-identically. Selection state lives in the consuming
app; the context is a pure conduit. No admin config flag, no types.ts
change, no import-map impact.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Uth4bhsgToY2kqGdAKfqvb
Dynogic added a commit to Dynogic/payload that referenced this pull request Aug 12, 2026
Payload's .collapsible__header-wrap is pointer-transparent by design (the
full-row toggle button owns clicks). disableHeaderToggle removes that
button in selection mode, leaving the header subtree click-dead — the
row-click toggle could never fire. pointer-events: auto on the wrap while
--selecting restores it.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Uth4bhsgToY2kqGdAKfqvb
Dynogic added a commit to Dynogic/payload that referenced this pull request Aug 12, 2026
Suspending the header toggle made collapsed rows unopenable in selection
mode — a collapsed section's children could not be reached for partial
selection. The selecting header now renders its own small chevron button
(right-aligned) driving setCollapse with stopPropagation: header click
selects, chevron expands, no gesture overlap.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Uth4bhsgToY2kqGdAKfqvb
Dynogic added a commit to Dynogic/payload that referenced this pull request Aug 12, 2026
…headers keep their normal collapse toggle

Live-QA ruling: header click should open/close the block exactly as
without selection mode. The header-click-selects design (and its two
compensating fixups — pointer-events restore, explicit chevron) is
replaced: the stock full-header toggle + chevron stay untouched, the
checkbox wrapper re-enables pointer events above the toggle button (the
SectionTitle-input pattern), and shift-click reaches
toggle(path, rowId, { shiftKey }) via a passive capture ref. Checkbox
vertically centered.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Uth4bhsgToY2kqGdAKfqvb
Dynogic added a commit to Dynogic/payload that referenced this pull request Aug 12, 2026
The stock .checkbox-input is inline-flex inside a text-line header, which
leaves line-box slack; explicit flex+center down the chain plus
line-height: 0 on the wrap centers the box on geometry alone.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Uth4bhsgToY2kqGdAKfqvb
Dynogic added a commit to Dynogic/payload that referenced this pull request Aug 31, 2026
…ader clip

The stock checkbox input is oversized 2px per side, so its focus ring
draws past the visible box; the block header's overflow: hidden sliced it
flush at the left edge. 2px of left margin on the wrap keeps the ring
inside the clip.

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

Editing a richText field is not working

2 participants