Cs 10652/introduce the cardthumbnail inside cardinfofield#4341
Draft
Cs 10652/introduce the cardthumbnail inside cardinfofield#4341
Conversation
Preview deployments |
…-api; add cardThumbnail to CardInfoField NumberField, FileDef, and ImageDef were in separate modules that all imported from card-api. Adding `cardThumbnail = linksTo(() => ImageDef)` to CardInfoField would have created a circular import chain. Moving all three into card-api breaks the cycle; the old files become re-export shims for backwards compatibility.
MaybeBase64Field was a StringField subclass whose only purpose was to display "(Base64 encoded value)" instead of raw data. Now that cardThumbnail (ImageDef) exists as the proper image field, the workaround is no longer needed. Replace all usages with plain StringField and update test snapshots accordingly.
24941df to
5d71e37
Compare
Host Test Results 1 files ±0 1 suites ±0 2h 19m 10s ⏱️ + 2m 52s For more details on these errors, see this check. Results for commit f681244. ± Comparison against base commit 5a2946d. This pull request removes 10 and adds 2 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
Realm Server Test Results 1 files ±0 1 suites ±0 13m 15s ⏱️ -2s For more details on these failures, see this check. Results for commit f681244. ± Comparison against base commit 5a2946d. This pull request removes 8 and adds 8 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
linear: https://linear.app/cardstack/issue/CS-10652/introduce-the-cardthumbnail-inside-cardinfofield
Fix cyclic deps: consolidate NumberField, FileDef, ImageDef into card-api; add cardThumbnail to CardInfoField
NumberField, FileDef, and ImageDef were in separate modules that all imported from card-api. Adding
cardThumbnail = linksTo(() => ImageDef)to CardInfoField would have created a circular import chain. Moving allthree into card-api breaks the cycle; the old files become re-export shims for backwards compatibility. (mirroring what
theme.gts, text-area.gtsdid)Remove MaybeBase64Field, use StringField for cardThumbnailURL
MaybeBase64Field was a StringField subclass whose only purpose was to display "(Base64 encoded value)" instead of raw data. Now that cardThumbnail (ImageDef) exists as the proper image field, the workaround
is no longer needed. Replace all usages with plain StringField and update test snapshots accordingly.