Skip to content

Instantly share code, notes, and snippets.

@djtriptych
Last active January 31, 2023 19:05
Show Gist options
  • Save djtriptych/bea6030546bc392a9c804ff383c0454d to your computer and use it in GitHub Desktop.
Save djtriptych/bea6030546bc392a9c804ff383c0454d to your computer and use it in GitHub Desktop.
ptk notes

PTK

TOC

  • Tech Overview

    • Publishing pipeline. What happens when you click "publish"

      • Requirements to publish.
        • Body text not empty.
        • Valid Headline.
        • Unique Slug.
        • Valid classification for Obsessed.
      • Scheduled Posts.
    • Cron Jobs

      • Apple News Publisher
        • Every 3 minutes
      • Scheduled Post Publisher
      • Newsletter Pipeline
      • Progressive Scroll List
      • Unlock and Bump
      • Sitemap
    • UI

      • Recent upgrade to parcel 2.
      • True SPA
  • Requirements

    • Newsroom
      • Always able to publish.
        • Securely and quickly delivering the news.
    • Performance
      • Live to users within 60 seconds of publish action in PTK.
    • Legal & Auditability
      • Must be possible to detemine whoe made each change to an article
        • Body text
        • Metadata
        • Conversion cards
        • Images and video
        • Listed Authors
        • Listed Editors
        • Short link
        • Tags
      • Don't save more data than needed (e.g. temporary autosaves).
      • Needed: precise data retention policy?
    • Security
      • Azure/IAC auth.
      • Slack login possible?
      • Bad actors.
    • Personas
      • Reporters
      • Editors
      • Engineering/Admin
      • Business

Common Support Issues

  • Azure login issues.
  • Slug Redirects.
  • "Red Dot" Issues.
  • Data Requests.

Issues

  • Frequent risky support tasks.

  • Poor interaction between engineering and newsroom

    • Every engineer should shadow a writer as they try to post a story.
    • Direct facetime with writers is important to connect to the work.
  • Impossible to enforce downtime.

    • Obsessed Launch
  • Access Controls.

    • Secret routes@katie Access to dynamic nav
  • Confusing publishing pipeline

Newsroom Issues

Incomplete Saves (@danika)

As described by the newsroom, PTK is "eating words" in article bodies.

This can happen when writing out a headline: it seems like "if you save it too quickly after you're done typing, it won't save the latest version." (@danika)

Eng Notes: This is likely due to the autosave features interacting poorly with the case that multiple writers are working on a story simultaneouly.

TODO:

  • Reproduce this error under controlled conditions.

Curly Quotes (@danika)

Curly Quotes are required by the TDB style guide, but quite difficult to insert into our WYSIWYG editor. Writers have to use keystrokes.

Article Search in Workflow

  • @tracy
    • "[when inserting fancy links] We only want to link to other articles, and not to other cheats. When you type in a search term, it includes cheat, and express articles along with normal stories. The search results should only include articles."
    • "I would prefer that cheats just not populate in the search results."
    • "People are accidentally linking to cheats".

Red Dot / Edit Conflicts

  • @cathy.fenlon:

    • Sometimes I'll test when I know someone is in the article and see how long the red dot takes to react. I've noticed a delay. Sometimes I can get in and out before the red dot updates.

    • Would be nice to know red dot is precise

    • Would be great to be able to kick someone out.

  • @sam: Any features from other CMSs that handled multiple authors better.

    • @tracy: NBC: Total lock on stories. Downside was you can't kick people out.

Odd Requirements to Save Drafts.

  • @tracy: It's weird that we can't save drafts until we build headlines. Writers often write headlines at the end.

Lost Work.

From the newsroom: Sometimes writers lose stories because they delay saving, not having a headline, and their computer crashes.

Poor Performance in Breaking News Moments.

PTK can show cracks when it's most critical that it work well. During breaking news moments, there is often a flurry of activity in PTK, including multiple people editing and updating the same articles.

Premature/incorrect posts are also a risk, as we publishing amidst a stream of incoming information.

The newsroom reports that during these times, autosave overwrites and

Prior Docs:

Ideas:

  • @nolawee: Redis-powered leaderboards.
  • Pull in data from parsely and store in database alongside articles.
  • Saving should either be autosave always, or explicit.
  • Ability to send in-app alerts to all PTK users.
  • Clear visual indication of current environment (prod / stage / pr deploy / local dev)
  • A smart, reusable article search module.
    • Replaces search in home page modules.
    • Replaces search in fancy links module.
    • Excludes cheats when desired.
  • Keyboard shortcut to insert empty curly quotes ? Both single and double quotes
  • An auto-editor which can replace quotes one-by-one with confirmation.
  • Tool to add Authors
  • Expose dynamic nav tool to edit:
    • Guardrails around design constraints (e.g. total length of nav items).
    • Think through analytics concerns if any.
  • Slack links included in red dot notification - start a convo with author.
  • Kick authors out of individual articles.
  • Clearer roles and permissions in PTK.
  • Clearer messaging is hte best low-effort way to start alleviating issues.
  • Link to article history.
  • Search by author
    • search by url, slug
    • include drafts
    • Got a "slug exists" error but couldn't find it because search does not return drafts.
  • /author pages
    • Direct links to slack.
    • Show most recent stories.
  • /activity page
    • A realtime view of recent activity on PTK. Who is doing what?
  • Spike on not requiring headline to save.

Open Questions

  • @tracy Where do writers and editors spend their time
  • @tracy Can we drop safari support?
  • @tracy Does anyone edit from mobile devices?
  • @lauren Can we deprecate galleries in code.
  • Are we gathering usage stats e.g. in GA?

Routes

Homepage

  • /

Auth

  • /redirect-logout
  • /login
  • /permission

Publishing Articles

  • /new
  • /
  • //body
  • //main-info
  • //metadata
  • //images
  • /gallery/

Biz Tools

  • /biztools
  • /biztools/adstxt
  • /biztools/brandspartners
  • /biztools/categorization-data
  • /biztools/refresh
  • /biztools/scouted

Editors

  • /all-articles
  • /author/
  • /authors
  • /category
  • /cheatsheet
  • /dynamic-navigation-tool
  • /homepage
  • /homepage-analytics
  • /keywords
  • /screamer

Obsessed Article Editing

  • /obsessed/new
  • /obsessed/
  • /obsessed//body
  • /obsessed//main-info
  • /obsessed//metadata
  • /obsessed//images
  • /obsessed//classification
  • /obsessed/gallery/

Obsessed Admin

  • /obsessed-tag/
  • /obsessed-admin
  • /obsessed-dynamic-navigation-tool
  • /obsessed-analytics
  • /obsessed/homepage

Major Libraries

  • parcel
  • react
  • redux
  • sass
  • material-ui
  • apollo / graphql
  • azure/msal-browser
  • cloudinary
  • envkey
  • eslint
  • lodash
  • moment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment