-
Notifications
You must be signed in to change notification settings - Fork 1
Clean up how we use links #892
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Preview deployment: https://link-cleanup.preview.avy-fx.org |
82800b8 to
26333bc
Compare
Migration Safety CheckFound 8 potential issues: 20260128_213937_rename_appearance_to_variant.ts Warning (line 6): ALTER keyword detected - review for data loss sql`ALTER TABLE \`home_pages_blocks_link_preview_cards\` RENAME COLUMN "button_appearance" TO "button_variant";`,Warning (line 6): RENAME keyword detected - review for data loss sql`ALTER TABLE \`home_pages_blocks_link_preview_cards\` RENAME COLUMN "button_appearance" TO "button_variant";`,Warning (line 9): ALTER keyword detected - review for data loss sql`ALTER TABLE \`_home_pages_v_blocks_link_preview_cards\` RENAME COLUMN "button_appearance" TO "button_variant";`,Warning (line 9): RENAME keyword detected - review for data loss sql`ALTER TABLE \`_home_pages_v_blocks_link_preview_cards\` RENAME COLUMN "button_appearance" TO "button_variant";`,Warning (line 12): ALTER keyword detected - review for data loss sql`ALTER TABLE \`pages_blocks_link_preview_cards\` RENAME COLUMN "button_appearance" TO "button_variant";`,Warning (line 12): RENAME keyword detected - review for data loss sql`ALTER TABLE \`pages_blocks_link_preview_cards\` RENAME COLUMN "button_appearance" TO "button_variant";`,Warning (line 15): ALTER keyword detected - review for data loss sql`ALTER TABLE \`_pages_v_blocks_link_preview_cards\` RENAME COLUMN "button_appearance" TO "button_variant";`,Warning (line 15): RENAME keyword detected - review for data loss sql`ALTER TABLE \`_pages_v_blocks_link_preview_cards\` RENAME COLUMN "button_appearance" TO "button_variant";`,Review these patterns and add backup/restore logic if needed. See |
* use type guard instead of type assertions * updating type assertion record
3c38947 to
8d46264
Compare
…ig variants (#900) Co-authored-by: rchlfryn <rachelafryan@gmail.com>
Description
This PR cleans up for we use
ButtonandCMSLinkcomponents. We currently use buttons in 3 different ways:From the linked issue:
I assume the second part of this is referring to Posthog events. All link clicks are autocaptured by posthog.
Related Issues
Resolves #685
Resolves #753
Key Changes
ButtonLinkcomponent and consolidatesCMSLinktoButtonLinksince we were repeating the components patterndestructiveandlinkEventTableandEventPreviewto use properButtoncomponent instead of incorrectly usedCMSLinkclearIrrelevantLinkValuestolinkFieldlinkToPageOrPosttolinkFieldlinkToPageOrPostforquickLinksconfig since the type isarrayinstead ofgroupdefaultLexicalurl validationHow to test
There should be no visual differences
Migration
Rename
button_appearancetobutton_variantFuture enhancements / Questions
We could use
linkFieldinnavLink, since the configs are identical. UsinglinkFieldwill changenewTabto be the second column which will cause a migration that will create a new table and drop the old one which seems invasive for the change. Do we want to do this?