Skip to content
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

code ref should serialize to relative #2154

Merged
merged 10 commits into from
Feb 20, 2025

Conversation

tintinthong
Copy link
Contributor

@tintinthong tintinthong commented Feb 17, 2025

Specs that get created now will serialize the code ref fields into relative urls. Similarly, if you had an absolute url, an auto-save will serialise it relative. These happen on the server. This changes will apply to any card with code ref field.

Before

Screenshot 2025-02-19 at 23 29 29

After

Screenshot 2025-02-19 at 23 29 37

@tintinthong tintinthong marked this pull request as draft February 17, 2025 09:41
Copy link

github-actions bot commented Feb 17, 2025

Host Test Results

    1 files  ±0      1 suites  ±0   23m 29s ⏱️ +30s
770 tests +1  768 ✔️ +1  2 💤 ±0  0 ±0 
775 runs  +1  773 ✔️ +1  2 💤 ±0  0 ±0 

Results for commit 2c7e245. ± Comparison against base commit 6008560.

♻️ This comment has been updated with latest results.

set null only when card.id does not exist
@tintinthong tintinthong force-pushed the cs-7930-code-ref-should-serialize-relative-url branch from 3846683 to 8ad51f6 Compare February 17, 2025 10:07
@tintinthong tintinthong marked this pull request as ready for review February 19, 2025 15:27
@tintinthong tintinthong requested review from habdelra and a team February 19, 2025 16:14
@@ -2294,8 +2299,9 @@ async function getDeserializedValue<CardT extends BaseDefConstructor>({
export interface SerializeOpts {
includeComputeds?: boolean;
includeUnrenderedFields?: boolean;
maybeRelativeURL?: ((possibleURL: string) => string) | null; // setting this to null will force all URL's to be absolute
useAbsoluteURL?: boolean;
Copy link
Contributor

Choose a reason for hiding this comment

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

thanks!

@tintinthong tintinthong merged commit e415c57 into main Feb 20, 2025
48 checks passed
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.

2 participants