Closed angel-tnc closed 1 year ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Updated |
---|---|---|---|
staging-tiny-news-sites | ✅ Ready (Inspect) | Visit Preview | Mar 8, 2023 at 5:14PM (UTC) |
@angel-tnc will this approach work for pre-existing duplicates or will we need to change those to fit this new solution?
@chelsea-tnc yes, this approach is compatible with all existing newsletters and no database changes are required. Any old link with only the slug will work like now and point to the first newsletter found. Using the new link format will fetch the actual newsletter, as long as it has been fetched during build, which is an independent process and currently saves the letterhead_id.
I'm checking that the old links with only the slug will get statically built. But after deploying this functionality, all links that show in the archive pages will have the new format and work, so that case would only apply if someone directly enters a link with only the slug in the browser.
Ok, apologies for the many comments. Verified my assumptions to be certain. Summary:
@angel-tnc thanks for confirming. Let's ask members to understand the impact of 4, as it means existing links would be broken. I don't think most members are linking to their individual newsletters, but I asked on Slack to be sure.
Thanks, makes sense to ask. In general existing slug-only links will work like now except they will take a second and show the "Loading..." message because they are not prebuilt. That's what I saw in my local production build. We can confirm on staging.
@angel-tnc we can move this to staging. However, let's hold off on shipping to production until we better understand the impact to members first.
Fix for TNT-96.
Why
Newsletters were being routed using only a slug generated from the headline, which is commonly reused by members and has no uniqueness guarantees, which means a reliable unique URI cannot be derived from them alone.
What
Modify newsletter edition routing logic to take into account both the slug and the letterhead identifier used on the direct letterhead URI's, for example - https://read.letterhead.email/black-by-god/letter/11356