[pull] main from TryGhost:main - #1459
Merged
Merged
Conversation
ref https://linear.app/ghost/issue/BER-3895 Deciding that a tier asks a buyer for a shipping address and creating the custom fields a site keeps are separate things to hand a publisher, but one flag gated both, so collection could not be turned on for anyone without also giving them the field editor. Configuring collection now rides its own stripeCheckoutCollection flag, covering the tier card's toggles, the route that saves them, and whether a live checkout session asks for anything, while the existing flag keeps governing field management. Where each answer is kept is field management, so the destination pickers stay on the old flag: without it the card is toggles alone and sends whatever is already bound, or the port's default key for the server to create a field under. Those default keys now live beside each port in the shared checkout package, minted from the port's own name so a field arriving this way is indistinguishable from one a publisher made by typing that name.
… flag ref https://linear.app/ghost/issue/BER-3895 Everything that only reads or writes custom field values now follows whether the site defines any fields, rather than asking a flag. That covers filtering members, the columns a filter earns on the list, the section on a member's page, spreadsheet import and export, and storing what a completed checkout collected. A site that defines no fields has no values either, so each of those is empty on its own, which is the question the flag was standing in for and it keeps answering it once the flags are gone. A member's payload is the one deliberate exception: it carries custom fields only where the site has some, because a key added to an API response cannot be taken back later without breaking whoever started reading it. That check counts only fields in use, so archiving the last one returns a member to exactly the shape it had before the site ever defined a field, and it reads through the same decoding as every other read of that table. Creating a field from the import dialog stays behind the field management flag. Screens that merely display or offer definitions share one hook that never raises a load failure to the publisher, since Admin can be running against a server too old to have that endpoint and every one of those screens treats a missing list and an unanswerable one alike.
ref https://linear.app/ghost/issue/BER-3895 Ghost identifies a signed-in reader on every page view of a themed site, and that lookup goes through the same member read the Admin API uses. Asking it whether the site defines any custom fields put a database query on that path for every site, and on a site that does define one it also fetched the values, which both the members API response and the theme's member projection then drop, since each is a fixed list of fields that has never included custom ones. The read now takes an option to leave custom fields off, and the two identity lookups behind a member's own session pass it, which also removes value fetching that was already wasted there beforehand.
no ref Co-authored-by: UserExistsError <23325451+UserExistsError@users.noreply.github.com> Co-authored-by: Steve Larson <9larsons@gmail.com>
no ref Co-authored-by: UserExistsError <23325451+UserExistsError@users.noreply.github.com> Co-authored-by: Steve Larson <9larsons@gmail.com>
no ref Co-authored-by: UserExistsError <23325451+UserExistsError@users.noreply.github.com> Co-authored-by: Steve Larson <9larsons@gmail.com>
no ref Co-authored-by: UserExistsError <23325451+UserExistsError@users.noreply.github.com> Co-authored-by: Steve Larson <9larsons@gmail.com>
no ref Co-authored-by: UserExistsError <23325451+UserExistsError@users.noreply.github.com> Co-authored-by: Steve Larson <9larsons@gmail.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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )