From 924d981deb34c0a0478a1e3c97df143db4991698 Mon Sep 17 00:00:00 2001 From: Hongbo Wu Date: Mon, 29 Aug 2022 18:09:49 +0800 Subject: [PATCH 01/39] Add test page --- apple/Omnivore.xcodeproj/project.pbxproj | 4 +- .../morning-brew/expected-metadata.json | 10 + .../test-pages/morning-brew/expected.html | 1412 +++++++++++++++++ .../test/test-pages/morning-brew/source.html | 846 ++++++++++ .../test/test-pages/morning-brew/url.txt | 1 + 5 files changed, 2271 insertions(+), 2 deletions(-) create mode 100644 packages/readabilityjs/test/test-pages/morning-brew/expected-metadata.json create mode 100644 packages/readabilityjs/test/test-pages/morning-brew/expected.html create mode 100644 packages/readabilityjs/test/test-pages/morning-brew/source.html create mode 100644 packages/readabilityjs/test/test-pages/morning-brew/url.txt diff --git a/apple/Omnivore.xcodeproj/project.pbxproj b/apple/Omnivore.xcodeproj/project.pbxproj index 7b20a9b8c..f7cbc94a2 100644 --- a/apple/Omnivore.xcodeproj/project.pbxproj +++ b/apple/Omnivore.xcodeproj/project.pbxproj @@ -1439,7 +1439,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = QJF2XZ86HB; + DEVELOPMENT_TEAM = MHM9HW2S8F; ENABLE_PREVIEWS = YES; INFOPLIST_FILE = InfoPlists/Omnivore.plist; IPHONEOS_DEPLOYMENT_TARGET = 15.0; @@ -1730,7 +1730,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = QJF2XZ86HB; + DEVELOPMENT_TEAM = MHM9HW2S8F; ENABLE_PREVIEWS = YES; INFOPLIST_FILE = InfoPlists/Omnivore.plist; IPHONEOS_DEPLOYMENT_TARGET = 15.0; diff --git a/packages/readabilityjs/test/test-pages/morning-brew/expected-metadata.json b/packages/readabilityjs/test/test-pages/morning-brew/expected-metadata.json new file mode 100644 index 000000000..d285066e2 --- /dev/null +++ b/packages/readabilityjs/test/test-pages/morning-brew/expected-metadata.json @@ -0,0 +1,10 @@ +{ + "title": "Brew Review", + "byline": null, + "dir": null, + "excerpt": "Together with", + "siteName": null, + "publishedDate": null, + "language": "English", + "readerable": true +} diff --git a/packages/readabilityjs/test/test-pages/morning-brew/expected.html b/packages/readabilityjs/test/test-pages/morning-brew/expected.html new file mode 100644 index 000000000..ea6942d7e --- /dev/null +++ b/packages/readabilityjs/test/test-pages/morning-brew/expected.html @@ -0,0 +1,1412 @@ +
+
+
+ + +

+ + +

+ + + + +
+ + + +

Together with

+ + + Apple Card + + + + +
+ + + + +

+ August 28, 2022 + | + View Online + | + Sign Up + | + Shop +

+ + + + + A gif of breakdancers on ancient vase +

+ Christian Blaza +

+ + + + +
+ + + +

IN THIS ISSUE

+ + +

+ Break dancing is about to make the Olympics a lot + cooler +

+ + +

+ The AI rapper no one wanted +

+ + +

+ And chef Julia Turshen +

+ + + +
+ + + + + +

+ + + + +
+ + +

TOGETHER WITH APPLE CARD

+ + + + + Apple Card + + + + + +

+ Daily Cash back. Every purchase. Every day. That’s what you + get with Apple Card. It’s this simple: Anytime you make a + purchase, you get up to 3% back—unlimited. +

+

+ We’re talkin’ + real cash back that can be used right away, with no expiration or loss in value. No extensive waiting, + no complicated points redemption, and absolutely + no fees + (not even the hidden kind). +

+

+ Grabbing coffee? Booking a plane ticket? Paying back a friend? + You can use your Daily Cash for all that, and literally + anything else. +

+

+ Apply for Apple Card today + and start snatchin’ up some serious cash back. +

+

Terms apply.

+ + +
+ + + + + + +
+ + + +

VIBE CHECK

+ + + +
+ + + + +
+

+ +

+
+

+ “I would be bummed if I suddenly started existing somewhere I + wasn’t supposed to exist and everyone started killing me for + it.”—Catherine Bonner to the New York Times regarding the + ongoing Lanternfly War +

+

+ “You can break your back, on the giant slide. You can even + break your neck, on the giant slide. You can even bump your + head, on the giant slide.”—Gmac Cash rapping about the dangerous + giant slide + in Detroit +

+

+ “I look down at the face of my sleeping child and I vow: If + this baby’s life is even one particle easier than mine was, I + will burn this whole place down!”—Alexandra Petri in a satirical + Washington Post Op-Ed + regarding President Biden’s plan to cancel up to $20,000 in + student debt +

+
+ + +
+ + + + + + +
+ + + +

GREAT DEBATE

+ + + +
+ + + + +
+

+ +

+
+

+ null +

+

+ —Amanda Hoover +

+
+ + +
+ + + + + + +
+ + + +

GROUP CHAT

+ + + +
+ + + + +
+

+ It’s artificial, but is it intelligent? + +

+

+ + Illustration: Will Varner, Photo: Capitol Records +

+
+
+

+ Tech startup Sanas offers real-time accent removal for + businesses. On its + website, visitors can hear an Indian accent neutralized to be + nondescript, a literal + code switch. It “wants + to make the world sound whiter,” + SFGate + argued. Meanwhile, FN Meka—a virtual, slur-slinging rapper who + bears a striking resemblance to the deeply + controversial rapper + 6ix9ine—recently signed, and then quickly lost, a record deal + with Capitol Records. Both are AI-powered projects that have + been criticized as racist. +

+

+ “There’s a long history of technology reinforcing racism,” + Dylan Baker, a research engineer at the Distributed AI + Research (DAIR) Institute, told Morning Brew. +

+
+

+ Sanas raised over $37 million in funding, including a + $32 million Series A + round. The founders, who met as Stanford undergrads, had a + college friend who was harassed for his Central American accent + during his job in a call center. That’s not an unusual + experience: verbal + abuse and racism + are routine for workers in these jobs. But Sanas’s + pitch deck + isn’t just about protecting low-paid workers. It notes “accent + differences have a profound impact on customer satisfaction,” + but “nearshoring/reshoring” jobs can be more than twice as + expensive. (The 2018 dark comedy + Sorry to Bother You + predicted + the profitability of a white voice in call centers.) +

+

+ But hiding accents with AI presents a dilemma. “It + does sound like it would + reinforce the idea that call center workers are second-class + citizens who are only deserving of a harassment-free environment + if they sound appropriately white,” Baker said. +

+

+ While Sanas may seem like digital whiteface, FN Meka came under + fire for a different offense: + digital blackface. Created by “virtual label” + Factory New + in 2021, FN Meka is a green-haired virtual + rapper + whose lyrics are generated with AI, voiced by a Black artist who + claims + he was not paid for his work. +

+

+ Public criticism mounted after the announcement, especially for + FN Meka’s use of the N-word—his creators are not Black—and an + Instagram + post + making light of police brutality. The nonprofit advocacy + organization Industry Blackout called Capitol’s choice to + support an “amalgamation of gross stereotypes” a “direct insult + to the Black community” in an + open letter. Capitol Records apologized and severed ties with the digital + rapper. +

+

+ It doesn’t take an industry expert to recognize the + tone-deafness, but an expert might better explain + why it happened at all. + Andrew Barber, owner of media company Fake Shore Drive and + Grammy board member, thought FN Meka was a terrible idea from + the jump. But Barber predicts there are more AI-generated + artists to come, and his explanation isn’t limited to the music + industry. +

+

+ “FN Meka might be gone, but you better believe that companies + are looking for any way to cut corners to make more money with + less hassle,” he said. +

+

+ Though AI is heralded as the tech of the future, right now it’s + raising questions about exploitation and racism in the present. + Who gets cut out for the sake of profitability? And who gets to + make a profit?
+

+

+ —Ashwin Rodrigues +

+
+ +

+   +   +   + + +

+ +
+ + + + + + +
+ + + +

SUNDAY FUNDAY

+ + + +
+ + + + + + + + + +
+ + + +

LONG READ

+ + + +
+ + + + +
+

+ Break dancing is about to get its Olympic moment + +

+

+ + Christian Blaza +

+
+

+ The Olympics may never be the same. Not that they ever are, + given its historic flux. The pandemic-delayed 2020 Olympics in + Tokyo added five sports: baseball and softball, karate, + skateboarding, sports climbing, and surfing. The upcoming 2024 + Games in Paris have already done away with karate and + baseball/softball. Only one addition was made—breaking, a sport + better known by its pop bastardization: breakdancing. +

+

+ It will debut in Paris not on a mat in a gym, but on a + high-production dance floor with the Eiffel Tower as a backdrop. + This won’t just be the Olympic debut of a sport. It will be the + Olympic debut of a spectacle. +

+

+ Breaking’s inclusion is the latest twist in the long, fluxed-up + history of the Olympics. Badminton is an Olympic sport, but + squash is not. Archery? Sure. Darts? Nah. Curling is in. But not + bowling. For all its put-upon, carved-in-stone institutionalism, + the Olympics can be nonsensically mercurial. Breaking’s debut + will push Olympic eccentricity to its limits. +

+

+ Ironically, alongside Olympic expansion is its crisis of + contraction. The Olympics as a television program is in ratings + freefall: NBC, which held the American broadcasting rights for + the 2020 Tokyo Olympics, said that the games averaged 15.6 + million prime-time viewers per night, the lowest of any Olympics + in a generation—Summer or Winter—and almost a 50 percent drop + from the 2016 Rio Games. Night by night, Tokyo saw the nine + smallest prime-time audiences since 1992. +

+

+ And that audience is increasingly older (the median age of + viewers for the 2020 Games was 58). That milquetoast appeal is + reflected in the IOC’s top-tier sponsors, which included + Allianz, Bridgestone, Deloitte, Intel, Omega, Procter & + Gamble, Toyota, and Visa. All brands that scream middle-aged + dad. +

+

+ Plus, the Olympics isn’t exactly following socially conscious + trends. A scathing 2021 + analysis + of Olympic sustainability found an overall ecological, economic, + and social sustainability score of 48 on a scale of 100 across + 16 Summer and Winter Games, with a marked decrease in the + sustainability of the Games over time (it’s part of why + youth-led campaigns to keep the Olympics out of their cities + have gained traction). “Olympic Games from 1992 to 2008 have a + mean sustainability score of 53 points, whereas those since + Vancouver 2010 stand at only 39 points,” the analysis found. +

+

+ This is the graying, grim landscape into which breaking—an + intrinsically cool sport for which + a 2012 semifinal has 93 million views on YouTube—will debut. It’s shepherded by Shawn Tay, the president of the + World DanceSport Federation (WDSF). Tay, who is 65 and lives in + Singapore, retired from ballroom dancing in 1994. He isn’t the + obvious cultural ambassador for breaking’s Olympic moment, but + the WDSF has been speaking the IOC’s language for decades. +

+

+ The WDSF courted IOC power players and commissioned a PwC + assessment on the sport’s marketing prospects. Now the + organization is in charge of overseeing the qualification + process that will winnow 80 athletes from around the world down + to 32 Olympic breaking opportunities (an equal number for men + and women) in Paris. +

+

+ Tay compared his task to running a restaurant despite not + knowing how to cook. “I will not be the one doing the cooking. + But I’m doing the management,” he told Morning Brew. “And I’m + helping the chef understand how a restaurant works—with + discipline, timetables, and an approach of how to bring ideas to + market.” +

+

+ “A new generation of people can no longer watch a sport that + goes up and down, up and down, in circles,” he said. “Spectators + want to be stimulated. They want to feel that their bodies are + reacting to what they’re seeing. People want more excitement. In + the internet era, nobody sits and reads the newspaper for hours. + They want quick information. It’s the same thing in sports: They + want something quick. Breaking has that quality.” + Continue reading this story on breaking’s Olympic dreams + by Richard Morgan. +

+
+ +

+   +   +   + + +

+ +
+ + + + + + +
+ + + +

Q&A

+ + + +
+ + + + +
+

+ Brew Questionnaire with Julia Turshen + +

+

+ + photo: Melina Hammer +

+
+

+ Julia Turshen is a chef and New York Times best-selling cookbook + writer. Her latest cookbook, + Simpy Julia, + rethinks comfort food through a healthy lens (hello, lemon + ricotta cupcakes). It was picked up by Vice President Kamala + Harris when she visited an indie bookstore in Rhode Island (she + joked that she thought it was a Julia Child book). When she’s + not writing or thinking of new recipes, Turshen talks about food + on her podcast, + Keep Calm & Cook On. + Need a Sunday night dinner upgrade? Sign up for Turshen’s + online cooking classes + every Sunday afternoon, where you can learn how to make rosemary + gin spritzers and sesame chicken schnitzel. +

+

+ What’s the best advice you ever received? +

+

+ On a practical note, the best advice I’ve received as a lifelong + freelancer is to think of every dollar I earn as fifty cents and + to open a separate savings account and put half of every check I + receive into it so I’m set for taxes and any other unexpected + work expenses. +

+

+ On a more emotional note, the best advice I’ve ever received is + to ask for forgiveness, not permission. +

+

+ What’s the most embarrassing song you’ll admit to liking + publicly? +

+

+ I have no shame about anything I like! But I guess the first to + come to mind for this question is “Lean on Me,” which my spouse, + Grace, says I sing very frequently... +

+

+ What fictional person do you wish were real? +

+

+ As someone who has gotten into powerlifting in the last few + months, I would have to say + Luisa Madrigal + from Encanto. +

+

+ What real person do you wish were fictional? +

+

Mitch McConnell.

+

+ How would you explain TikTok to your + great-grandparents? +

+

+ An infinite number of miniature home movies that you can watch + on a handheld device. +

+

+ What always makes you laugh? +

+

+ All of our pets, but especially our dog Winky, who is + particularly comical. +

+

+ If you were given a billboard in Times Square, what would you + put on it? +

+

+ Diet culture sucks. You are loveable. +

+

+ —Interview by Sherry Qin +

+
+ +

+   +   +   + + +

+ +
+ + + + + + +

+ + + + +
+ + +

TOGETHER WITH BABBEL

+ + + + + Babbel + + + + + +

+ How do you say…sweet deal! You could be speaking a new language in just 21 days with + your Babbel subscription (now up to 55% off for a limited + time). With bite-sized, 10-minute language lessons from + Babbel, users report being able to have a basic conversation + after just 3 weeks of daily practice. + Save up to 55% on your subscription here. +

+ + +
+ + + + + + +
+ + + +

BREW'S BEST

+ + + +
+ + + + +
+

+ +

+
+

+ The future of drunk texting is here: Another brain-computer interface company became the first to + implant their device into a patient in the US. Synchron beat + Elon Musk’s Neuralink (among others) to implant chips into + patients’ brains. Those implants allowed them to control digital + devices via brain signals to help them text, shop, and more with + no reported serious adverse effects after 12 months. [Emerging Tech Brew] +

+

+ Kaboom cats: Nora chats with Elan Lee, game designer and the co-founder and + CEO of Exploding Kittens, a card game that became the + most-backed project in Kickstarter history and has since sold + over 11 million copies. Lee talks about how he and his + co-founder turned a single piece of intellectual property into a + multiplatform brand. [Business Casual] +

+

+ Invisible finger syndrome: Be careful putting your phone face down on a table anywhere + near the University of Florida. Researchers have developed a way + to make screen-clicks on your phone through a table using + electromagnetic interference from an antenna to mimic a touch + from a finger. Maybe pick a password more complicated than + 1-2-3-4! [IT Brew] +

+

+ Don’t listen to Mark Zuckerberg (ever). + Don’t move fast and break things. The MFABT ethos epitomized + Facebook in the early days, and was a way to justify taking big, + audacious swings regardless of collateral damage, which meant + it…broke a lot of things. And when it comes to protecting your + company’s assets, moving fast and breaking things is a really, + really bad idea, experts say. [CFO Brew] +

+

+ The best thing we read this week: The iconoclastic film studio A24 has bred superfans, dropped + swag, and perfected a unique house style. It’s also teetering on + the verge of self-parody, and New York Magazine’s in-depth look + at the studio explains the hows and whys. Read it and then watch + Bodies, Bodies, Bodies + anyway. [New York Magazine] +

+

+ Achieve thicker, fuller hair: Meet + Revela, the only non-Rx brand that helps you tackle hair loss at the + root. It shows results up to 4x faster than traditional + solutions. + Learn more.* +

+ +

+ *This is sponsored advertising content. +

+
+ + +
+ + + + + + +
+ + + +

THE END

+ + + +
+ + + + +
+

+ +

+
+

+ null +

+

+ —Amanda Hoover +

+
+ + +
+ + + + + + + +

+   +   +   +   +   + + +

+
+ + +

+ Written by + Rohan Anthony, + Stassa Edwards, + Amanda Hoover, + Sherry Qin, + Ashwin Rodrigues, and + Holly Van Leuven + +

+

+ Was this email forwarded to you? Sign up + here +

+ + + + + ADVERTISE + // + CAREERS + // + SHOP + // + FAQ +

+ Update your email preferences or unsubscribe + here.
+ View our privacy policy + here. +

+

+ Copyright © 2022 Morning Brew. All rights reserved. +
+ 22 W 19th St, 4th Floor, New York, NY 10011 +

+ + +
+ + + +
+
+
diff --git a/packages/readabilityjs/test/test-pages/morning-brew/source.html b/packages/readabilityjs/test/test-pages/morning-brew/source.html new file mode 100644 index 000000000..77053cdeb --- /dev/null +++ b/packages/readabilityjs/test/test-pages/morning-brew/source.html @@ -0,0 +1,846 @@ + + + + Brew Review + + + + + + + + + + + + + + + + + + +
+ Break dancing goes for the gold +
+
+ + Advertisement +
+
+ +
+ + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + +
+ + +
+
+ + + + + + + +
+

+ Together with +

+
+ Apple Card + +
+
+ + + + + + +
+ August 28, 2022 + | + View Online + | + Sign Up + | + Shop +
+
+ A gif of breakdancers on ancient vase +

+ Christian Blaza +

+
+ + + + + + + + + +
+

+ IN THIS ISSUE +

+
+

+ Break dancing is about to make the Olympics a lot cooler +

+
+

+ The AI rapper no one wanted +

+
+

+ And chef Julia Turshen +

+
+
+ + + + +
+
+ +
+
+
+ + + + + + + + + + +
+ Apple Card +
+
+
+
+
+ + + + + + +
+
+ +
+
+

+ VIBE CHECK +

+
+
+ +
+
+
+
+

+ + +

+
+

I would be bummed if I suddenly started existing somewhere I wasn’t supposed to exist and everyone started killing me for it.”—Catherine Bonner to the New York Times regarding the ongoing Lanternfly War

+

You can break your back, on the giant slide. You can even break your neck, on the giant slide. You can even bump your head, on the giant slide.”—Gmac Cash rapping about the dangerous giant slide in Detroit

+

I look down at the face of my sleeping child and I vow: If this baby’s life is even one particle easier than mine was, I will burn this whole place down!”—Alexandra Petri in a satirical Washington Post Op-Ed regarding President Biden’s plan to cancel up to $20,000 in student debt

+
+ + +
+
+ + + + + + +
+
+ +
+
+

+ GREAT DEBATE +

+
+
+ +
+
+
+
+

+ + +

+
+ null

Amanda Hoover

+
+ + +
+
+ + + + + + +
+
+ +
+
+

+ GROUP CHAT +

+
+
+ +
+
+
+
+

+ It’s artificial, but is it intelligent? + +

+ It’s artificial, but is it intelligent? + Illustration: Will Varner, Photo: Capitol Records +
+

Tech startup Sanas offers real-time accent removal for businesses. On its website, visitors can hear an Indian accent neutralized to be nondescript, a literal code switch. It “wants to make the world sound whiter,” SFGate argued. Meanwhile, FN Meka—a virtual, slur-slinging rapper who bears a striking resemblance to the deeply controversial rapper 6ix9ine—recently signed, and then quickly lost, a record deal with Capitol Records. Both are AI-powered projects that have been criticized as racist.

“There’s a long history of technology reinforcing racism,” Dylan Baker, a research engineer at the Distributed AI Research (DAIR) Institute, told Morning Brew.

+

Sanas raised over $37 million in funding, including a $32 million Series A round. The founders, who met as Stanford undergrads, had a college friend who was harassed for his Central American accent during his job in a call center. That’s not an unusual experience: verbal abuse and racism are routine for workers in these jobs. But Sanas’s pitch deck isn’t just about protecting low-paid workers. It notes “accent differences have a profound impact on customer satisfaction,” but “nearshoring/reshoring” jobs can be more than twice as expensive. (The 2018 dark comedy Sorry to Bother You predicted the profitability of a white voice in call centers.)

+

But hiding accents with AI presents a dilemma. “It does sound like it would reinforce the idea that call center workers are second-class citizens who are only deserving of a harassment-free environment if they sound appropriately white,” Baker said.

+

While Sanas may seem like digital whiteface, FN Meka came under fire for a different offense: digital blackface. Created by “virtual label” Factory New in 2021, FN Meka is a green-haired virtual rapper whose lyrics are generated with AI, voiced by a Black artist who claims he was not paid for his work.

+

Public criticism mounted after the announcement, especially for FN Meka’s use of the N-word—his creators are not Black—and an Instagram post making light of police brutality. The nonprofit advocacy organization Industry Blackout called Capitol’s choice to support an “amalgamation of gross stereotypes” a “direct insult to the Black community” in an open letter. Capitol Records apologized and severed ties with the digital rapper.

+

It doesn’t take an industry expert to recognize the tone-deafness, but an expert might better explain why it happened at all. Andrew Barber, owner of media company Fake Shore Drive and Grammy board member, thought FN Meka was a terrible idea from the jump. But Barber predicts there are more AI-generated artists to come, and his explanation isn’t limited to the music industry.

+

“FN Meka might be gone, but you better believe that companies are looking for any way to cut corners to make more money with less hassle,” he said.

+

Though AI is heralded as the tech of the future, right now it’s raising questions about exploitation and racism in the present. Who gets cut out for the sake of profitability? And who gets to make a profit?

+

—Ashwin Rodrigues

+
+ + + + + +
+ + + + + + + + +
+ +
+
+ + + + + + +
+
+ +
+
+

+ SUNDAY FUNDAY +

+
+
+ +
+
+
+
+

+ Brew Mini + +

+

A Sunday crossword that nods to the news of the week. Play it here.

+ + +
+
+ + + + + + +
+
+ +
+
+

+ LONG READ +

+
+
+ +
+
+
+
+

+ Break dancing is about to get its Olympic moment + +

+ Classical sculpture of discus thrower next to an image of a breakdancer rendered as a classical sculpture all set on a red background + Christian Blaza +
+

The Olympics may never be the same. Not that they ever are, given its historic flux. The pandemic-delayed 2020 Olympics in Tokyo added five sports: baseball and softball, karate, skateboarding, sports climbing, and surfing. The upcoming 2024 Games in Paris have already done away with karate and baseball/softball. Only one addition was made—breaking, a sport better known by its pop bastardization: breakdancing.

+

It will debut in Paris not on a mat in a gym, but on a high-production dance floor with the Eiffel Tower as a backdrop. This won’t just be the Olympic debut of a sport. It will be the Olympic debut of a spectacle.

+

Breaking’s inclusion is the latest twist in the long, fluxed-up history of the Olympics. Badminton is an Olympic sport, but squash is not. Archery? Sure. Darts? Nah. Curling is in. But not bowling. For all its put-upon, carved-in-stone institutionalism, the Olympics can be nonsensically mercurial. Breaking’s debut will push Olympic eccentricity to its limits.

+

Ironically, alongside Olympic expansion is its crisis of contraction. The Olympics as a television program is in ratings freefall: NBC, which held the American broadcasting rights for the 2020 Tokyo Olympics, said that the games averaged 15.6 million prime-time viewers per night, the lowest of any Olympics in a generation—Summer or Winter—and almost a 50 percent drop from the 2016 Rio Games. Night by night, Tokyo saw the nine smallest prime-time audiences since 1992.

+

And that audience is increasingly older (the median age of viewers for the 2020 Games was 58). That milquetoast appeal is reflected in the IOC’s top-tier sponsors, which included Allianz, Bridgestone, Deloitte, Intel, Omega, Procter & Gamble, Toyota, and Visa. All brands that scream middle-aged dad.

+

Plus, the Olympics isn’t exactly following socially conscious trends. A scathing 2021 analysis of Olympic sustainability found an overall ecological, economic, and social sustainability score of 48 on a scale of 100 across 16 Summer and Winter Games, with a marked decrease in the sustainability of the Games over time (it’s part of why youth-led campaigns to keep the Olympics out of their cities have gained traction). “Olympic Games from 1992 to 2008 have a mean sustainability score of 53 points, whereas those since Vancouver 2010 stand at only 39 points,” the analysis found.

+

This is the graying, grim landscape into which breaking—an intrinsically cool sport for which a 2012 semifinal has 93 million views on YouTube—will debut. It’s shepherded by Shawn Tay, the president of the World DanceSport Federation (WDSF). Tay, who is 65 and lives in Singapore, retired from ballroom dancing in 1994. He isn’t the obvious cultural ambassador for breaking’s Olympic moment, but the WDSF has been speaking the IOC’s language for decades.

+

The WDSF courted IOC power players and commissioned a PwC assessment on the sport’s marketing prospects. Now the organization is in charge of overseeing the qualification process that will winnow 80 athletes from around the world down to 32 Olympic breaking opportunities (an equal number for men and women) in Paris.

+

Tay compared his task to running a restaurant despite not knowing how to cook. “I will not be the one doing the cooking. But I’m doing the management,” he told Morning Brew. “And I’m helping the chef understand how a restaurant works—with discipline, timetables, and an approach of how to bring ideas to market.”

+

“A new generation of people can no longer watch a sport that goes up and down, up and down, in circles,” he said. “Spectators want to be stimulated. They want to feel that their bodies are reacting to what they’re seeing. People want more excitement. In the internet era, nobody sits and reads the newspaper for hours. They want quick information. It’s the same thing in sports: They want something quick. Breaking has that quality.” Continue reading this story on breaking’s Olympic dreams by Richard Morgan.

+
+ + + + + +
+ + + + + + + + +
+ +
+
+ + + + + + +
+
+ +
+
+

+ Q&A +

+
+
+ +
+
+
+
+

+ Brew Questionnaire with Julia Turshen + +

+ Brew Questionnaire with Julia Turshen + photo: Melina Hammer +
+

Julia Turshen is a chef and New York Times best-selling cookbook writer. Her latest cookbook, Simpy Julia, rethinks comfort food through a healthy lens (hello, lemon ricotta cupcakes). It was picked up by Vice President Kamala Harris when she visited an indie bookstore in Rhode Island (she joked that she thought it was a Julia Child book). When she’s not writing or thinking of new recipes, Turshen talks about food on her podcast, Keep Calm & Cook On. Need a Sunday night dinner upgrade? Sign up for Turshen’s online cooking classes every Sunday afternoon, where you can learn how to make rosemary gin spritzers and sesame chicken schnitzel.

+

What’s the best advice you ever received?

+

On a practical note, the best advice I’ve received as a lifelong freelancer is to think of every dollar I earn as fifty cents and to open a separate savings account and put half of every check I receive into it so I’m set for taxes and any other unexpected work expenses.

+

On a more emotional note, the best advice I’ve ever received is to ask for forgiveness, not permission.

+

What’s the most embarrassing song you’ll admit to liking publicly?

+

I have no shame about anything I like! But I guess the first to come to mind for this question is “Lean on Me,” which my spouse, Grace, says I sing very frequently...

+

What fictional person do you wish were real?

+

As someone who has gotten into powerlifting in the last few months, I would have to say Luisa Madrigal from Encanto.

+

What real person do you wish were fictional?

+

Mitch McConnell.

+

How would you explain TikTok to your great-grandparents?

+

An infinite number of miniature home movies that you can watch on a handheld device.

+

What always makes you laugh?

+

All of our pets, but especially our dog Winky, who is particularly comical.

+

If you were given a billboard in Times Square, what would you put on it?

+

Diet culture sucks. You are loveable.

+

—Interview by Sherry Qin

+
+ + + + + +
+ + + + + + + + +
+ +
+
+ + + + +
+
+ +
+
+
+ + + + + + + + + + +
+ Babbel +
+
+
+
+
+ + + + + + +
+
+ +
+
+

+ BREW'S BEST +

+
+
+ +
+
+
+
+

+ + +

+
+

The future of drunk texting is here: Another brain-computer interface company became the first to implant their device into a patient in the US. Synchron beat Elon Musk’s Neuralink (among others) to implant chips into patients’ brains. Those implants allowed them to control digital devices via brain signals to help them text, shop, and more with no reported serious adverse effects after 12 months. [Emerging Tech Brew]

+

Kaboom cats: Nora chats with Elan Lee, game designer and the co-founder and CEO of Exploding Kittens, a card game that became the most-backed project in Kickstarter history and has since sold over 11 million copies. Lee talks about how he and his co-founder turned a single piece of intellectual property into a multiplatform brand. [Business Casual]

+

Invisible finger syndrome: Be careful putting your phone face down on a table anywhere near the University of Florida. Researchers have developed a way to make screen-clicks on your phone through a table using electromagnetic interference from an antenna to mimic a touch from a finger. Maybe pick a password more complicated than 1-2-3-4! [IT Brew]

+

Don’t listen to Mark Zuckerberg (ever). Don’t move fast and break things. The MFABT ethos epitomized Facebook in the early days, and was a way to justify taking big, audacious swings regardless of collateral damage, which meant it…broke a lot of things. And when it comes to protecting your company’s assets, moving fast and breaking things is a really, really bad idea, experts say. [CFO Brew]

+

The best thing we read this week: The iconoclastic film studio A24 has bred superfans, dropped swag, and perfected a unique house style. It’s also teetering on the verge of self-parody, and New York Magazine’s in-depth look at the studio explains the hows and whys. Read it and then watch Bodies, Bodies, Bodies anyway. [New York Magazine]

+

+

Achieve thicker, fuller hair: Meet Revela, the only non-Rx brand that helps you tackle hair loss at the root. It shows results up to 4x faster than traditional solutions. Learn more.*

*This is sponsored advertising content.

+
+ + +
+
+ + + + + + +
+
+ +
+
+

+ THE END +

+
+
+ +
+
+
+
+

+ + +

+
+ null

—Amanda Hoover

+
+ + +
+
+ + + + + +
+ + + + + + + + + + + + +
+ + + + + + + +
+

+ Written by Rohan Anthony, Stassa Edwards, Amanda Hoover, Sherry Qin, Ashwin Rodrigues, and Holly Van Leuven +

+

+ Was this email forwarded to you? Sign up + here +

+
+

+ WANT MORE BREW? +

+

+ +Industry news, with a sense of humor → + +

+
    +
  • + CFO Brew: your go-to source for global finance insights + +
  • +
  • + Emerging Tech Brew: AI, crypto, space, autonomous vehicles, and more + +
  • +
  • + Future Social: the Brew's take on the world of social media + +
  • +
  • + HR Brew: analysis of the employee-employer relationship + +
  • +
  • + IT Brew: moving business forward; innovation analysis for the CTO, CIO & every IT pro in-between + +
  • +
  • + Marketing Brew: the buzziest happenings in marketing and advertising + +
  • +
  • + Retail Brew: retail trends from DTC to "buy now, pay later" + +
  • +
+

+ +Tips for smarter living → + +

+
    +
  • + Money Scoop: your personal finance upgrade + +
  • +
  • + Money With Katie: manifest your financial freedom + +
  • +
  • + Sidekick: lifestyle recs from every corner of the internet + +
  • +
+

+ + +Podcasts → + + Business Casual, + Founder's Journal, + Imposters, and + The Money with Katie Show +

+

+ + + YouTube + +

+

+ +Accelerate Your Career with our Courses → + +

+ +
+
+ ADVERTISE + // + CAREERS + // + SHOP + // + FAQ +
+
+ Update your email preferences or unsubscribe + here. +
+ View our privacy policy + here. +
+
+ Copyright © 2022 Morning Brew. All rights reserved. +
+ 22 W 19th St, 4th Floor, New York, NY 10011 +
+
+
+ +
+
+ +
+ + diff --git a/packages/readabilityjs/test/test-pages/morning-brew/url.txt b/packages/readabilityjs/test/test-pages/morning-brew/url.txt new file mode 100644 index 000000000..2acf3e508 --- /dev/null +++ b/packages/readabilityjs/test/test-pages/morning-brew/url.txt @@ -0,0 +1 @@ +https://www.morningbrew.com/daily/issues/breaking-ground?utm_source=header_signup&utm_medium=newsletter&utm_campaign=mb&mid=9ab421de712275aea1b00553124b59a0 \ No newline at end of file From 3df6dbc3d59cd8daf4da91145162e4297b787af7 Mon Sep 17 00:00:00 2001 From: Hongbo Wu Date: Wed, 14 Sep 2022 12:33:15 +0800 Subject: [PATCH 02/39] Generate newsletter test pages in a subdirectory --- .../readabilityjs/test/generate-testcase.js | 19 ++++++++++++------- packages/readabilityjs/test/utils.js | 15 ++++++++++++--- 2 files changed, 24 insertions(+), 10 deletions(-) diff --git a/packages/readabilityjs/test/generate-testcase.js b/packages/readabilityjs/test/generate-testcase.js index 05a94e8cd..b48d55198 100644 --- a/packages/readabilityjs/test/generate-testcase.js +++ b/packages/readabilityjs/test/generate-testcase.js @@ -30,6 +30,11 @@ const enableJavascriptForUrl = (url) => { }; function generateTestcase(slug) { + const options = {}; + if (slug.startsWith("newsletters/")) { + // keep the newsletter content in tables + options.keepTables = true; + } var destRoot = path.join(testcaseRoot, slug); fs.mkdir(destRoot, function (err) { @@ -42,12 +47,12 @@ function generateTestcase(slug) { console.error("Source existed but couldn't be read?"); process.exit(1); } - onResponseReceived(null, data, destRoot); + onResponseReceived(null, data, destRoot, options); }); } else { fs.writeFile(path.join(destRoot, 'url.txt'), argURL, () => null); fetchSource(argURL, function (fetchErr, data) { - onResponseReceived(fetchErr, data, destRoot); + onResponseReceived(fetchErr, data, destRoot, options); }); } }); @@ -55,7 +60,7 @@ function generateTestcase(slug) { } fs.writeFile(path.join(destRoot, 'url.txt'), argURL, () => null); fetchSource(argURL, function (fetchErr, data) { - onResponseReceived(fetchErr, data, destRoot); + onResponseReceived(fetchErr, data, destRoot, options); }); }); } @@ -198,7 +203,7 @@ function sanitizeSource(html, callbackFn) { }, callbackFn); } -function onResponseReceived(error, source, destRoot) { +function onResponseReceived(error, source, destRoot, options) { if (error) { console.error("Couldn't tidy source html!"); console.error(error); @@ -217,11 +222,11 @@ function onResponseReceived(error, source, destRoot) { if (debug) { console.log("Running readability stuff"); } - await runReadability(source, path.join(destRoot, "expected.html"), path.join(destRoot, "expected-metadata.json")); + await runReadability(source, path.join(destRoot, "expected.html"), path.join(destRoot, "expected-metadata.json"), options); }); } -async function runReadability(source, destPath, metadataDestPath) { +async function runReadability(source, destPath, metadataDestPath, options) { var uri = "http://fakehost/test/page.html"; var myReader, result, readerable; try { @@ -230,7 +235,7 @@ async function runReadability(source, destPath, metadataDestPath) { readerable = isProbablyReaderable(dom); // We pass `caption` as a class to check that passing in extra classes works, // given that it appears in some of the test documents. - myReader = new Readability(dom, { classesToPreserve: ["caption"], url: uri }); + myReader = new Readability(dom, { classesToPreserve: ["caption"], url: uri, ...options }); result = await myReader.parse(); } catch (ex) { console.error(ex); diff --git a/packages/readabilityjs/test/utils.js b/packages/readabilityjs/test/utils.js index 76e46ca28..702d82451 100644 --- a/packages/readabilityjs/test/utils.js +++ b/packages/readabilityjs/test/utils.js @@ -14,14 +14,23 @@ var testPageRoot = path.join(__dirname, "test-pages"); exports.getTestPages = function(isOmnivore = null) { const root = isOmnivore ? `${testPageRoot}/omnivore` : testPageRoot; - return fs.readdirSync(root).filter(dir => dir !== 'omnivore').map(function(dir) { - return { + const testPages = []; + const testPageDirs = fs.readdirSync(root).filter(dir => dir !== 'omnivore'); + testPageDirs.forEach(function(dir) { + if (dir === 'newsletters') { + // newsletters are a special case, they are in a subdirectory + testPageDirs.push(fs.readdirSync(path.join(root, dir)).map(subdir => path.join(dir, subdir))); + return; + } + + testPages.push({ dir: dir, source: readFile(path.join(root, dir, "source.html")), expectedContent: readFile(path.join(root, dir, "expected.html")), expectedMetadata: readJSON(path.join(root, dir, "expected-metadata.json")), - }; + }); }); + return testPages; }; exports.prettyPrint = function(html) { From 5e959b6a0afc5af24da9763ea663abf0d043d2ca Mon Sep 17 00:00:00 2001 From: Hongbo Wu Date: Wed, 14 Sep 2022 12:33:50 +0800 Subject: [PATCH 03/39] Generate morning brew newsletter test page from email content --- .../test-pages/morning-brew/expected.html | 1412 ------------ .../test/test-pages/morning-brew/source.html | 846 ------- .../test/test-pages/morning-brew/url.txt | 1 - .../morning-brew/expected-metadata.json | 4 +- .../newsletters/morning-brew/expected.html | 550 +++++ .../newsletters/morning-brew/source.html | 1969 +++++++++++++++++ .../newsletters/morning-brew/url.txt | 1 + 7 files changed, 2522 insertions(+), 2261 deletions(-) delete mode 100644 packages/readabilityjs/test/test-pages/morning-brew/expected.html delete mode 100644 packages/readabilityjs/test/test-pages/morning-brew/source.html delete mode 100644 packages/readabilityjs/test/test-pages/morning-brew/url.txt rename packages/readabilityjs/test/test-pages/{ => newsletters}/morning-brew/expected-metadata.json (65%) create mode 100644 packages/readabilityjs/test/test-pages/newsletters/morning-brew/expected.html create mode 100644 packages/readabilityjs/test/test-pages/newsletters/morning-brew/source.html create mode 100644 packages/readabilityjs/test/test-pages/newsletters/morning-brew/url.txt diff --git a/packages/readabilityjs/test/test-pages/morning-brew/expected.html b/packages/readabilityjs/test/test-pages/morning-brew/expected.html deleted file mode 100644 index ea6942d7e..000000000 --- a/packages/readabilityjs/test/test-pages/morning-brew/expected.html +++ /dev/null @@ -1,1412 +0,0 @@ -
-
-
- - -

- - -

- - - - -
- - - -

Together with

- - - Apple Card - - - - -
- - - - -

- August 28, 2022 - | - View Online - | - Sign Up - | - Shop -

- - - - - A gif of breakdancers on ancient vase -

- Christian Blaza -

- - - - -
- - - -

IN THIS ISSUE

- - -

- Break dancing is about to make the Olympics a lot - cooler -

- - -

- The AI rapper no one wanted -

- - -

- And chef Julia Turshen -

- - - -
- - - - - -

- - - - -
- - -

TOGETHER WITH APPLE CARD

- - - - - Apple Card - - - - - -

- Daily Cash back. Every purchase. Every day. That’s what you - get with Apple Card. It’s this simple: Anytime you make a - purchase, you get up to 3% back—unlimited. -

-

- We’re talkin’ - real cash back that can be used right away, with no expiration or loss in value. No extensive waiting, - no complicated points redemption, and absolutely - no fees - (not even the hidden kind). -

-

- Grabbing coffee? Booking a plane ticket? Paying back a friend? - You can use your Daily Cash for all that, and literally - anything else. -

-

- Apply for Apple Card today - and start snatchin’ up some serious cash back. -

-

Terms apply.

- - -
- - - - - - -
- - - -

VIBE CHECK

- - - -
- - - - -
-

- -

-
-

- “I would be bummed if I suddenly started existing somewhere I - wasn’t supposed to exist and everyone started killing me for - it.”—Catherine Bonner to the New York Times regarding the - ongoing Lanternfly War -

-

- “You can break your back, on the giant slide. You can even - break your neck, on the giant slide. You can even bump your - head, on the giant slide.”—Gmac Cash rapping about the dangerous - giant slide - in Detroit -

-

- “I look down at the face of my sleeping child and I vow: If - this baby’s life is even one particle easier than mine was, I - will burn this whole place down!”—Alexandra Petri in a satirical - Washington Post Op-Ed - regarding President Biden’s plan to cancel up to $20,000 in - student debt -

-
- - -
- - - - - - -
- - - -

GREAT DEBATE

- - - -
- - - - -
-

- -

-
-

- null -

-

- —Amanda Hoover -

-
- - -
- - - - - - -
- - - -

GROUP CHAT

- - - -
- - - - -
-

- It’s artificial, but is it intelligent? - -

-

- - Illustration: Will Varner, Photo: Capitol Records -

-
-
-

- Tech startup Sanas offers real-time accent removal for - businesses. On its - website, visitors can hear an Indian accent neutralized to be - nondescript, a literal - code switch. It “wants - to make the world sound whiter,” - SFGate - argued. Meanwhile, FN Meka—a virtual, slur-slinging rapper who - bears a striking resemblance to the deeply - controversial rapper - 6ix9ine—recently signed, and then quickly lost, a record deal - with Capitol Records. Both are AI-powered projects that have - been criticized as racist. -

-

- “There’s a long history of technology reinforcing racism,” - Dylan Baker, a research engineer at the Distributed AI - Research (DAIR) Institute, told Morning Brew. -

-
-

- Sanas raised over $37 million in funding, including a - $32 million Series A - round. The founders, who met as Stanford undergrads, had a - college friend who was harassed for his Central American accent - during his job in a call center. That’s not an unusual - experience: verbal - abuse and racism - are routine for workers in these jobs. But Sanas’s - pitch deck - isn’t just about protecting low-paid workers. It notes “accent - differences have a profound impact on customer satisfaction,” - but “nearshoring/reshoring” jobs can be more than twice as - expensive. (The 2018 dark comedy - Sorry to Bother You - predicted - the profitability of a white voice in call centers.) -

-

- But hiding accents with AI presents a dilemma. “It - does sound like it would - reinforce the idea that call center workers are second-class - citizens who are only deserving of a harassment-free environment - if they sound appropriately white,” Baker said. -

-

- While Sanas may seem like digital whiteface, FN Meka came under - fire for a different offense: - digital blackface. Created by “virtual label” - Factory New - in 2021, FN Meka is a green-haired virtual - rapper - whose lyrics are generated with AI, voiced by a Black artist who - claims - he was not paid for his work. -

-

- Public criticism mounted after the announcement, especially for - FN Meka’s use of the N-word—his creators are not Black—and an - Instagram - post - making light of police brutality. The nonprofit advocacy - organization Industry Blackout called Capitol’s choice to - support an “amalgamation of gross stereotypes” a “direct insult - to the Black community” in an - open letter. Capitol Records apologized and severed ties with the digital - rapper. -

-

- It doesn’t take an industry expert to recognize the - tone-deafness, but an expert might better explain - why it happened at all. - Andrew Barber, owner of media company Fake Shore Drive and - Grammy board member, thought FN Meka was a terrible idea from - the jump. But Barber predicts there are more AI-generated - artists to come, and his explanation isn’t limited to the music - industry. -

-

- “FN Meka might be gone, but you better believe that companies - are looking for any way to cut corners to make more money with - less hassle,” he said. -

-

- Though AI is heralded as the tech of the future, right now it’s - raising questions about exploitation and racism in the present. - Who gets cut out for the sake of profitability? And who gets to - make a profit?
-

-

- —Ashwin Rodrigues -

-
- -

-   -   -   - - -

- -
- - - - - - -
- - - -

SUNDAY FUNDAY

- - - -
- - - - - - - - - -
- - - -

LONG READ

- - - -
- - - - -
-

- Break dancing is about to get its Olympic moment - -

-

- - Christian Blaza -

-
-

- The Olympics may never be the same. Not that they ever are, - given its historic flux. The pandemic-delayed 2020 Olympics in - Tokyo added five sports: baseball and softball, karate, - skateboarding, sports climbing, and surfing. The upcoming 2024 - Games in Paris have already done away with karate and - baseball/softball. Only one addition was made—breaking, a sport - better known by its pop bastardization: breakdancing. -

-

- It will debut in Paris not on a mat in a gym, but on a - high-production dance floor with the Eiffel Tower as a backdrop. - This won’t just be the Olympic debut of a sport. It will be the - Olympic debut of a spectacle. -

-

- Breaking’s inclusion is the latest twist in the long, fluxed-up - history of the Olympics. Badminton is an Olympic sport, but - squash is not. Archery? Sure. Darts? Nah. Curling is in. But not - bowling. For all its put-upon, carved-in-stone institutionalism, - the Olympics can be nonsensically mercurial. Breaking’s debut - will push Olympic eccentricity to its limits. -

-

- Ironically, alongside Olympic expansion is its crisis of - contraction. The Olympics as a television program is in ratings - freefall: NBC, which held the American broadcasting rights for - the 2020 Tokyo Olympics, said that the games averaged 15.6 - million prime-time viewers per night, the lowest of any Olympics - in a generation—Summer or Winter—and almost a 50 percent drop - from the 2016 Rio Games. Night by night, Tokyo saw the nine - smallest prime-time audiences since 1992. -

-

- And that audience is increasingly older (the median age of - viewers for the 2020 Games was 58). That milquetoast appeal is - reflected in the IOC’s top-tier sponsors, which included - Allianz, Bridgestone, Deloitte, Intel, Omega, Procter & - Gamble, Toyota, and Visa. All brands that scream middle-aged - dad. -

-

- Plus, the Olympics isn’t exactly following socially conscious - trends. A scathing 2021 - analysis - of Olympic sustainability found an overall ecological, economic, - and social sustainability score of 48 on a scale of 100 across - 16 Summer and Winter Games, with a marked decrease in the - sustainability of the Games over time (it’s part of why - youth-led campaigns to keep the Olympics out of their cities - have gained traction). “Olympic Games from 1992 to 2008 have a - mean sustainability score of 53 points, whereas those since - Vancouver 2010 stand at only 39 points,” the analysis found. -

-

- This is the graying, grim landscape into which breaking—an - intrinsically cool sport for which - a 2012 semifinal has 93 million views on YouTube—will debut. It’s shepherded by Shawn Tay, the president of the - World DanceSport Federation (WDSF). Tay, who is 65 and lives in - Singapore, retired from ballroom dancing in 1994. He isn’t the - obvious cultural ambassador for breaking’s Olympic moment, but - the WDSF has been speaking the IOC’s language for decades. -

-

- The WDSF courted IOC power players and commissioned a PwC - assessment on the sport’s marketing prospects. Now the - organization is in charge of overseeing the qualification - process that will winnow 80 athletes from around the world down - to 32 Olympic breaking opportunities (an equal number for men - and women) in Paris. -

-

- Tay compared his task to running a restaurant despite not - knowing how to cook. “I will not be the one doing the cooking. - But I’m doing the management,” he told Morning Brew. “And I’m - helping the chef understand how a restaurant works—with - discipline, timetables, and an approach of how to bring ideas to - market.” -

-

- “A new generation of people can no longer watch a sport that - goes up and down, up and down, in circles,” he said. “Spectators - want to be stimulated. They want to feel that their bodies are - reacting to what they’re seeing. People want more excitement. In - the internet era, nobody sits and reads the newspaper for hours. - They want quick information. It’s the same thing in sports: They - want something quick. Breaking has that quality.” - Continue reading this story on breaking’s Olympic dreams - by Richard Morgan. -

-
- -

-   -   -   - - -

- -
- - - - - - -
- - - -

Q&A

- - - -
- - - - -
-

- Brew Questionnaire with Julia Turshen - -

-

- - photo: Melina Hammer -

-
-

- Julia Turshen is a chef and New York Times best-selling cookbook - writer. Her latest cookbook, - Simpy Julia, - rethinks comfort food through a healthy lens (hello, lemon - ricotta cupcakes). It was picked up by Vice President Kamala - Harris when she visited an indie bookstore in Rhode Island (she - joked that she thought it was a Julia Child book). When she’s - not writing or thinking of new recipes, Turshen talks about food - on her podcast, - Keep Calm & Cook On. - Need a Sunday night dinner upgrade? Sign up for Turshen’s - online cooking classes - every Sunday afternoon, where you can learn how to make rosemary - gin spritzers and sesame chicken schnitzel. -

-

- What’s the best advice you ever received? -

-

- On a practical note, the best advice I’ve received as a lifelong - freelancer is to think of every dollar I earn as fifty cents and - to open a separate savings account and put half of every check I - receive into it so I’m set for taxes and any other unexpected - work expenses. -

-

- On a more emotional note, the best advice I’ve ever received is - to ask for forgiveness, not permission. -

-

- What’s the most embarrassing song you’ll admit to liking - publicly? -

-

- I have no shame about anything I like! But I guess the first to - come to mind for this question is “Lean on Me,” which my spouse, - Grace, says I sing very frequently... -

-

- What fictional person do you wish were real? -

-

- As someone who has gotten into powerlifting in the last few - months, I would have to say - Luisa Madrigal - from Encanto. -

-

- What real person do you wish were fictional? -

-

Mitch McConnell.

-

- How would you explain TikTok to your - great-grandparents? -

-

- An infinite number of miniature home movies that you can watch - on a handheld device. -

-

- What always makes you laugh? -

-

- All of our pets, but especially our dog Winky, who is - particularly comical. -

-

- If you were given a billboard in Times Square, what would you - put on it? -

-

- Diet culture sucks. You are loveable. -

-

- —Interview by Sherry Qin -

-
- -

-   -   -   - - -

- -
- - - - - - -

- - - - -
- - -

TOGETHER WITH BABBEL

- - - - - Babbel - - - - - -

- How do you say…sweet deal! You could be speaking a new language in just 21 days with - your Babbel subscription (now up to 55% off for a limited - time). With bite-sized, 10-minute language lessons from - Babbel, users report being able to have a basic conversation - after just 3 weeks of daily practice. - Save up to 55% on your subscription here. -

- - -
- - - - - - -
- - - -

BREW'S BEST

- - - -
- - - - -
-

- -

-
-

- The future of drunk texting is here: Another brain-computer interface company became the first to - implant their device into a patient in the US. Synchron beat - Elon Musk’s Neuralink (among others) to implant chips into - patients’ brains. Those implants allowed them to control digital - devices via brain signals to help them text, shop, and more with - no reported serious adverse effects after 12 months. [Emerging Tech Brew] -

-

- Kaboom cats: Nora chats with Elan Lee, game designer and the co-founder and - CEO of Exploding Kittens, a card game that became the - most-backed project in Kickstarter history and has since sold - over 11 million copies. Lee talks about how he and his - co-founder turned a single piece of intellectual property into a - multiplatform brand. [Business Casual] -

-

- Invisible finger syndrome: Be careful putting your phone face down on a table anywhere - near the University of Florida. Researchers have developed a way - to make screen-clicks on your phone through a table using - electromagnetic interference from an antenna to mimic a touch - from a finger. Maybe pick a password more complicated than - 1-2-3-4! [IT Brew] -

-

- Don’t listen to Mark Zuckerberg (ever). - Don’t move fast and break things. The MFABT ethos epitomized - Facebook in the early days, and was a way to justify taking big, - audacious swings regardless of collateral damage, which meant - it…broke a lot of things. And when it comes to protecting your - company’s assets, moving fast and breaking things is a really, - really bad idea, experts say. [CFO Brew] -

-

- The best thing we read this week: The iconoclastic film studio A24 has bred superfans, dropped - swag, and perfected a unique house style. It’s also teetering on - the verge of self-parody, and New York Magazine’s in-depth look - at the studio explains the hows and whys. Read it and then watch - Bodies, Bodies, Bodies - anyway. [New York Magazine] -

-

- Achieve thicker, fuller hair: Meet - Revela, the only non-Rx brand that helps you tackle hair loss at the - root. It shows results up to 4x faster than traditional - solutions. - Learn more.* -

- -

- *This is sponsored advertising content. -

-
- - -
- - - - - - -
- - - -

THE END

- - - -
- - - - -
-

- -

-
-

- null -

-

- —Amanda Hoover -

-
- - -
- - - - - - - -

-   -   -   -   -   - - -

-
- - -

- Written by - Rohan Anthony, - Stassa Edwards, - Amanda Hoover, - Sherry Qin, - Ashwin Rodrigues, and - Holly Van Leuven - -

-

- Was this email forwarded to you? Sign up - here -

- - - - - ADVERTISE - // - CAREERS - // - SHOP - // - FAQ -

- Update your email preferences or unsubscribe - here.
- View our privacy policy - here. -

-

- Copyright © 2022 Morning Brew. All rights reserved. -
- 22 W 19th St, 4th Floor, New York, NY 10011 -

- - -
- - - -
-
-
diff --git a/packages/readabilityjs/test/test-pages/morning-brew/source.html b/packages/readabilityjs/test/test-pages/morning-brew/source.html deleted file mode 100644 index 77053cdeb..000000000 --- a/packages/readabilityjs/test/test-pages/morning-brew/source.html +++ /dev/null @@ -1,846 +0,0 @@ - - - - Brew Review - - - - - - - - - - - - - - - - - - -
- Break dancing goes for the gold -
-
- - Advertisement -
-
- -
- - - - - - -
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - -
- - -
-
- - - - - - - -
-

- Together with -

-
- Apple Card - -
-
- - - - - - -
- August 28, 2022 - | - View Online - | - Sign Up - | - Shop -
-
- A gif of breakdancers on ancient vase -

- Christian Blaza -

-
- - - - - - - - - -
-

- IN THIS ISSUE -

-
-

- Break dancing is about to make the Olympics a lot cooler -

-
-

- The AI rapper no one wanted -

-
-

- And chef Julia Turshen -

-
-
- - - - -
-
- -
-
-
- - - - - - - - - - -
- Apple Card -
-
-
-
-
- - - - - - -
-
- -
-
-

- VIBE CHECK -

-
-
- -
-
-
-
-

- - -

-
-

I would be bummed if I suddenly started existing somewhere I wasn’t supposed to exist and everyone started killing me for it.”—Catherine Bonner to the New York Times regarding the ongoing Lanternfly War

-

You can break your back, on the giant slide. You can even break your neck, on the giant slide. You can even bump your head, on the giant slide.”—Gmac Cash rapping about the dangerous giant slide in Detroit

-

I look down at the face of my sleeping child and I vow: If this baby’s life is even one particle easier than mine was, I will burn this whole place down!”—Alexandra Petri in a satirical Washington Post Op-Ed regarding President Biden’s plan to cancel up to $20,000 in student debt

-
- - -
-
- - - - - - -
-
- -
-
-

- GREAT DEBATE -

-
-
- -
-
-
-
-

- - -

-
- null

Amanda Hoover

-
- - -
-
- - - - - - -
-
- -
-
-

- GROUP CHAT -

-
-
- -
-
-
-
-

- It’s artificial, but is it intelligent? - -

- It’s artificial, but is it intelligent? - Illustration: Will Varner, Photo: Capitol Records -
-

Tech startup Sanas offers real-time accent removal for businesses. On its website, visitors can hear an Indian accent neutralized to be nondescript, a literal code switch. It “wants to make the world sound whiter,” SFGate argued. Meanwhile, FN Meka—a virtual, slur-slinging rapper who bears a striking resemblance to the deeply controversial rapper 6ix9ine—recently signed, and then quickly lost, a record deal with Capitol Records. Both are AI-powered projects that have been criticized as racist.

“There’s a long history of technology reinforcing racism,” Dylan Baker, a research engineer at the Distributed AI Research (DAIR) Institute, told Morning Brew.

-

Sanas raised over $37 million in funding, including a $32 million Series A round. The founders, who met as Stanford undergrads, had a college friend who was harassed for his Central American accent during his job in a call center. That’s not an unusual experience: verbal abuse and racism are routine for workers in these jobs. But Sanas’s pitch deck isn’t just about protecting low-paid workers. It notes “accent differences have a profound impact on customer satisfaction,” but “nearshoring/reshoring” jobs can be more than twice as expensive. (The 2018 dark comedy Sorry to Bother You predicted the profitability of a white voice in call centers.)

-

But hiding accents with AI presents a dilemma. “It does sound like it would reinforce the idea that call center workers are second-class citizens who are only deserving of a harassment-free environment if they sound appropriately white,” Baker said.

-

While Sanas may seem like digital whiteface, FN Meka came under fire for a different offense: digital blackface. Created by “virtual label” Factory New in 2021, FN Meka is a green-haired virtual rapper whose lyrics are generated with AI, voiced by a Black artist who claims he was not paid for his work.

-

Public criticism mounted after the announcement, especially for FN Meka’s use of the N-word—his creators are not Black—and an Instagram post making light of police brutality. The nonprofit advocacy organization Industry Blackout called Capitol’s choice to support an “amalgamation of gross stereotypes” a “direct insult to the Black community” in an open letter. Capitol Records apologized and severed ties with the digital rapper.

-

It doesn’t take an industry expert to recognize the tone-deafness, but an expert might better explain why it happened at all. Andrew Barber, owner of media company Fake Shore Drive and Grammy board member, thought FN Meka was a terrible idea from the jump. But Barber predicts there are more AI-generated artists to come, and his explanation isn’t limited to the music industry.

-

“FN Meka might be gone, but you better believe that companies are looking for any way to cut corners to make more money with less hassle,” he said.

-

Though AI is heralded as the tech of the future, right now it’s raising questions about exploitation and racism in the present. Who gets cut out for the sake of profitability? And who gets to make a profit?

-

—Ashwin Rodrigues

-
- - - - - -
- - - - - - - - -
- -
-
- - - - - - -
-
- -
-
-

- SUNDAY FUNDAY -

-
-
- -
-
-
-
-

- Brew Mini - -

-

A Sunday crossword that nods to the news of the week. Play it here.

- - -
-
- - - - - - -
-
- -
-
-

- LONG READ -

-
-
- -
-
-
-
-

- Break dancing is about to get its Olympic moment - -

- Classical sculpture of discus thrower next to an image of a breakdancer rendered as a classical sculpture all set on a red background - Christian Blaza -
-

The Olympics may never be the same. Not that they ever are, given its historic flux. The pandemic-delayed 2020 Olympics in Tokyo added five sports: baseball and softball, karate, skateboarding, sports climbing, and surfing. The upcoming 2024 Games in Paris have already done away with karate and baseball/softball. Only one addition was made—breaking, a sport better known by its pop bastardization: breakdancing.

-

It will debut in Paris not on a mat in a gym, but on a high-production dance floor with the Eiffel Tower as a backdrop. This won’t just be the Olympic debut of a sport. It will be the Olympic debut of a spectacle.

-

Breaking’s inclusion is the latest twist in the long, fluxed-up history of the Olympics. Badminton is an Olympic sport, but squash is not. Archery? Sure. Darts? Nah. Curling is in. But not bowling. For all its put-upon, carved-in-stone institutionalism, the Olympics can be nonsensically mercurial. Breaking’s debut will push Olympic eccentricity to its limits.

-

Ironically, alongside Olympic expansion is its crisis of contraction. The Olympics as a television program is in ratings freefall: NBC, which held the American broadcasting rights for the 2020 Tokyo Olympics, said that the games averaged 15.6 million prime-time viewers per night, the lowest of any Olympics in a generation—Summer or Winter—and almost a 50 percent drop from the 2016 Rio Games. Night by night, Tokyo saw the nine smallest prime-time audiences since 1992.

-

And that audience is increasingly older (the median age of viewers for the 2020 Games was 58). That milquetoast appeal is reflected in the IOC’s top-tier sponsors, which included Allianz, Bridgestone, Deloitte, Intel, Omega, Procter & Gamble, Toyota, and Visa. All brands that scream middle-aged dad.

-

Plus, the Olympics isn’t exactly following socially conscious trends. A scathing 2021 analysis of Olympic sustainability found an overall ecological, economic, and social sustainability score of 48 on a scale of 100 across 16 Summer and Winter Games, with a marked decrease in the sustainability of the Games over time (it’s part of why youth-led campaigns to keep the Olympics out of their cities have gained traction). “Olympic Games from 1992 to 2008 have a mean sustainability score of 53 points, whereas those since Vancouver 2010 stand at only 39 points,” the analysis found.

-

This is the graying, grim landscape into which breaking—an intrinsically cool sport for which a 2012 semifinal has 93 million views on YouTube—will debut. It’s shepherded by Shawn Tay, the president of the World DanceSport Federation (WDSF). Tay, who is 65 and lives in Singapore, retired from ballroom dancing in 1994. He isn’t the obvious cultural ambassador for breaking’s Olympic moment, but the WDSF has been speaking the IOC’s language for decades.

-

The WDSF courted IOC power players and commissioned a PwC assessment on the sport’s marketing prospects. Now the organization is in charge of overseeing the qualification process that will winnow 80 athletes from around the world down to 32 Olympic breaking opportunities (an equal number for men and women) in Paris.

-

Tay compared his task to running a restaurant despite not knowing how to cook. “I will not be the one doing the cooking. But I’m doing the management,” he told Morning Brew. “And I’m helping the chef understand how a restaurant works—with discipline, timetables, and an approach of how to bring ideas to market.”

-

“A new generation of people can no longer watch a sport that goes up and down, up and down, in circles,” he said. “Spectators want to be stimulated. They want to feel that their bodies are reacting to what they’re seeing. People want more excitement. In the internet era, nobody sits and reads the newspaper for hours. They want quick information. It’s the same thing in sports: They want something quick. Breaking has that quality.” Continue reading this story on breaking’s Olympic dreams by Richard Morgan.

-
- - - - - -
- - - - - - - - -
- -
-
- - - - - - -
-
- -
-
-

- Q&A -

-
-
- -
-
-
-
-

- Brew Questionnaire with Julia Turshen - -

- Brew Questionnaire with Julia Turshen - photo: Melina Hammer -
-

Julia Turshen is a chef and New York Times best-selling cookbook writer. Her latest cookbook, Simpy Julia, rethinks comfort food through a healthy lens (hello, lemon ricotta cupcakes). It was picked up by Vice President Kamala Harris when she visited an indie bookstore in Rhode Island (she joked that she thought it was a Julia Child book). When she’s not writing or thinking of new recipes, Turshen talks about food on her podcast, Keep Calm & Cook On. Need a Sunday night dinner upgrade? Sign up for Turshen’s online cooking classes every Sunday afternoon, where you can learn how to make rosemary gin spritzers and sesame chicken schnitzel.

-

What’s the best advice you ever received?

-

On a practical note, the best advice I’ve received as a lifelong freelancer is to think of every dollar I earn as fifty cents and to open a separate savings account and put half of every check I receive into it so I’m set for taxes and any other unexpected work expenses.

-

On a more emotional note, the best advice I’ve ever received is to ask for forgiveness, not permission.

-

What’s the most embarrassing song you’ll admit to liking publicly?

-

I have no shame about anything I like! But I guess the first to come to mind for this question is “Lean on Me,” which my spouse, Grace, says I sing very frequently...

-

What fictional person do you wish were real?

-

As someone who has gotten into powerlifting in the last few months, I would have to say Luisa Madrigal from Encanto.

-

What real person do you wish were fictional?

-

Mitch McConnell.

-

How would you explain TikTok to your great-grandparents?

-

An infinite number of miniature home movies that you can watch on a handheld device.

-

What always makes you laugh?

-

All of our pets, but especially our dog Winky, who is particularly comical.

-

If you were given a billboard in Times Square, what would you put on it?

-

Diet culture sucks. You are loveable.

-

—Interview by Sherry Qin

-
- - - - - -
- - - - - - - - -
- -
-
- - - - -
-
- -
-
-
- - - - - - - - - - -
- Babbel -
-
-
-
-
- - - - - - -
-
- -
-
-

- BREW'S BEST -

-
-
- -
-
-
-
-

- - -

-
-

The future of drunk texting is here: Another brain-computer interface company became the first to implant their device into a patient in the US. Synchron beat Elon Musk’s Neuralink (among others) to implant chips into patients’ brains. Those implants allowed them to control digital devices via brain signals to help them text, shop, and more with no reported serious adverse effects after 12 months. [Emerging Tech Brew]

-

Kaboom cats: Nora chats with Elan Lee, game designer and the co-founder and CEO of Exploding Kittens, a card game that became the most-backed project in Kickstarter history and has since sold over 11 million copies. Lee talks about how he and his co-founder turned a single piece of intellectual property into a multiplatform brand. [Business Casual]

-

Invisible finger syndrome: Be careful putting your phone face down on a table anywhere near the University of Florida. Researchers have developed a way to make screen-clicks on your phone through a table using electromagnetic interference from an antenna to mimic a touch from a finger. Maybe pick a password more complicated than 1-2-3-4! [IT Brew]

-

Don’t listen to Mark Zuckerberg (ever). Don’t move fast and break things. The MFABT ethos epitomized Facebook in the early days, and was a way to justify taking big, audacious swings regardless of collateral damage, which meant it…broke a lot of things. And when it comes to protecting your company’s assets, moving fast and breaking things is a really, really bad idea, experts say. [CFO Brew]

-

The best thing we read this week: The iconoclastic film studio A24 has bred superfans, dropped swag, and perfected a unique house style. It’s also teetering on the verge of self-parody, and New York Magazine’s in-depth look at the studio explains the hows and whys. Read it and then watch Bodies, Bodies, Bodies anyway. [New York Magazine]

-

-

Achieve thicker, fuller hair: Meet Revela, the only non-Rx brand that helps you tackle hair loss at the root. It shows results up to 4x faster than traditional solutions. Learn more.*

*This is sponsored advertising content.

-
- - -
-
- - - - - - -
-
- -
-
-

- THE END -

-
-
- -
-
-
-
-

- - -

-
- null

—Amanda Hoover

-
- - -
-
- - - - - -
- - - - - - - - - - - - -
- - - - - - - -
-

- Written by Rohan Anthony, Stassa Edwards, Amanda Hoover, Sherry Qin, Ashwin Rodrigues, and Holly Van Leuven -

-

- Was this email forwarded to you? Sign up - here -

-
-

- WANT MORE BREW? -

-

- -Industry news, with a sense of humor → - -

-
    -
  • - CFO Brew: your go-to source for global finance insights - -
  • -
  • - Emerging Tech Brew: AI, crypto, space, autonomous vehicles, and more - -
  • -
  • - Future Social: the Brew's take on the world of social media - -
  • -
  • - HR Brew: analysis of the employee-employer relationship - -
  • -
  • - IT Brew: moving business forward; innovation analysis for the CTO, CIO & every IT pro in-between - -
  • -
  • - Marketing Brew: the buzziest happenings in marketing and advertising - -
  • -
  • - Retail Brew: retail trends from DTC to "buy now, pay later" - -
  • -
-

- -Tips for smarter living → - -

-
    -
  • - Money Scoop: your personal finance upgrade - -
  • -
  • - Money With Katie: manifest your financial freedom - -
  • -
  • - Sidekick: lifestyle recs from every corner of the internet - -
  • -
-

- - -Podcasts → - - Business Casual, - Founder's Journal, - Imposters, and - The Money with Katie Show -

-

- - - YouTube - -

-

- -Accelerate Your Career with our Courses → - -

- -
-
- ADVERTISE - // - CAREERS - // - SHOP - // - FAQ -
-
- Update your email preferences or unsubscribe - here. -
- View our privacy policy - here. -
-
- Copyright © 2022 Morning Brew. All rights reserved. -
- 22 W 19th St, 4th Floor, New York, NY 10011 -
-
-
- -
-
- -
- - diff --git a/packages/readabilityjs/test/test-pages/morning-brew/url.txt b/packages/readabilityjs/test/test-pages/morning-brew/url.txt deleted file mode 100644 index 2acf3e508..000000000 --- a/packages/readabilityjs/test/test-pages/morning-brew/url.txt +++ /dev/null @@ -1 +0,0 @@ -https://www.morningbrew.com/daily/issues/breaking-ground?utm_source=header_signup&utm_medium=newsletter&utm_campaign=mb&mid=9ab421de712275aea1b00553124b59a0 \ No newline at end of file diff --git a/packages/readabilityjs/test/test-pages/morning-brew/expected-metadata.json b/packages/readabilityjs/test/test-pages/newsletters/morning-brew/expected-metadata.json similarity index 65% rename from packages/readabilityjs/test/test-pages/morning-brew/expected-metadata.json rename to packages/readabilityjs/test/test-pages/newsletters/morning-brew/expected-metadata.json index d285066e2..5deab49f1 100644 --- a/packages/readabilityjs/test/test-pages/morning-brew/expected-metadata.json +++ b/packages/readabilityjs/test/test-pages/newsletters/morning-brew/expected-metadata.json @@ -1,8 +1,8 @@ { - "title": "Brew Review", + "title": "Daily Brew // Morning Brew // Update", "byline": null, "dir": null, - "excerpt": "Together with", + "excerpt": "", "siteName": null, "publishedDate": null, "language": "English", diff --git a/packages/readabilityjs/test/test-pages/newsletters/morning-brew/expected.html b/packages/readabilityjs/test/test-pages/newsletters/morning-brew/expected.html new file mode 100644 index 000000000..8723e094f --- /dev/null +++ b/packages/readabilityjs/test/test-pages/newsletters/morning-brew/expected.html @@ -0,0 +1,550 @@ +
+
+ + +
+ + +
+ + +
+ + September 13, 2022 + View Online | Sign Up | Shop + + +
+
+

+ Morning Brew + +

+
+
+ + +

TOGETHER WITH

+ + Facet Wealth + + +
+
+

Good morning. Apple’s iOS 16 dropped for iPhone users yesterday, and once you download the software update you’ll be able to edit an iMessage within 15 minutes of sending it and delete one within two minutes. While that may be useful for most people, the only text we’ve ever regretted sending was, “Sure I’ll go to your friend’s improv show.”

+

Max Knoblauch, Abby Rubenstein, Matty Merritt

+
+ + +
+ + + +
+ + +
+

MARKETS

+
+
+ + + + + +
+ + + + + +

Nasdaq

+ + +

12,266.41

+ + +
+

+1.27%

+
+ + +
+ + + + + +
+ + + + + +

S&P

+ + +

4,110.41

+ + +
+

+1.06%

+
+ + +
+ + + + + +
+ + + + + +

Dow

+ + +

32,381.34

+ + +
+

+0.71%

+
+ + +
+ + + + + +
+ + + + + +

10-Year

+ + +

3.358%

+ + +
+

+4.3 bps

+
+ + +
+ + + + + +
+ + + + + +

Bitcoin

+ + +

$22,311.05

+ + +
+

+3.05%

+
+ + +
+ + + + + +
+ + + + + +

Apple

+ + +

$163.43

+ + +
+

+3.85%

+
+ + +
+ + + + + +

*Stock data as of market close, cryptocurrency data as of 11:00pm ET. Here's what these numbers mean.

+ + + + +
    +
  • Markets: Stocks continued to rally yesterday, with the S&P 500 posting its biggest four-day gain since June. Helping to boost markets was Apple, which rose on bullish news about preorders for the iPhone 14 Pro Max.
  • +
  • Economy: Happy CPI Day to all who celebrate. The consumer price index report that drops this morning is expected to show that inflation fell to 8% last month. It’s the last major piece of data that will arrive before the Fed decides how big to go on interest rate hikes next week.
  • +
+ + + + + + +
+ + +
+ + + +
+ + +
+

AUTO

+

+ Nikola founder’s fraud trial gets rolling +

+
woman with back to camera looking at paintings + Stefan Puchner/Getty Images +
+
+

The fraud trial of Trevor Milton, the founder and former CEO of electric truck company Nikola Motors, began yesterday with jury selection. Milton, who pleaded not guilty in the case, stands accused of lying about his company’s progress in developing electric vehicles, leading to huge losses for investors.

+

The case—a shoo-in for Hulu’s next ripped-from-the-headlines original that everyone at work except you is watching—is seen as a cautionary tale of buying into the hype around companies before they deliver a single product.

+

So how did Nikola go from the third-largest auto company in the US in 2020 with a $33 billion market value to just a $2.3 billion market value as of yesterday with an indicted founder?

+

A hype-y road

+

Milton founded Nikola in 2015, capitalizing on investor fervor around EVs, particularly those made by Elon Musk’s Tesla. In June 2020, the company went public via a SPAC. Prosecutors claim that Milton misled investors by making false claims about Nikola’s ability to produce hydrogen and by releasing a now-infamous promotional video that showed a moving Nikola truck (not disclosed: the truck was merely rolling downhill in neutral).

+

Beyond simply drumming up name association with retail investor darling Tesla, Milton also deliberately targeted less knowledgeable investors by promoting Nikola’s stock on social media and in interviews, prosecutors allege.

+

And those retail investors ultimately bore the brunt of Nikola’s losses when its stock dropped 40% following Milton’s resignation in September 2020, days after an activist short seller published a scathing report calling the company an “intricate fraud built on dozens of lies.”

+

Where things stand now

+

In December, Nikola agreed to pay a $125 million penalty to settle an SEC fraud investigation. The company, which is still around and has begun production on a battery-powered semi-truck model, reported a net loss of $173 million in the second quarter.

+

Before stepping down, Milton purchased a $32.5 million Utah ranch and a jet, and since his resignation, he has sold more than $300 million in company stock. The main charge against him carries a maximum sentence of 25 years, though he’s likely to see much less time, if he’s even convicted.—MK

+
+

+ + + +

+
+ + +
+ + + +
+ + +
+

TOGETHER WITH FACET WEALTH

+

+ + Money on everyone’s mind + +

+
+
+

In our current economic state, there’s a lot of attention on money—how much it’s worth, how much we pay in interest, inflation, the list goes on.

+

And if all that news has stirred up questions like, “Am I doing the right things with my money so that I can get the most out of life?” Facet can help.

+

Their CERTIFIED FINANCIAL PLANNER™ professionals work with you 1:1 for an affordable fixed fee to answer questions about your entire financial life, not just basic money management. Plus, their proprietary tech helps you get the full picture of where you’re at financially and where you’re going.

+

Brew readers get 2 free* months in their first year of financial planning. Sign up here.

+

+ + + + +

+
+ + +
+ + + +
+ + +
+

WORLD

+

+ + Tour de headlines + +

+
President Biden + Mandel Ngan/Getty Images +
+

Biden goes for a “moonshot” on cancer. Referencing JFK’s famous speech on its 60th anniversary, President Biden said yesterday he’s laying out his “moonshot” for eradicating cancer. The plan involves a new department focused on health and biomedical research, executive orders beefing up domestic biomanufacturing, and a government group called the “Cancer Cabinet.” In hopeful news that might help move things along, drugmaker Amgen reported its new cancer drug was more effective in some areas than chemo for late-stage lung cancer patients.

+

Goldman Sachs to lay off hundreds. The bank plans to reinstate annual employee culls, which it had suspended during the pandemic, and may start cutting jobs as soon as next week. Typically, Goldman targets between 1% and 5% of its workforce for layoffs each year, and this round is expected to be at the lower end of the spectrum (current headcount: 47,000). The expected layoffs come after Goldman’s profits fell by nearly half in the second quarter compared to the year before as deal-making slowed.

+

15,000 nurses walked off the job in Minnesota. The nurses involved in the largest-ever private sector nursing strike in the US plan to stay out for three days to demand fixes for understaffing, as well as higher pay. Though this strike targets 13 hospitals in the Minneapolis–St. Paul area, facilities across the country had trouble finding enough nurses even before the pandemic. Unions in at least two other states have also authorized work stoppages in the past month.

+
+ + +
+ + + +
+ + +
+

EDUCATION

+

+ The list that no one likes is out +

+
Students walking on campus in the fall. + Jon Lovette/Getty Images +
+
+

US News & World Report released its yearly ranking of the best colleges in the country yesterday. But this year’s list comes amid a growing number of complaints about how the scores that mean a lot to wide-eyed future loan borrowers (and the administrators who will eventually ask them for money) are calculated.

+

Besides controversial criteria like incoming students’ SAT scores and the level of alumni donations, one of the main problems critics have with the list is that it attributes 20% of its ranking formula to what amounts to basically a popularity contest. US News sends a yearly survey to college admins asking them to rate other schools’ “academic quality.”

+

Even Education Secretary Miguel Cardona, although not referring to the US News list directly, said last month that college rankings that value reputation above things like economic mobility are “a joke.”

+

There’s even more drama this year…Columbia University dropped from No. 2 to No. 18 because it didn’t submit any data while it investigated a math professor’s claims that the school might be fudging some numbers. On Friday, the university admitted to the fudging.

+

Final fun fact: 19 of the top 20 schools on this year’s list cost + $55,000+ per year to attend.—MM

+
+

+ + + +

+
+ + +
+ + + +
+ + +
+

FOOD & BEVERAGE

+

Starbucks puts the ‘mint’ in peppermint

+
A girl drinks from a Starbucks cup while looking at her phone + Zhang Peng/Getty Images +
+
+

The Starbucks customer loyalty program inspires more devotion than the Mocha Joe’s punch card that always gets lost in your wallet. Now the coffee chain is trying to spark even more loyalty by taking its app-based program to the next technological level with NFTs.

+

The company unveiled its Starbucks Odyssey program yesterday, a platform using Polygon, an Ethereum network, that coffee drinkers can log into with their existing program credentials to play games or take challenges to earn non-fungible tokens. They’ll also be available for purchase via credit card, no crypto necessary.

+

These NFTs, called “journey stamps,” will unlock rewards for users that go beyond the typical free coffee, like events or trips.

+

Customers can join a waitlist now, but only time will tell whether people will be clambering for coffee-themed digital art. The project is a relatively recent one—an exec told TechCrunch it’s only been in the works for six months, but in that time the market for NFTs has changed drastically. Trading volume at OpenSea, the most popular NFT marketplace, plunged 99% from early May to late August, per Fortune.

+

Zoom out: The Web3 push is one of many big changes coming to Starbucks. A new leader will succeed interim CEO Howard Schultz, but not before Schultz lays out a new strategy at today’s investor day that’s aimed at boosting efficiency.—AR

+
+

+ + + +

+
+ + +
+ + + +
+ + + A phone with an Instagram Reels icon and a 0 views notification + Francis Scialabba +
+

Stat: People spend 17.6 million hours a day watching Instagram Reels, just a fraction of the 197.8 million hours users waste daily on TikTok, according to an internal Meta document viewed by the Wall Street Journal. While Reels might seem inescapable in your feed, engagement is trending down, dropping 13.6% in August from the month before, the document showed.

+

Quote: “Nothing can justify the persistence of this fundamental abuse of human rights.”

+

The director-general of the UN’s labor standards agency yesterday called for an “all-hands-on-deck approach” to combating modern slavery after releasing a report that found 50 million people were living in modern slavery—28 million in forced labor and 22 million in forced marriages in 2021. That’s 10 million more than in 2016.

+

Read: Johnson & Johnson and a new war on consumer protection. (The New Yorker)

+
+ + +
+ + + + + + + +
+ + +
+

WHAT ELSE IS BREWING

+
+
+
    +
  • Ukraine took back territory from Russia all the way to its northeastern border in some areas, leading one former member of Russia’s parliament to call for peace talks on live TV.
  • +
  • Streaming services had a good night at the Emmys, with HBO Max’s Succession winning best drama and The White Lotus nabbing the statue for best limited series. The Apple TV+ series Ted Lasso took the top prize for a comedy series.
  • +
  • Twitter whistleblower Peiter “Mudge” Zatko will testify today before the Senate Judiciary Committee about the platform’s privacy and security vulnerabilities. +
  • +
  • Elon Musk’s college girlfriend is auctioning off mementos she saved from the relationship, including photos and a signed birthday card.
  • +
+
+ + +
+ + + +
+ + +
+

BREW'S BETS

+
+
+

Taking back texts: A complete guide to Apple’s new operating system, which lets you personalize your lock screen and a lot more.

+

Sleight of hand: Watch the reigning world champion of card magic (a real title) do his thing.

+

Interesting pod alert: After years on a personal odyssey, journalist Lauren Ober found out she was autistic. The Loudest Girl in the World shares Lauren’s journey once she was diagnosed. Listen now.

+

Just like ⌘C, ⌘V: With CopyTrader,™ eToro’s most popular feature, you can automatically copy the moves of real investors in real time. No more second-guessing your crypto decisions. Get started today.*

+ + +

+ *This is sponsored advertising content. +

+
+ + +
+ + + +
+ + +
+

GAMES

+

+ + The puzzle section + +

+
+
+

Brew Mini: If you know what kind of car James Bond drives, you’re more than 10% of the way to completing today’s Mini. Solve it here.

+

Tagline trivia

+

There’s nothing cringier than a movie tagline. We’ll give you the tagline for a film, and you have to name the film.

+
    +
  1. “Midnight never strikes when you’re in love.”
  2. +
  3. “Work sucks.”
  4. +
  5. “You don’t get to 500 million friends without making a few enemies.”
  6. +
  7. “The longer you wait, the harder it gets.”
  8. +
  9. “A comedy of trial and error.”
  10. +
+
+ + +
+ + + +
+ + + How to save money in a recession + +
+

Saving at any point can be a challenge. Saving during an economic downturn? Mission impossible. But Anish Mitra uses his knowledge from 10 years on Wall Street to teach you how saving amid slowing economic growth doesn't have to be difficult. Watch here.

+

Check out more from the Brew: +

+

On Business Casual: Nora chats with Alex Ma, the CEO and co-founder of Poparazzi, an app that allows you to build your friends’ profile pages instead of your own. Listen or watch here.

+

Ready to jumpstart your career but don’t know where to start? We’ve got you covered. Take our short quiz and find out which Morning Brew Accelerator is right for you.

+
+ + +
+ + + + + + + +
+ + +
+

+ + Answer + +

+
+
+

1. Cinderella

+

2. Office Space

+

3. The Social Network

+

4. The 40-Year-Old Virgin

+

5. My Cousin Vinny

+
+ + +
+ + + +
+ + +
+

+ ✢ A Note From Facet Wealth +

+

Facet Wealth is an SEC Registered Investment Advisor headquartered in Baltimore, Maryland. This is not an offer to sell securities or the solicitation of an offer to purchase securities. This is not investment, financial, legal, or tax advice.

+

*Two months free offer is only valid for an annual fee paid at the time of signing.

+
+ + +
+ +

+ + +

+
+ + +

Written by Abigail Rubenstein, Max Knoblauch, and Matty Merritt

+

Was this email forwarded to you? Sign up here.

+ + + + + ADVERTISE // CAREERS // SHOP // FAQ +

Update your email preferences or unsubscribe here.
View our privacy policy here.

+

Copyright © 2022 Morning Brew. All rights reserved.
22 W 19th St, 4th Floor, New York, NY 10011

+ + +
+
+ + +
+
\ No newline at end of file diff --git a/packages/readabilityjs/test/test-pages/newsletters/morning-brew/source.html b/packages/readabilityjs/test/test-pages/newsletters/morning-brew/source.html new file mode 100644 index 000000000..5896300f5 --- /dev/null +++ b/packages/readabilityjs/test/test-pages/newsletters/morning-brew/source.html @@ -0,0 +1,1969 @@ + + + + + + + + Daily Brew // Morning Brew // Update + + + + + + + + + +
A trial over EV fraud gets going...
+
+ + + + +
+ +
+ + +
+ + + + + +
+ + + + + +
+ September 13, 2022 View + Online | Sign + Up | Shop +
+ + + + +
+

+ Morning Brew +

+
+ + + + + +
Facet Wealth +
+ + + + +
+
+

Good morning. Apple’s iOS 16 + dropped for iPhone users yesterday, and once you download the + software update you’ll be able to edit an iMessage within 15 + minutes of sending it and delete one within two minutes. While + that may be useful for most people, the only text we’ve ever + regretted sending was, “Sure I’ll go to your friend’s improv + show.”

+

Max + Knoblauch, Abby Rubenstein, Matty Merritt

+
+
+
+ +
+ + + +
+
+ + + + + +
+ + + + +
+

+ MARKETS

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ +

+ Nasdaq

+
+

+ 12,266.41

+
+ + + + + +
+
+ + + + + + + +
+ +

+ S&P

+
+

+ 4,110.41

+
+ + + + + +
+
+ + + + + + + +
+ +

+ Dow

+
+

+ 32,381.34

+
+ + + + + +
+
+ + + + + + + +
+ +

+ 10-Year

+
+

+ 3.358%

+
+ + + + + +
+
+ + + + + + + +
+ +

+ Bitcoin

+
+

+ $22,311.05

+
+ + + + + +
+
+ + + + + + + +
+ +

+ Apple

+
+

+ $163.43

+
+ + + + + +
+
+

+ *Stock data as of market close, cryptocurrency data as of + 11:00pm ET. Here's + what these numbers mean.

+
+
    +
  • Markets: + Stocks continued to + rally + yesterday, with the S&P 500 posting its biggest four-day + gain since June. Helping to boost markets was Apple, + which rose on bullish news about preorders for the + iPhone 14 Pro Max.
  • +
  • Economy: + Happy CPI Day to all who + celebrate. The consumer price index report that drops + this morning is expected to show that inflation + fell + to 8% last month. It’s the last major piece of data that + will arrive before the Fed decides how big to go on + interest rate hikes next week.
  • +
+
+
+
+ +
+
+ + + +
+ + + + + +
+ + + + +
+

+ AUTO

+

+ Nikola founder’s fraud trial gets rolling + +

+
woman with back to camera looking at paintings + Stefan + Puchner/Getty Images + + + + +
+
+

The + fraud trial + of Trevor Milton, the founder and former CEO of electric truck + company Nikola Motors, began yesterday with jury selection. + Milton, who pleaded not guilty in the case, stands accused of + lying about his company’s progress in developing electric + vehicles, leading to huge losses for investors.

+

The + case—a shoo-in for Hulu’s next ripped-from-the-headlines + original that everyone at work except you is watching—is seen as + a cautionary tale of buying into the hype around companies + before they deliver a single product.

+

So how + did Nikola go from the third-largest auto company in the US in + 2020 with a $33 billion market value to just a $2.3 billion + market value as of yesterday with an indicted founder?

+

+ A hype-y road

+

Milton + founded Nikola in 2015, capitalizing on investor fervor around + EVs, particularly those made by Elon Musk’s Tesla. In June 2020, + the company went public via a SPAC. Prosecutors claim that + Milton misled investors by making false claims about Nikola’s + ability to produce hydrogen and by releasing a now-infamous + promotional video that showed a moving Nikola truck (not + disclosed: the truck was merely rolling downhill in neutral). +

+

Beyond + simply drumming up name association with retail investor darling + Tesla, Milton also deliberately targeted less knowledgeable + investors by promoting Nikola’s stock on social media and in + interviews, prosecutors allege.

+

And + those retail investors ultimately bore the brunt of Nikola’s + losses when its stock dropped 40% following Milton’s resignation + in September 2020, days after an activist short seller published + a scathing report calling the company an “intricate fraud built + on dozens of lies.”

+

+ Where things stand now

+

In + December, Nikola agreed to pay a $125 million penalty to settle + an SEC fraud investigation. The company, which is still around + and has begun production on a battery-powered semi-truck model, + reported a net loss of $173 million in the second quarter.

+

Before + stepping down, Milton purchased a $32.5 million Utah ranch and a + jet, and since his resignation, he has sold more than $300 + million in company stock. The main charge against him carries a + maximum sentence of 25 years, though he’s likely to see much + less time, if he’s even convicted.—MK

+
+ + + + +
+ + + +
+
+
+ +
+ + + +
+ + + + + +
+ + + + +
+

+ TOGETHER WITH FACET WEALTH

+

+ + Money on everyone’s mind +

+
+ + + + +
+

In our + current economic state, there’s a lot of attention on money—how much + it’s worth, how much we pay in interest, inflation, the list goes + on.

+

And if all + that news has stirred up questions like, “Am I doing the right + things with my money so that I can get the most out of life?” + Facet + can help.

+

Their CERTIFIED + FINANCIAL PLANNER™ professionals work with you 1:1 for an + affordable fixed fee to answer questions about your entire + financial life, not just basic money management. Plus, their + proprietary tech helps you get the full picture of where you’re at + financially and where you’re going.

+

Brew readers + get 2 free* months in their first year of financial planning. Sign + up here.

+ + + + +
+ + + + +
+
+
+ +
+ + + +
+ + + + + +
+ + + + +
+

+ WORLD

+

+ + Tour de headlines +

+
President Biden + Mandel + Ngan/Getty Images + + + + +
+
+

Biden goes for a “moonshot” on + cancer. Referencing JFK’s famous speech on its 60th + anniversary, President Biden said + yesterday he’s laying out his “moonshot” for eradicating cancer. + The plan involves a new department focused on health and + biomedical research, executive orders beefing up domestic + biomanufacturing, and a government group called the “Cancer + Cabinet.” In hopeful news that might help move things along, + drugmaker Amgen reported + its new cancer drug was more effective in some areas than chemo + for late-stage lung cancer patients.

+

Goldman Sachs to lay off hundreds. + The bank plans to reinstate annual employee culls, + which it had suspended during the pandemic, and may start + cutting jobs as soon as next week. Typically, Goldman targets + between 1% and 5% of its workforce for layoffs each year, and + this round is expected to be at the lower end of the spectrum + (current headcount: 47,000). The expected layoffs come after + Goldman’s profits fell by nearly half in the second quarter + compared to the year before as deal-making slowed.

+

15,000 nurses walked off the job in + Minnesota. The nurses involved in the largest-ever + private sector nursing strike + in the US plan to stay out for three days to demand fixes for + understaffing, as well as higher pay. Though this strike targets + 13 hospitals in the Minneapolis–St. Paul area, facilities across + the country had trouble finding enough nurses even before the + pandemic. Unions in at least two other states have also + authorized work stoppages in the past month.

+
+
+
+ +
+ + + +
+ + + + + +
+ + + + +
+

+ EDUCATION

+

+ The list that no one likes is out +

+
Students walking on campus in the fall. + Jon + Lovette/Getty Images + + + + +
+
+

US News + & World Report released its yearly + ranking of the best colleges in the country yesterday. + But this year’s list comes amid a growing number of complaints + about how the scores that mean a lot to wide-eyed future loan + borrowers (and the administrators who will eventually ask them + for money) are calculated.

+

Besides + controversial criteria like incoming students’ SAT scores and + the level of alumni donations, one of the main problems critics + have with the list is that it attributes 20% of its ranking + formula to what amounts to basically a popularity contest. US + News sends a yearly survey to college admins asking them to rate + other schools’ “academic quality.”

+

Even + Education Secretary Miguel Cardona, although not referring to + the US News list directly, said last month that college rankings + that value reputation above things like economic mobility are “a + joke.”

+

There’s even more drama this + year…Columbia University dropped from No. 2 to No. + 18 because it didn’t submit any data while it investigated a + math professor’s claims that the school might be fudging some + numbers. On Friday, the university admitted + to the fudging.

+

Final fun fact: 19 of the top 20 + schools on this year’s list cost + $55,000+ per year to attend.—MM

+
+ + + + +
+ + + +
+
+
+ +
+ + + +
+ + + + + +
+ + + + +
+

+ FOOD & BEVERAGE

+

+ Starbucks puts the ‘mint’ in peppermint +

+
A girl drinks from a Starbucks cup while looking at her phone + Zhang + Peng/Getty Images + + + + +
+
+

The + Starbucks customer loyalty program inspires more devotion than + the Mocha Joe’s punch card that always gets lost in your wallet. + Now the coffee chain is trying to spark even more loyalty by + taking its app-based program to the next technological level + with NFTs.

+

The + company unveiled + its Starbucks Odyssey program yesterday, a platform using + Polygon, an Ethereum network, that coffee drinkers can log into + with their existing program credentials to play games or take + challenges to earn non-fungible tokens. They’ll also be + available for purchase via credit card, no crypto necessary.

+

These + NFTs, called “journey stamps,” will unlock rewards for users + that go beyond the typical free coffee, like events or trips. +

+

+ Customers can join a waitlist + now, but only time will tell whether people will be clambering + for coffee-themed digital art. The project is a relatively + recent one—an exec told TechCrunch it’s only been in the works + for six months, but in that time the market for NFTs has changed + drastically. Trading volume at OpenSea, the most popular NFT + marketplace, plunged 99% from early May to late August, per + Fortune.

+

Zoom out: The Web3 push is one + of many big changes coming to Starbucks. A new leader will + succeed interim CEO Howard Schultz, but not before Schultz lays + out a new strategy at today’s investor day that’s aimed at + boosting efficiency.—AR

+
+ + + + +
+ + + +
+
+
+ +
+ + + +
+ + + + + +
+ + + + +
+

+ GRAB BAG

+

+ + Key performance indicators +

+
A phone with an Instagram Reels icon and a 0 views notification + Francis + Scialabba + + + + +
+
+

Stat: People spend 17.6 million + hours a day watching Instagram Reels, just a fraction of the + 197.8 million hours users waste daily on TikTok, according to an + internal Meta document viewed by the Wall + Street Journal. While Reels might seem inescapable in + your feed, engagement is trending down, dropping 13.6% in August + from the month before, the document showed.

+

Quote: “Nothing can justify the + persistence of this fundamental abuse of human rights.”

+

The + director-general of the UN’s labor standards agency yesterday + called for an “all-hands-on-deck approach” to combating modern + slavery after releasing a report + that found 50 million people were living in modern slavery—28 + million in forced labor and 22 million in forced marriages in + 2021. That’s 10 million more than in 2016.

+

Read: Johnson & Johnson and a + new war on consumer protection. (The + New Yorker)

+
+
+
+ +
+ + + +
+ + + + + +
+ + + + +
+

+ SPONSORED BY ACCRUE X VINCERO

+
Accrue X Vincero + + + + + +
+

Style meets savings. With Accrue + Savings, you can earn cash rewards from brands like Vincero by + saving up for your purchases without relying on credit. Elevate your + everyday carry with Vincero’s ethically crafted, premium lifestyle + accessories and earn 15% in cash rewards + toward your purchase when you save up for your Vincero + accessories with an Accrue Savings account. Sign + up here in just a few minutes today.

+ + + + + +
+ + +
+
+
+ +
+ + + +
+ + + + + +
+ + + + +
+

+ WHAT ELSE IS BREWING

+
+ + + + +
+
    +
  • Ukraine + took back territory from Russia all the way to its + northeastern border in some areas, leading one former member + of Russia’s parliament to call for peace talks on live + TV.
  • +
  • Streaming + services had a good night at the Emmys, + with HBO Max’s Succession + winning best drama and The White + Lotus nabbing the statue for best + limited series. The Apple TV+ series Ted + Lasso took the top prize for a comedy + series.
  • +
  • Twitter + whistleblower Peiter “Mudge” Zatko will + testify today before the Senate Judiciary Committee about + the platform’s privacy and security vulnerabilities. +
  • +
  • Elon + Musk’s college girlfriend is auctioning + off mementos she saved from the relationship, including + photos and a signed birthday card.
  • +
+
+
+ +
+ + + +
+ + + + + +
+ + + + +
+

+ BREW'S BETS

+
+ + + + +
+
+

Taking back texts: A complete guide + to Apple’s new operating system, which lets you personalize your + lock screen and a lot more.

+

Sleight of hand: Watch + the reigning world champion of card magic (a real title) do his + thing.

+

Interesting pod alert: After + years on a personal odyssey, journalist Lauren Ober found out + she was autistic. The Loudest Girl in the World shares + Lauren’s journey once she was diagnosed. Listen + now.

+

+

Just like ⌘C, ⌘V: With CopyTrader,™ eToro’s most + popular feature, you can automatically copy the moves of real + investors in real time. No more second-guessing your crypto + decisions. Get + started today.*

+ + +

+ *This is sponsored advertising content.

+
+
+
+ +
+ + + +
+ + + + + +
+ + + + +
+

+ GAMES

+

+ + The puzzle section +

+
+ + + + +
+
+

Brew Mini: If you know what kind + of car James Bond drives, you’re more than 10% of the way to + completing today’s Mini. Solve + it here.

+

+ Tagline trivia

+

There’s + nothing cringier than a movie tagline. We’ll give you the + tagline for a film, and you have to name the film.

+
    +
  1. “Midnight + never strikes when you’re in love.”
  2. +
  3. “Work + sucks.”
  4. +
  5. “You don’t + get to 500 million friends without making a few + enemies.”
  6. +
  7. “The + longer you wait, the harder it gets.”
  8. +
  9. “A comedy + of trial and error.”
  10. +
+
+
+
+ +
+ + + +
+ + + + + +
+ + + + +
+

+

+

+ + How to save money in a recession +

+
How to save money in a recession + + + + + +
+
+

Saving + at any point can be a challenge. Saving during an economic + downturn? Mission impossible. But Anish Mitra uses his knowledge + from 10 years on Wall Street to teach you how saving amid + slowing economic growth doesn't have to be difficult. Watch + here.

+

Check out more from the Brew: +

+

On Business + Casual: Nora chats with Alex Ma, the CEO and co-founder + of Poparazzi, an app that allows you to build your friends’ + profile pages instead of your own. Listen + or watch + here.

+

Ready to jumpstart + your career but don’t know where to start? We’ve got you + covered. Take + our short quiz and find out which Morning Brew + Accelerator is right for you.

+
+
+
+ +
+ + + +
+ + + + + +
+ + + + +
+

+ SHARE THE BREW

+
+ + + + +
+

+ Share + Morning Brew with your friends, acquire free Brew swag, and + then acquire more friends as a result of your fresh Brew swag.

+

+ We’re saying we’ll give you free stuff and more friends if you share + a link. One link.

+

+ +

+
+

+ Your referral count: 0

Click + to Share +

+ Or copy & paste your referral link to others:
morningbrew.com/daily/r/?kid=72b509de +

+
+
+ +
+ + + +
+ + + + + +
+ + + + +
+

+

+

+ + Answer +

+
+ + + + +
+
+

1. + Cinderella

+

2. + Office Space

+

3. + The Social Network

+

4. + The 40-Year-Old Virgin

+

5. + My Cousin Vinny

+


+
+
+
+ +
+ + + +
+ + + + + +
+ + + + +
+

+ ✢ A Note From Facet Wealth

+

+ Facet Wealth is an SEC Registered Investment Advisor headquartered + in Baltimore, Maryland. This is not an offer to sell securities or + the solicitation of an offer to purchase securities. This is not + investment, financial, legal, or tax advice.

+

+ *Two months free offer is only valid for an annual fee paid at the + time of signing.

+
+
+ +
+ + + + + +
+ + +
+ + + + + + + +
+

Written by Abigail + Rubenstein, Max + Knoblauch, and Matty + Merritt

+

Was this email forwarded to + you? Sign up here. +

+
+

WANT MORE BREW?

+

+ Tips for smarter living →

+
    +
  • Money + Scoop: your personal finance upgrade
  • +
  • Sidekick: + lifestyle recs from every corner of the internet
  • +
+

+ YouTube +

+

+ Accelerate Your Career with our Courses → +

+ +
+
+ ADVERTISE + // CAREERS + // SHOP // + FAQ
+
Update your email preferences or unsubscribe here.
View our privacy policy here.

Copyright © 2022 Morning Brew. All rights + reserved.
22 W 19th St, 4th Floor, New York, NY 10011
+
+ +
+ + + diff --git a/packages/readabilityjs/test/test-pages/newsletters/morning-brew/url.txt b/packages/readabilityjs/test/test-pages/newsletters/morning-brew/url.txt new file mode 100644 index 000000000..b5f5c433e --- /dev/null +++ b/packages/readabilityjs/test/test-pages/newsletters/morning-brew/url.txt @@ -0,0 +1 @@ +https://www.morningbrew.com/daily/issues/rolling-downhill From 955b33349f275b451bb77ad77a7c1b0427946d39 Mon Sep 17 00:00:00 2001 From: Hongbo Wu Date: Wed, 14 Sep 2022 14:31:43 +0800 Subject: [PATCH 04/39] Revert change done automatically by Xcode --- apple/Omnivore.xcodeproj/project.pbxproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apple/Omnivore.xcodeproj/project.pbxproj b/apple/Omnivore.xcodeproj/project.pbxproj index f7cbc94a2..e1cc81e7c 100644 --- a/apple/Omnivore.xcodeproj/project.pbxproj +++ b/apple/Omnivore.xcodeproj/project.pbxproj @@ -1439,7 +1439,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = MHM9HW2S8F; + DEVELOPMENT_TEAM = QJF2XZ86HB; ENABLE_PREVIEWS = YES; INFOPLIST_FILE = InfoPlists/Omnivore.plist; IPHONEOS_DEPLOYMENT_TARGET = 15.0; From c4d985e8e5b6731cb92cdc9a8b4c5bf2f664c488 Mon Sep 17 00:00:00 2001 From: Hongbo Wu Date: Wed, 14 Sep 2022 14:41:26 +0800 Subject: [PATCH 05/39] Revert change done automatically by Xcode --- apple/Omnivore.xcodeproj/project.pbxproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apple/Omnivore.xcodeproj/project.pbxproj b/apple/Omnivore.xcodeproj/project.pbxproj index e1cc81e7c..7b20a9b8c 100644 --- a/apple/Omnivore.xcodeproj/project.pbxproj +++ b/apple/Omnivore.xcodeproj/project.pbxproj @@ -1730,7 +1730,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = MHM9HW2S8F; + DEVELOPMENT_TEAM = QJF2XZ86HB; ENABLE_PREVIEWS = YES; INFOPLIST_FILE = InfoPlists/Omnivore.plist; IPHONEOS_DEPLOYMENT_TARGET = 15.0; From 9b92a64232a04d5622ea5bc2117fbf6b15a54e67 Mon Sep 17 00:00:00 2001 From: Hongbo Wu Date: Wed, 14 Sep 2022 14:54:15 +0800 Subject: [PATCH 06/39] Regenerate test page --- .../newsletters/morning-brew/expected.html | 315 ++- .../newsletters/morning-brew/source.html | 2443 ++++++----------- 2 files changed, 1019 insertions(+), 1739 deletions(-) diff --git a/packages/readabilityjs/test/test-pages/newsletters/morning-brew/expected.html b/packages/readabilityjs/test/test-pages/newsletters/morning-brew/expected.html index 8723e094f..a9e1d8670 100644 --- a/packages/readabilityjs/test/test-pages/newsletters/morning-brew/expected.html +++ b/packages/readabilityjs/test/test-pages/newsletters/morning-brew/expected.html @@ -1,7 +1,11 @@
- +
@@ -11,13 +15,15 @@
September 13, 2022 - View Online | Sign Up | Shop + + View Online | Sign Up | Shop
@@ -26,8 +32,10 @@

TOGETHER WITH

- Facet Wealth - + + Facet Wealth + +
@@ -36,7 +44,8 @@
-
+
+ @@ -48,8 +57,10 @@
- - + + + +
@@ -58,20 +69,21 @@ -

Nasdaq

+

Nasdaq

-

12,266.41

+

12,266.41

-

+1.27%

+

+1.27%

- + + @@ -81,20 +93,21 @@ -

S&P

+

S&P

-

4,110.41

+

4,110.41

-

+1.06%

+

+1.06%

- + + @@ -104,20 +117,21 @@ -

Dow

+

Dow

-

32,381.34

+

32,381.34

-

+0.71%

+

+0.71%

- + + @@ -127,20 +141,21 @@ -

10-Year

+

10-Year

-

3.358%

+

3.358%

-

+4.3 bps

+

+4.3 bps

- + + @@ -150,20 +165,21 @@ -

Bitcoin

+

Bitcoin

-

$22,311.05

+

$22,311.05

-

+3.05%

+

+3.05%

- + + @@ -173,31 +189,38 @@ -

Apple

+

Apple

-

$163.43

+

$163.43

-

+3.85%

+

+3.85%

- + + -

*Stock data as of market close, cryptocurrency data as of 11:00pm ET. Here's what these numbers mean.

+

*Stock data as of market close, cryptocurrency data as of 11:00pm ET. Here's what these numbers mean. +

- + +
    -
  • Markets: Stocks continued to rally yesterday, with the S&P 500 posting its biggest four-day gain since June. Helping to boost markets was Apple, which rose on bullish news about preorders for the iPhone 14 Pro Max.
  • -
  • Economy: Happy CPI Day to all who celebrate. The consumer price index report that drops this morning is expected to show that inflation fell to 8% last month. It’s the last major piece of data that will arrive before the Fed decides how big to go on interest rate hikes next week.
  • +
  • + Markets: Stocks continued to rally yesterday, with the S&P 500 posting its biggest four-day gain since June. Helping to boost markets was Apple, which rose on bullish news about preorders for the iPhone 14 Pro Max. +
  • +
  • + Economy: Happy CPI Day to all who celebrate. The consumer price index report that drops this morning is expected to show that inflation fell to 8% last month. It’s the last major piece of data that will arrive before the Fed decides how big to go on interest rate hikes next week. +
@@ -208,7 +231,8 @@ - + + @@ -220,30 +244,44 @@

Nikola founder’s fraud trial gets rolling

- woman with back to camera looking at paintings + + + woman with back to camera looking at paintings Stefan Puchner/Getty Images

The fraud trial of Trevor Milton, the founder and former CEO of electric truck company Nikola Motors, began yesterday with jury selection. Milton, who pleaded not guilty in the case, stands accused of lying about his company’s progress in developing electric vehicles, leading to huge losses for investors.

The case—a shoo-in for Hulu’s next ripped-from-the-headlines original that everyone at work except you is watching—is seen as a cautionary tale of buying into the hype around companies before they deliver a single product.

So how did Nikola go from the third-largest auto company in the US in 2020 with a $33 billion market value to just a $2.3 billion market value as of yesterday with an indicted founder?

-

A hype-y road

-

Milton founded Nikola in 2015, capitalizing on investor fervor around EVs, particularly those made by Elon Musk’s Tesla. In June 2020, the company went public via a SPAC. Prosecutors claim that Milton misled investors by making false claims about Nikola’s ability to produce hydrogen and by releasing a now-infamous promotional video that showed a moving Nikola truck (not disclosed: the truck was merely rolling downhill in neutral).

+

A hype-y road

+

Milton founded Nikola in 2015, capitalizing on investor fervor around EVs, particularly those made by Elon Musk’s Tesla. In June 2020, the company went public via a SPAC. Prosecutors claim that Milton misled investors by making false claims about Nikola’s ability to produce hydrogen and by releasing a now-infamous promotional video that showed a moving Nikola truck (not disclosed: the truck was merely rolling downhill in neutral).

Beyond simply drumming up name association with retail investor darling Tesla, Milton also deliberately targeted less knowledgeable investors by promoting Nikola’s stock on social media and in interviews, prosecutors allege.

And those retail investors ultimately bore the brunt of Nikola’s losses when its stock dropped 40% following Milton’s resignation in September 2020, days after an activist short seller published a scathing report calling the company an “intricate fraud built on dozens of lies.”

-

Where things stand now

+

Where things stand now

In December, Nikola agreed to pay a $125 million penalty to settle an SEC fraud investigation. The company, which is still around and has begun production on a battery-powered semi-truck model, reported a net loss of $173 million in the second quarter.

Before stepping down, Milton purchased a $32.5 million Utah ranch and a jet, and since his resignation, he has sold more than $300 million in company stock. The main charge against him carries a maximum sentence of 25 years, though he’s likely to see much less time, if he’s even convicted.—MK

-
-

- - - -

+
+ +

+ + + + + + + + + + + + +

+ - + + @@ -262,17 +300,25 @@

In our current economic state, there’s a lot of attention on money—how much it’s worth, how much we pay in interest, inflation, the list goes on.

And if all that news has stirred up questions like, “Am I doing the right things with my money so that I can get the most out of life?” Facet can help.

Their CERTIFIED FINANCIAL PLANNER™ professionals work with you 1:1 for an affordable fixed fee to answer questions about your entire financial life, not just basic money management. Plus, their proprietary tech helps you get the full picture of where you’re at financially and where you’re going.

-

Brew readers get 2 free* months in their first year of financial planning. Sign up here.

-

- +

Brew readers get 2 free* months in their first year of financial planning. Sign up here.

+ +

+ + + + - + + -

+ +

+ - + + @@ -286,7 +332,8 @@ Tour de headlines - President Biden + + President Biden Mandel Ngan/Getty Images

Biden goes for a “moonshot” on cancer. Referencing JFK’s famous speech on its 60th anniversary, President Biden said yesterday he’s laying out his “moonshot” for eradicating cancer. The plan involves a new department focused on health and biomedical research, executive orders beefing up domestic biomanufacturing, and a government group called the “Cancer Cabinet.” In hopeful news that might help move things along, drugmaker Amgen reported its new cancer drug was more effective in some areas than chemo for late-stage lung cancer patients.

@@ -295,7 +342,8 @@
- + + @@ -307,7 +355,9 @@

The list that no one likes is out

- Students walking on campus in the fall. + + + Students walking on campus in the fall. Jon Lovette/Getty Images
@@ -315,18 +365,29 @@

Besides controversial criteria like incoming students’ SAT scores and the level of alumni donations, one of the main problems critics have with the list is that it attributes 20% of its ranking formula to what amounts to basically a popularity contest. US News sends a yearly survey to college admins asking them to rate other schools’ “academic quality.”

Even Education Secretary Miguel Cardona, although not referring to the US News list directly, said last month that college rankings that value reputation above things like economic mobility are “a joke.”

There’s even more drama this year…Columbia University dropped from No. 2 to No. 18 because it didn’t submit any data while it investigated a math professor’s claims that the school might be fudging some numbers. On Friday, the university admitted to the fudging.

-

Final fun fact: 19 of the top 20 schools on this year’s list cost - $55,000+ per year to attend.—MM

-
-

- - - -

+

Final fun fact: 19 of the top 20 schools on this year’s list cost $55,000+ per year to attend.—MM

+
+ +

+ + + + + + + + + + + + +

+ - + + @@ -336,25 +397,39 @@

FOOD & BEVERAGE

Starbucks puts the ‘mint’ in peppermint

-
A girl drinks from a Starbucks cup while looking at her phone + + + A girl drinks from a Starbucks cup while looking at her phone Zhang Peng/Getty Images

The Starbucks customer loyalty program inspires more devotion than the Mocha Joe’s punch card that always gets lost in your wallet. Now the coffee chain is trying to spark even more loyalty by taking its app-based program to the next technological level with NFTs.

The company unveiled its Starbucks Odyssey program yesterday, a platform using Polygon, an Ethereum network, that coffee drinkers can log into with their existing program credentials to play games or take challenges to earn non-fungible tokens. They’ll also be available for purchase via credit card, no crypto necessary.

-

These NFTs, called “journey stamps,” will unlock rewards for users that go beyond the typical free coffee, like events or trips.

-

Customers can join a waitlist now, but only time will tell whether people will be clambering for coffee-themed digital art. The project is a relatively recent one—an exec told TechCrunch it’s only been in the works for six months, but in that time the market for NFTs has changed drastically. Trading volume at OpenSea, the most popular NFT marketplace, plunged 99% from early May to late August, per Fortune.

+

These NFTs, called “journey stamps,” will unlock rewards for users that go beyond the typical free coffee, like events or trips.

+

Customers can join a waitlist now, but only time will tell whether people will be clambering for coffee-themed digital art. The project is a relatively recent one—an exec told TechCrunch it’s only been in the works for six months, but in that time the market for NFTs has changed drastically. Trading volume at OpenSea, the most popular NFT marketplace, plunged 99% from early May to late August, per Fortune.

Zoom out: The Web3 push is one of many big changes coming to Starbucks. A new leader will succeed interim CEO Howard Schultz, but not before Schultz lays out a new strategy at today’s investor day that’s aimed at boosting efficiency.—AR

-
-

- - - -

+
+ +

+ + + + + + + + + + + + +

+ - + + @@ -368,7 +443,8 @@ Key performance indicators - A phone with an Instagram Reels icon and a 0 views notification + + A phone with an Instagram Reels icon and a 0 views notification Francis Scialabba

Stat: People spend 17.6 million hours a day watching Instagram Reels, just a fraction of the 197.8 million hours users waste daily on TikTok, according to an internal Meta document viewed by the Wall Street Journal. While Reels might seem inescapable in your feed, engagement is trending down, dropping 13.6% in August from the month before, the document showed.

@@ -378,7 +454,8 @@
- + + @@ -394,16 +471,24 @@
    -
  • Ukraine took back territory from Russia all the way to its northeastern border in some areas, leading one former member of Russia’s parliament to call for peace talks on live TV.
  • -
  • Streaming services had a good night at the Emmys, with HBO Max’s Succession winning best drama and The White Lotus nabbing the statue for best limited series. The Apple TV+ series Ted Lasso took the top prize for a comedy series.
  • -
  • Twitter whistleblower Peiter “Mudge” Zatko will testify today before the Senate Judiciary Committee about the platform’s privacy and security vulnerabilities. +
  • + Ukraine took back territory from Russia all the way to its northeastern border in some areas, leading one former member of Russia’s parliament to call for peace talks on live TV. +
  • +
  • + Streaming services had a good night at the Emmys, with HBO Max’s Succession winning best drama and The White Lotus nabbing the statue for best limited series. The Apple TV+ series Ted Lasso took the top prize for a comedy series. +
  • +
  • + Twitter whistleblower Peiter “Mudge” Zatko will testify today before the Senate Judiciary Committee about the platform’s privacy and security vulnerabilities. +
  • +
  • + Elon Musk’s college girlfriend is auctioning off mementos she saved from the relationship, including photos and a signed birthday card.
  • -
  • Elon Musk’s college girlfriend is auctioning off mementos she saved from the relationship, including photos and a signed birthday card.
- + + @@ -420,13 +505,12 @@

Just like ⌘C, ⌘V: With CopyTrader,™ eToro’s most popular feature, you can automatically copy the moves of real investors in real time. No more second-guessing your crypto decisions. Get started today.*

-

- *This is sponsored advertising content. -

+

*This is sponsored advertising content.

- + + @@ -443,7 +527,7 @@

Brew Mini: If you know what kind of car James Bond drives, you’re more than 10% of the way to completing today’s Mini. Solve it here.

-

Tagline trivia

+

Tagline trivia

There’s nothing cringier than a movie tagline. We’ll give you the tagline for a film, and you have to name the film.

  1. “Midnight never strikes when you’re in love.”
  2. @@ -455,7 +539,8 @@
- + + @@ -468,18 +553,20 @@ How to save money in a recession - How to save money in a recession + + + How to save money in a recession

Saving at any point can be a challenge. Saving during an economic downturn? Mission impossible. But Anish Mitra uses his knowledge from 10 years on Wall Street to teach you how saving amid slowing economic growth doesn't have to be difficult. Watch here.

-

Check out more from the Brew: -

+

Check out more from the Brew:

On Business Casual: Nora chats with Alex Ma, the CEO and co-founder of Poparazzi, an app that allows you to build your friends’ profile pages instead of your own. Listen or watch here.

Ready to jumpstart your career but don’t know where to start? We’ve got you covered. Take our short quiz and find out which Morning Brew Accelerator is right for you.

- + + @@ -506,7 +593,8 @@ - + + @@ -514,24 +602,34 @@
-

- ✢ A Note From Facet Wealth -

-

Facet Wealth is an SEC Registered Investment Advisor headquartered in Baltimore, Maryland. This is not an offer to sell securities or the solicitation of an offer to purchase securities. This is not investment, financial, legal, or tax advice.

-

*Two months free offer is only valid for an annual fee paid at the time of signing.

+

✢ A Note From Facet Wealth

+

Facet Wealth is an SEC Registered Investment Advisor headquartered in Baltimore, Maryland. This is not an offer to sell securities or the solicitation of an offer to purchase securities. This is not investment, financial, legal, or tax advice.

+

*Two months free offer is only valid for an annual fee paid at the time of signing.

-

- - -

+

+ + + + + + + + + + + + +

+
-

Written by Abigail Rubenstein, Max Knoblauch, and Matty Merritt

+

Written by Abigail Rubenstein, Max Knoblauch, and Matty Merritt +

Was this email forwarded to you? Sign up here.

@@ -542,9 +640,14 @@

Copyright © 2022 Morning Brew. All rights reserved.
22 W 19th St, 4th Floor, New York, NY 10011

-
- + + + \ No newline at end of file diff --git a/packages/readabilityjs/test/test-pages/newsletters/morning-brew/source.html b/packages/readabilityjs/test/test-pages/newsletters/morning-brew/source.html index 5896300f5..d48dfeefd 100644 --- a/packages/readabilityjs/test/test-pages/newsletters/morning-brew/source.html +++ b/packages/readabilityjs/test/test-pages/newsletters/morning-brew/source.html @@ -1,302 +1,131 @@ - - + Daily Brew // Morning Brew // Update - - - - + + - +
A trial over EV fraud gets going... + A trial over EV fraud gets going... +
-
+
+ +
- +
- +
-
- +
+ - - +
- September 13, 2022 View - Online | Sign - Up | Shop + + September 13, 2022 + + View Online + | + Sign Up + | + Shop
- +
-

- Morning Brew +

+ + Morning Brew

- +
- + -
+ Facet Wealth + Facet Wealth -
- +
@@ -305,68 +134,50 @@
-

Good morning. Apple’s iOS 16 - dropped for iPhone users yesterday, and once you download the - software update you’ll be able to edit an iMessage within 15 - minutes of sending it and delete one within two minutes. While - that may be useful for most people, the only text we’ve ever - regretted sending was, “Sure I’ll go to your friend’s improv - show.”

-

Max - Knoblauch, Abby Rubenstein, Matty Merritt

+

Good morning. Apple’s iOS 16 dropped for iPhone users yesterday, and once you download the software update you’ll be able to edit an iMessage within 15 minutes of sending it and delete one within two minutes. While that may be useful for most people, the only text we’ve ever regretted sending was, “Sure I’ll go to your friend’s improv show.”

+

Max Knoblauch, Abby Rubenstein, Matty Merritt

- + +
- +
-
- +
+
-

- MARKETS

+

+ MARKETS +

- +
- - + + + -
+
- +
+ - - - - - + + -
- -

- Nasdaq

+
+ -

- 12,266.41

+
+

Nasdaq

- + +
- +
+ - - - - - + + -
- -

- S&P

+
+ -

- 4,110.41

+
+

S&P

- + +
- +
+ - - - - - + + -
- -

- Dow

+
+ -

- 32,381.34

+
+

Dow

- + +
- +
+ - - - - - + + -
- -

- 10-Year

+
+ -

- 3.358%

+
+

10-Year

- + +
- +
+ - - - - - + + -
- -

- Bitcoin

+
+ -

- $22,311.05

+
+

Bitcoin

- + +
- +
+ - - - - - + + - + + - -
- -

- Apple

+
+ -

- $163.43

+
+

Apple

- + +
-

- *Stock data as of market close, cryptocurrency data as of - 11:00pm ET. Here's - what these numbers mean.

+

+ *Stock data as of market close, cryptocurrency data as of 11:00pm ET. + Here's what these numbers mean. +

+
    -
  • Markets: - Stocks continued to - rally - yesterday, with the S&P 500 posting its biggest four-day - gain since June. Helping to boost markets was Apple, - which rose on bullish news about preorders for the - iPhone 14 Pro Max.
  • -
  • Economy: - Happy CPI Day to all who - celebrate. The consumer price index report that drops - this morning is expected to show that inflation - fell - to 8% last month. It’s the last major piece of data that - will arrive before the Fed decides how big to go on - interest rate hikes next week.
  • +
  • + Markets: Stocks continued to rally yesterday, with the S&P 500 posting its biggest four-day gain since June. Helping to boost markets was Apple, which rose on bullish news about preorders for the iPhone 14 Pro Max. +
  • +
  • + Economy: Happy CPI Day to all who celebrate. The consumer price index report that drops this morning is expected to show that inflation fell to 8% last month. It’s the last major piece of data that will arrive before the Fed decides how big to go on interest rate hikes next week. +
+
@@ -648,713 +359,68 @@
- + +
- +
-
- + - -
+ -
-

- AUTO

-

- Nikola founder’s fraud trial gets rolling +

+ AUTO +

+

+ + Nikola founder’s fraud trial gets rolling

woman with back to camera looking at paintings - Stefan - Puchner/Getty Images - +
+ + woman with back to camera looking at paintings + Stefan Puchner/Getty Images + - -
-

The - fraud trial - of Trevor Milton, the founder and former CEO of electric truck - company Nikola Motors, began yesterday with jury selection. - Milton, who pleaded not guilty in the case, stands accused of - lying about his company’s progress in developing electric - vehicles, leading to huge losses for investors.

-

The - case—a shoo-in for Hulu’s next ripped-from-the-headlines - original that everyone at work except you is watching—is seen as - a cautionary tale of buying into the hype around companies - before they deliver a single product.

-

So how - did Nikola go from the third-largest auto company in the US in - 2020 with a $33 billion market value to just a $2.3 billion - market value as of yesterday with an indicted founder?

-

- A hype-y road

-

Milton - founded Nikola in 2015, capitalizing on investor fervor around - EVs, particularly those made by Elon Musk’s Tesla. In June 2020, - the company went public via a SPAC. Prosecutors claim that - Milton misled investors by making false claims about Nikola’s - ability to produce hydrogen and by releasing a now-infamous - promotional video that showed a moving Nikola truck (not - disclosed: the truck was merely rolling downhill in neutral). -

-

Beyond - simply drumming up name association with retail investor darling - Tesla, Milton also deliberately targeted less knowledgeable - investors by promoting Nikola’s stock on social media and in - interviews, prosecutors allege.

-

And - those retail investors ultimately bore the brunt of Nikola’s - losses when its stock dropped 40% following Milton’s resignation - in September 2020, days after an activist short seller published - a scathing report calling the company an “intricate fraud built - on dozens of lies.”

-

- Where things stand now

-

In - December, Nikola agreed to pay a $125 million penalty to settle - an SEC fraud investigation. The company, which is still around - and has begun production on a battery-powered semi-truck model, - reported a net loss of $173 million in the second quarter.

-

Before - stepping down, Milton purchased a $32.5 million Utah ranch and a - jet, and since his resignation, he has sold more than $300 - million in company stock. The main charge against him carries a - maximum sentence of 25 years, though he’s likely to see much - less time, if he’s even convicted.—MK

-
- - - - -
- - - -
-
-
- - - - - -
- - - - - -
- - - - -
-

- TOGETHER WITH FACET WEALTH

-

- - Money on everyone’s mind -

-
- - - - -
-

In our - current economic state, there’s a lot of attention on money—how much - it’s worth, how much we pay in interest, inflation, the list goes - on.

-

And if all - that news has stirred up questions like, “Am I doing the right - things with my money so that I can get the most out of life?” - Facet - can help.

-

Their CERTIFIED - FINANCIAL PLANNER™ professionals work with you 1:1 for an - affordable fixed fee to answer questions about your entire - financial life, not just basic money management. Plus, their - proprietary tech helps you get the full picture of where you’re at - financially and where you’re going.

-

Brew readers - get 2 free* months in their first year of financial planning. Sign - up here.

- - - - -
- - - - -
-
-
- -
- - - -
- - - - - -
- - - - -
-

- WORLD

-

- - Tour de headlines -

-
President Biden - Mandel - Ngan/Getty Images - - - - -
-
-

Biden goes for a “moonshot” on - cancer. Referencing JFK’s famous speech on its 60th - anniversary, President Biden said - yesterday he’s laying out his “moonshot” for eradicating cancer. - The plan involves a new department focused on health and - biomedical research, executive orders beefing up domestic - biomanufacturing, and a government group called the “Cancer - Cabinet.” In hopeful news that might help move things along, - drugmaker Amgen reported - its new cancer drug was more effective in some areas than chemo - for late-stage lung cancer patients.

-

Goldman Sachs to lay off hundreds. - The bank plans to reinstate annual employee culls, - which it had suspended during the pandemic, and may start - cutting jobs as soon as next week. Typically, Goldman targets - between 1% and 5% of its workforce for layoffs each year, and - this round is expected to be at the lower end of the spectrum - (current headcount: 47,000). The expected layoffs come after - Goldman’s profits fell by nearly half in the second quarter - compared to the year before as deal-making slowed.

-

15,000 nurses walked off the job in - Minnesota. The nurses involved in the largest-ever - private sector nursing strike - in the US plan to stay out for three days to demand fixes for - understaffing, as well as higher pay. Though this strike targets - 13 hospitals in the Minneapolis–St. Paul area, facilities across - the country had trouble finding enough nurses even before the - pandemic. Unions in at least two other states have also - authorized work stoppages in the past month.

+

The fraud trial of Trevor Milton, the founder and former CEO of electric truck company Nikola Motors, began yesterday with jury selection. Milton, who pleaded not guilty in the case, stands accused of lying about his company’s progress in developing electric vehicles, leading to huge losses for investors.

+

The case—a shoo-in for Hulu’s next ripped-from-the-headlines original that everyone at work except you is watching—is seen as a cautionary tale of buying into the hype around companies before they deliver a single product.

+

So how did Nikola go from the third-largest auto company in the US in 2020 with a $33 billion market value to just a $2.3 billion market value as of yesterday with an indicted founder?

+

A hype-y road

+

Milton founded Nikola in 2015, capitalizing on investor fervor around EVs, particularly those made by Elon Musk’s Tesla. In June 2020, the company went public via a SPAC. Prosecutors claim that Milton misled investors by making false claims about Nikola’s ability to produce hydrogen and by releasing a now-infamous promotional video that showed a moving Nikola truck (not disclosed: the truck was merely rolling downhill in neutral).

+

Beyond simply drumming up name association with retail investor darling Tesla, Milton also deliberately targeted less knowledgeable investors by promoting Nikola’s stock on social media and in interviews, prosecutors allege.

+

And those retail investors ultimately bore the brunt of Nikola’s losses when its stock dropped 40% following Milton’s resignation in September 2020, days after an activist short seller published a scathing report calling the company an “intricate fraud built on dozens of lies.”

+

Where things stand now

+

In December, Nikola agreed to pay a $125 million penalty to settle an SEC fraud investigation. The company, which is still around and has begun production on a battery-powered semi-truck model, reported a net loss of $173 million in the second quarter.

+

Before stepping down, Milton purchased a $32.5 million Utah ranch and a jet, and since his resignation, he has sold more than $300 million in company stock. The main charge against him carries a maximum sentence of 25 years, though he’s likely to see much less time, if he’s even convicted.—MK

-
-
- -
- - - -
- - - - - -
- - - - -
-

- EDUCATION

-

- The list that no one likes is out -

-
Students walking on campus in the fall. - Jon - Lovette/Getty Images - - - - -
-
-

US News - & World Report released its yearly - ranking of the best colleges in the country yesterday. - But this year’s list comes amid a growing number of complaints - about how the scores that mean a lot to wide-eyed future loan - borrowers (and the administrators who will eventually ask them - for money) are calculated.

-

Besides - controversial criteria like incoming students’ SAT scores and - the level of alumni donations, one of the main problems critics - have with the list is that it attributes 20% of its ranking - formula to what amounts to basically a popularity contest. US - News sends a yearly survey to college admins asking them to rate - other schools’ “academic quality.”

-

Even - Education Secretary Miguel Cardona, although not referring to - the US News list directly, said last month that college rankings - that value reputation above things like economic mobility are “a - joke.”

-

There’s even more drama this - year…Columbia University dropped from No. 2 to No. - 18 because it didn’t submit any data while it investigated a - math professor’s claims that the school might be fudging some - numbers. On Friday, the university admitted - to the fudging.

-

Final fun fact: 19 of the top 20 - schools on this year’s list cost - $55,000+ per year to attend.—MM

-
- - - - -
- - - -
-
-
- -
- - - -
- - - - - -
- - - - -
-

- FOOD & BEVERAGE

-

- Starbucks puts the ‘mint’ in peppermint -

-
A girl drinks from a Starbucks cup while looking at her phone - Zhang - Peng/Getty Images - - - - -
-
-

The - Starbucks customer loyalty program inspires more devotion than - the Mocha Joe’s punch card that always gets lost in your wallet. - Now the coffee chain is trying to spark even more loyalty by - taking its app-based program to the next technological level - with NFTs.

-

The - company unveiled - its Starbucks Odyssey program yesterday, a platform using - Polygon, an Ethereum network, that coffee drinkers can log into - with their existing program credentials to play games or take - challenges to earn non-fungible tokens. They’ll also be - available for purchase via credit card, no crypto necessary.

-

These - NFTs, called “journey stamps,” will unlock rewards for users - that go beyond the typical free coffee, like events or trips. -

-

- Customers can join a waitlist - now, but only time will tell whether people will be clambering - for coffee-themed digital art. The project is a relatively - recent one—an exec told TechCrunch it’s only been in the works - for six months, but in that time the market for NFTs has changed - drastically. Trading volume at OpenSea, the most popular NFT - marketplace, plunged 99% from early May to late August, per - Fortune.

-

Zoom out: The Web3 push is one - of many big changes coming to Starbucks. A new leader will - succeed interim CEO Howard Schultz, but not before Schultz lays - out a new strategy at today’s investor day that’s aimed at - boosting efficiency.—AR

-
- - - - -
- - - -
-
-
- -
- - - -
- - - - - -
- - - - -
-

- GRAB BAG

-

- - Key performance indicators -

-
A phone with an Instagram Reels icon and a 0 views notification - Francis - Scialabba - - - - -
-
-

Stat: People spend 17.6 million - hours a day watching Instagram Reels, just a fraction of the - 197.8 million hours users waste daily on TikTok, according to an - internal Meta document viewed by the Wall - Street Journal. While Reels might seem inescapable in - your feed, engagement is trending down, dropping 13.6% in August - from the month before, the document showed.

-

Quote: “Nothing can justify the - persistence of this fundamental abuse of human rights.”

-

The - director-general of the UN’s labor standards agency yesterday - called for an “all-hands-on-deck approach” to combating modern - slavery after releasing a report - that found 50 million people were living in modern slavery—28 - million in forced labor and 22 million in forced marriages in - 2021. That’s 10 million more than in 2016.

-

Read: Johnson & Johnson and a - new war on consumer protection. (The - New Yorker)

-
-
-
- -
- - - -
- - - -
- - - - -
-

- SPONSORED BY ACCRUE X VINCERO

-
Accrue X Vincero - - - -
-

Style meets savings. With Accrue - Savings, you can earn cash rewards from brands like Vincero by - saving up for your purchases without relying on credit. Elevate your - everyday carry with Vincero’s ethically crafted, premium lifestyle - accessories and earn 15% in cash rewards - toward your purchase when you save up for your Vincero - accessories with an Accrue Savings account. Sign - up here in just a few minutes today.

- +
- + -
- - - + + + + + + + + + + + + +
+
+
@@ -1362,67 +428,362 @@
-
+ +
- +
- - - - - - - -
-
- - - - - - - -
-
- - - - - - - -
-
- - - - - - - -
-
- - - - - - - -
-
- - - - - - - - - - - -
-
- - - - - - - -
-
- - - - - - - -
-
- - - - - - - -
-
- - - - - - - - - - - -
-
- - - - - - - -
-
- - - - -

- - - - - - - - - - - - -

- -
+
- - - - + + woman with back to camera looking at paintings + Stefan Puchner/Getty Images +
+
+ + + + + + + + + + +
+
+ + + + + + + + + + + +
+
+ + + + + + + + + + + +
+
+ + + + + + Students walking on campus in the fall. +Jon Lovette/Getty Images +
+
+ + + + + + + + + + +
+
+ + + + + + A girl drinks from a Starbucks cup while looking at her phone +Zhang Peng/Getty Images +
+
+ + + + + + + + + + +
+
+ + + + + + + + + + + +
+
+ + + + + + Accrue X Vincero + +
+
+ + + + + + + + + + +
+
+ + + + +
+
+ + + + + + + + + + +
+
+ + + + +
+
+ + + + + + + + + + +
+
+ + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + +
+
+ + + + + + + + + + - - - +
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- + + + + + + - - woman with back to camera looking at paintings - Stefan Puchner/Getty Images -
-
- - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + woman with back to camera looking at paintings +Stefan Puchner/Getty Images +
+
+ + + + + From da7ec3f5d4a0bad25b145e41b93d54bf9a70c222 Mon Sep 17 00:00:00 2001 From: Jackson Harper Date: Thu, 15 Sep 2022 17:23:28 +0800 Subject: [PATCH 24/39] Remove label top padding as these are spaced now --- apple/OmnivoreKit/Sources/Views/FeedItem/HomeFeedCardView.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apple/OmnivoreKit/Sources/Views/FeedItem/HomeFeedCardView.swift b/apple/OmnivoreKit/Sources/Views/FeedItem/HomeFeedCardView.swift index 551df5727..21b509c10 100644 --- a/apple/OmnivoreKit/Sources/Views/FeedItem/HomeFeedCardView.swift +++ b/apple/OmnivoreKit/Sources/Views/FeedItem/HomeFeedCardView.swift @@ -74,7 +74,7 @@ public struct FeedCard: View { Spacer() } } - .padding(.top, 8) + .padding(.top, 0) } } .padding(.top, 0) From 04b4c5ac9341ece212732330b18a3e1193b5f7e9 Mon Sep 17 00:00:00 2001 From: Satindar Dhillon Date: Thu, 8 Sep 2022 12:48:28 -0700 Subject: [PATCH 25/39] add pending user request --- .../app/omnivore/omnivore/RESTNetworker.kt | 10 ++++ .../omnivore/ui/auth/LoginViewModel.kt | 49 +++++++++++++++---- 2 files changed, 49 insertions(+), 10 deletions(-) diff --git a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/RESTNetworker.kt b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/RESTNetworker.kt index c9e238e67..824eb42d9 100644 --- a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/RESTNetworker.kt +++ b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/RESTNetworker.kt @@ -12,6 +12,10 @@ data class AuthPayload( val authToken: String ) +data class PendingUserAuthPayload( + val pendingUserToken: String, +) + data class SignInParams( val token: String, val provider: String, // APPLE or GOOGLE @@ -41,6 +45,12 @@ interface AuthProviderLoginSubmit { suspend fun submitAuthProviderLogin(@Body params: SignInParams): Response } +interface PendingUserSubmit { + @Headers("Content-Type: application/json") + @POST("/api/mobile-auth/sign-up") + suspend fun submitPendingUser(@Body params: SignInParams): Response +} + object RetrofitHelper { fun getInstance(): Retrofit { return Retrofit.Builder().baseUrl(Constants.apiURL) diff --git a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/LoginViewModel.kt b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/LoginViewModel.kt index 2b2f682eb..4a0618d9d 100644 --- a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/LoginViewModel.kt +++ b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/LoginViewModel.kt @@ -1,11 +1,12 @@ package app.omnivore.omnivore.ui.auth -import android.content.ContentValues -import android.util.Log import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.setValue -import androidx.lifecycle.* +import androidx.lifecycle.LiveData +import androidx.lifecycle.ViewModel +import androidx.lifecycle.asLiveData +import androidx.lifecycle.viewModelScope import app.omnivore.omnivore.* import com.google.android.gms.auth.api.signin.GoogleSignInAccount import com.google.android.gms.common.api.ApiException @@ -121,15 +122,43 @@ class LoginViewModel @Inject constructor( if (result.body()?.authToken != null) { datastoreRepo.putString(DatastoreKeys.omnivoreAuthToken, result.body()?.authToken!!) - } else { - errorMessage = "Something went wrong. Please check your credentials and try again" - } - if (result.body()?.authCookieString != null) { - datastoreRepo.putString( - DatastoreKeys.omnivoreAuthCookieString, result.body()?.authCookieString!! - ) + if (result.body()?.authCookieString != null) { + datastoreRepo.putString( + DatastoreKeys.omnivoreAuthCookieString, result.body()?.authCookieString!! + ) + } + } else { + when (result.code()) { + 401, 403 -> { + // This is a new user so they should go through the new user flow + submitAuthProviderPayloadForPendingToken(params = params) + } + 418 -> { + // Show pending email state + errorMessage = "Something went wrong. Please check your credentials and try again" + } + else -> { + errorMessage = "Something went wrong. Please check your credentials and try again" + } + } } } } + + private suspend fun submitAuthProviderPayloadForPendingToken(params: SignInParams) { + isLoading = true + errorMessage = null + + val request = RetrofitHelper.getInstance().create(PendingUserSubmit::class.java) + val result = request.submitPendingUser(params) + + isLoading = false + + if (result.body()?.pendingUserToken != null) { + // store in datastore + } else { + errorMessage = "Something went wrong. Please check your credentials and try again" + } + } } From 868a24a608cdd8a506484c78b453f84f7ba1cdb9 Mon Sep 17 00:00:00 2001 From: Satindar Dhillon Date: Thu, 8 Sep 2022 13:06:12 -0700 Subject: [PATCH 26/39] observe regsitration state from login view model --- .../omnivore/omnivore/ui/auth/EmailLogin.kt | 4 +-- .../omnivore/ui/auth/LoginViewModel.kt | 17 +++++++---- .../omnivore/ui/auth/WelcomeScreen.kt | 30 ++++++------------- .../omnivore/ui/home/HomeViewModel.kt | 1 - 4 files changed, 23 insertions(+), 29 deletions(-) diff --git a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/EmailLogin.kt b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/EmailLogin.kt index 99b41f432..6945ed327 100644 --- a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/EmailLogin.kt +++ b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/EmailLogin.kt @@ -24,7 +24,7 @@ import androidx.compose.ui.unit.dp @SuppressLint("CoroutineCreationDuringComposition") @Composable -fun EmailLoginView(viewModel: LoginViewModel, onAuthProviderButtonTap: () -> Unit) { +fun EmailLoginView(viewModel: LoginViewModel) { var email by rememberSaveable { mutableStateOf("") } var password by rememberSaveable { mutableStateOf("") } @@ -53,7 +53,7 @@ fun EmailLoginView(viewModel: LoginViewModel, onAuthProviderButtonTap: () -> Uni text = AnnotatedString("Return to Social Login"), style = MaterialTheme.typography.titleMedium .plus(TextStyle(textDecoration = TextDecoration.Underline)), - onClick = { onAuthProviderButtonTap() } + onClick = { viewModel.showSocialLogin() } ) } Spacer(modifier = Modifier.weight(1.0F)) diff --git a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/LoginViewModel.kt b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/LoginViewModel.kt index 4a0618d9d..ea58de14a 100644 --- a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/LoginViewModel.kt +++ b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/LoginViewModel.kt @@ -3,10 +3,7 @@ package app.omnivore.omnivore.ui.auth import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.setValue -import androidx.lifecycle.LiveData -import androidx.lifecycle.ViewModel -import androidx.lifecycle.asLiveData -import androidx.lifecycle.viewModelScope +import androidx.lifecycle.* import app.omnivore.omnivore.* import com.google.android.gms.auth.api.signin.GoogleSignInAccount import com.google.android.gms.common.api.ApiException @@ -19,7 +16,7 @@ import javax.inject.Inject enum class RegistrationState { - AuthProviderButtons, + SocialLogin, EmailSignIn } @@ -38,10 +35,20 @@ class LoginViewModel @Inject constructor( .distinctUntilChanged() .asLiveData() + val registrationStateLiveData = MutableLiveData(RegistrationState.SocialLogin) + fun getAuthCookieString(): String? = runBlocking { datastoreRepo.getString(DatastoreKeys.omnivoreAuthCookieString) } + fun showSocialLogin() { + registrationStateLiveData.value = RegistrationState.SocialLogin + } + + fun showEmailSignIn() { + registrationStateLiveData.value = RegistrationState.EmailSignIn + } + fun login(email: String, password: String) { val emailLogin = RetrofitHelper.getInstance().create(EmailLoginSubmit::class.java) diff --git a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/WelcomeScreen.kt b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/WelcomeScreen.kt index 8f9c5fe8a..cdcab04e0 100644 --- a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/WelcomeScreen.kt +++ b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/WelcomeScreen.kt @@ -9,6 +9,7 @@ import androidx.compose.foundation.layout.* import androidx.compose.foundation.text.ClickableText import androidx.compose.material3.* import androidx.compose.runtime.* +import androidx.compose.runtime.livedata.observeAsState import androidx.compose.runtime.saveable.rememberSaveable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier @@ -35,11 +36,9 @@ fun WelcomeScreen(viewModel: LoginViewModel) { @SuppressLint("CoroutineCreationDuringComposition") @Composable fun WelcomeScreenContent(viewModel: LoginViewModel) { - var registrationState by rememberSaveable { mutableStateOf(RegistrationState.AuthProviderButtons) } - - val onRegistrationStateChange = { state: RegistrationState -> - registrationState = state - } + val registrationState: RegistrationState by viewModel + .registrationStateLiveData + .observeAsState(RegistrationState.SocialLogin) val snackBarHostState = remember { SnackbarHostState() } val coroutineScope = rememberCoroutineScope() @@ -62,14 +61,9 @@ fun WelcomeScreenContent(viewModel: LoginViewModel) { when(registrationState) { RegistrationState.EmailSignIn -> { - EmailLoginView( - viewModel = viewModel, - onAuthProviderButtonTap = { - onRegistrationStateChange(RegistrationState.AuthProviderButtons) - } - ) + EmailLoginView(viewModel = viewModel) } - RegistrationState.AuthProviderButtons -> { + RegistrationState.SocialLogin -> { Text( text = stringResource(id = R.string.welcome_title), style = MaterialTheme.typography.headlineLarge @@ -84,10 +78,7 @@ fun WelcomeScreenContent(viewModel: LoginViewModel) { Spacer(modifier = Modifier.height(50.dp)) - AuthProviderView( - viewModel = viewModel, - onEmailButtonTap = { onRegistrationStateChange(RegistrationState.EmailSignIn) } - ) + AuthProviderView(viewModel = viewModel) } } @@ -112,10 +103,7 @@ fun WelcomeScreenContent(viewModel: LoginViewModel) { } @Composable -fun AuthProviderView( - viewModel: LoginViewModel, - onEmailButtonTap: () -> Unit -) { +fun AuthProviderView(viewModel: LoginViewModel) { val isGoogleAuthAvailable: Boolean = GoogleApiAvailability .getInstance() .isGooglePlayServicesAvailable(LocalContext.current) == 0 @@ -138,7 +126,7 @@ fun AuthProviderView( text = AnnotatedString("Continue with Email"), style = MaterialTheme.typography.titleMedium .plus(TextStyle(textDecoration = TextDecoration.Underline)), - onClick = { onEmailButtonTap() } + onClick = { viewModel.showEmailSignIn() } ) } Spacer(modifier = Modifier.weight(1.0F)) diff --git a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/home/HomeViewModel.kt b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/home/HomeViewModel.kt index 5d4ab6074..85ba6ecec 100644 --- a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/home/HomeViewModel.kt +++ b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/home/HomeViewModel.kt @@ -1,6 +1,5 @@ package app.omnivore.omnivore.ui.home -import android.util.Log import androidx.core.net.toUri import androidx.lifecycle.MutableLiveData import androidx.lifecycle.ViewModel From 7d1f1ef6fcc0216c7962d651dfa53ffb01f7e803 Mon Sep 17 00:00:00 2001 From: Satindar Dhillon Date: Thu, 8 Sep 2022 13:49:34 -0700 Subject: [PATCH 27/39] add create user profile view --- .../java/app/omnivore/omnivore/Constants.kt | 1 + .../omnivore/omnivore/DatastoreRepository.kt | 6 + .../omnivore/ui/auth/CreateUserProfile.kt | 127 ++++++++++++++++++ .../omnivore/ui/auth/LoginViewModel.kt | 20 ++- .../omnivore/ui/auth/WelcomeScreen.kt | 3 + 5 files changed, 154 insertions(+), 3 deletions(-) create mode 100644 android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/CreateUserProfile.kt diff --git a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/Constants.kt b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/Constants.kt index b351e3ecf..3b219d6a3 100644 --- a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/Constants.kt +++ b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/Constants.kt @@ -9,6 +9,7 @@ object Constants { object DatastoreKeys { const val omnivoreAuthToken = "omnivoreAuthToken" const val omnivoreAuthCookieString = "omnivoreAuthCookieString" + const val omnivorePendingUserToken = "omnivorePendingUserToken" } object AppleConstants { diff --git a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/DatastoreRepository.kt b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/DatastoreRepository.kt index 7392ffeb9..725054822 100644 --- a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/DatastoreRepository.kt +++ b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/DatastoreRepository.kt @@ -16,6 +16,7 @@ interface DatastoreRepository { suspend fun putInt(key: String, value: Int) suspend fun getString(key: String): String? suspend fun getInt(key: String): Int? + suspend fun clearValue(key: String) } class OmnivoreDatastore @Inject constructor( @@ -55,6 +56,11 @@ class OmnivoreDatastore @Inject constructor( context.dataStore.edit { it.clear() } } + override suspend fun clearValue(key: String) { + val preferencesKey = stringPreferencesKey(key) + context.dataStore.edit { it.remove(preferencesKey) } + } + override val hasAuthTokenFlow: Flow = context .dataStore.data.map { preferences -> val key = stringPreferencesKey(DatastoreKeys.omnivoreAuthToken) diff --git a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/CreateUserProfile.kt b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/CreateUserProfile.kt new file mode 100644 index 000000000..c8229c9a2 --- /dev/null +++ b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/CreateUserProfile.kt @@ -0,0 +1,127 @@ +package app.omnivore.omnivore.ui.auth + +import android.annotation.SuppressLint +import android.widget.Toast +import androidx.compose.foundation.layout.* +import androidx.compose.foundation.text.ClickableText +import androidx.compose.foundation.text.KeyboardActions +import androidx.compose.foundation.text.KeyboardOptions +import androidx.compose.material3.* +import androidx.compose.runtime.* +import androidx.compose.runtime.saveable.rememberSaveable +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.platform.LocalContext +import androidx.compose.ui.platform.LocalFocusManager +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.text.AnnotatedString +import androidx.compose.ui.text.TextStyle +import androidx.compose.ui.text.input.ImeAction +import androidx.compose.ui.text.style.TextDecoration +import androidx.compose.ui.unit.dp +import app.omnivore.omnivore.R + +@SuppressLint("CoroutineCreationDuringComposition") +@Composable +fun CreateUserProfileView(viewModel: LoginViewModel) { + var name by rememberSaveable { mutableStateOf("") } + var username by rememberSaveable { mutableStateOf("") } + + Row( + horizontalArrangement = Arrangement.Center + ) { + Spacer(modifier = Modifier.weight(1.0F)) + Column( + verticalArrangement = Arrangement.Center, + horizontalAlignment = Alignment.CenterHorizontally + ) { + Text( + text = "Create Your Profile", + style = MaterialTheme.typography.headlineMedium, + modifier = Modifier.padding(bottom = 8.dp) + ) + UserProfileFields( + name = name, + username = username, + onNameChange = { name = it }, + onUsernameChange = { username = it }, + onSubmit = { } // TODO: add viewModel function + ) + + // TODO: add a activity indicator (maybe after a delay?) + if (viewModel.isLoading) { + Text("Loading...") + } + + ClickableText( + text = AnnotatedString("Cancel Sign Up"), + style = MaterialTheme.typography.titleMedium + .plus(TextStyle(textDecoration = TextDecoration.Underline)), + onClick = { viewModel.cancelNewUserSignUp() } + ) + } + Spacer(modifier = Modifier.weight(1.0F)) + } +} + +@OptIn(ExperimentalMaterial3Api::class) +@Composable +fun UserProfileFields( + name: String, + username: String, + onNameChange: (String) -> Unit, + onUsernameChange: (String) -> Unit, + onSubmit: () -> Unit +) { + val context = LocalContext.current + val focusManager = LocalFocusManager.current + + Column( + modifier = Modifier + .fillMaxWidth() + .height(300.dp), + verticalArrangement = Arrangement.spacedBy(25.dp), + horizontalAlignment = Alignment.CenterHorizontally + ) { + OutlinedTextField( + value = username, + placeholder = { Text(text = "Username") }, + label = { Text(text = "Username") }, + onValueChange = onUsernameChange, + keyboardOptions = KeyboardOptions(imeAction = ImeAction.Done), + keyboardActions = KeyboardActions(onDone = { focusManager.clearFocus() }) + ) + + OutlinedTextField( + value = name, + placeholder = { Text(text = "Name") }, + label = { Text(text = "Name") }, + onValueChange = onNameChange, + keyboardOptions = KeyboardOptions(imeAction = ImeAction.Done), + keyboardActions = KeyboardActions(onDone = { focusManager.clearFocus() }) + ) + + Button(onClick = { + if (name.isNotBlank() && username.isNotBlank()) { + onSubmit() + focusManager.clearFocus() + } else { + Toast.makeText( + context, + "Please enter a valid username and password.", + Toast.LENGTH_SHORT + ).show() + } + }, colors = ButtonDefaults.buttonColors( + contentColor = Color(0xFF3D3D3D), + containerColor = Color(0xffffd234) + ) + ) { + Text( + text = "Submit", + modifier = Modifier.padding(horizontal = 100.dp) + ) + } + } +} diff --git a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/LoginViewModel.kt b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/LoginViewModel.kt index ea58de14a..62391b05d 100644 --- a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/LoginViewModel.kt +++ b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/LoginViewModel.kt @@ -17,7 +17,8 @@ import javax.inject.Inject enum class RegistrationState { SocialLogin, - EmailSignIn + EmailSignIn, + PendingUser } @HiltViewModel @@ -35,7 +36,7 @@ class LoginViewModel @Inject constructor( .distinctUntilChanged() .asLiveData() - val registrationStateLiveData = MutableLiveData(RegistrationState.SocialLogin) + val registrationStateLiveData = MutableLiveData(RegistrationState.PendingUser) // TODO: set back to social login fun getAuthCookieString(): String? = runBlocking { datastoreRepo.getString(DatastoreKeys.omnivoreAuthCookieString) @@ -49,6 +50,13 @@ class LoginViewModel @Inject constructor( registrationStateLiveData.value = RegistrationState.EmailSignIn } + fun cancelNewUserSignUp() { + viewModelScope.launch { + datastoreRepo.clearValue(DatastoreKeys.omnivorePendingUserToken) + } + showSocialLogin() + } + fun login(email: String, password: String) { val emailLogin = RetrofitHelper.getInstance().create(EmailLoginSubmit::class.java) @@ -163,9 +171,15 @@ class LoginViewModel @Inject constructor( isLoading = false if (result.body()?.pendingUserToken != null) { - // store in datastore + datastoreRepo.putString( + DatastoreKeys.omnivorePendingUserToken, result.body()?.pendingUserToken!! + ) + registrationStateLiveData.value = RegistrationState.PendingUser } else { errorMessage = "Something went wrong. Please check your credentials and try again" } } } + + +// TODO: set registrationState to pending if user has pending token diff --git a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/WelcomeScreen.kt b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/WelcomeScreen.kt index cdcab04e0..2996c81c4 100644 --- a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/WelcomeScreen.kt +++ b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/WelcomeScreen.kt @@ -80,6 +80,9 @@ fun WelcomeScreenContent(viewModel: LoginViewModel) { AuthProviderView(viewModel = viewModel) } + RegistrationState.PendingUser -> { + CreateUserProfileView(viewModel = viewModel) + } } Spacer(modifier = Modifier.weight(1.0F)) From 721226c6cc51b16aef6c6cd6d1ab2b180a981a4b Mon Sep 17 00:00:00 2001 From: Satindar Dhillon Date: Thu, 8 Sep 2022 15:49:56 -0700 Subject: [PATCH 28/39] add validate username graphql file --- .../Omnivore/app/src/main/graphql/ValidateUsername.graphql | 3 +++ .../java/app/omnivore/omnivore/ui/auth/LoginViewModel.kt | 5 +---- 2 files changed, 4 insertions(+), 4 deletions(-) create mode 100644 android/Omnivore/app/src/main/graphql/ValidateUsername.graphql diff --git a/android/Omnivore/app/src/main/graphql/ValidateUsername.graphql b/android/Omnivore/app/src/main/graphql/ValidateUsername.graphql new file mode 100644 index 000000000..79938a855 --- /dev/null +++ b/android/Omnivore/app/src/main/graphql/ValidateUsername.graphql @@ -0,0 +1,3 @@ +query ValidateUsername($username: String!) { + validateUsername(username: $username) +} diff --git a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/LoginViewModel.kt b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/LoginViewModel.kt index 62391b05d..158ab91c1 100644 --- a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/LoginViewModel.kt +++ b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/LoginViewModel.kt @@ -36,7 +36,7 @@ class LoginViewModel @Inject constructor( .distinctUntilChanged() .asLiveData() - val registrationStateLiveData = MutableLiveData(RegistrationState.PendingUser) // TODO: set back to social login + val registrationStateLiveData = MutableLiveData(RegistrationState.SocialLogin) fun getAuthCookieString(): String? = runBlocking { datastoreRepo.getString(DatastoreKeys.omnivoreAuthCookieString) @@ -180,6 +180,3 @@ class LoginViewModel @Inject constructor( } } } - - -// TODO: set registrationState to pending if user has pending token From 20f618a1e6a1b776bb767fd4645012c53a73282d Mon Sep 17 00:00:00 2001 From: Satindar Dhillon Date: Thu, 8 Sep 2022 21:36:33 -0700 Subject: [PATCH 29/39] add username validation --- .../omnivore/ui/auth/CreateUserProfile.kt | 69 ++++++++++++------- .../omnivore/ui/auth/LoginViewModel.kt | 56 ++++++++++++++- 2 files changed, 99 insertions(+), 26 deletions(-) diff --git a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/CreateUserProfile.kt b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/CreateUserProfile.kt index c8229c9a2..1da7e33ae 100644 --- a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/CreateUserProfile.kt +++ b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/CreateUserProfile.kt @@ -44,8 +44,13 @@ fun CreateUserProfileView(viewModel: LoginViewModel) { UserProfileFields( name = name, username = username, + usernameValidationErrorMessage = viewModel.usernameValidationErrorMessage, + showUsernameAsAvailable = viewModel.hasValidUsername, onNameChange = { name = it }, - onUsernameChange = { username = it }, + onUsernameChange = { + username = it + viewModel.validateUsername(it) + }, onSubmit = { } // TODO: add viewModel function ) @@ -70,6 +75,8 @@ fun CreateUserProfileView(viewModel: LoginViewModel) { fun UserProfileFields( name: String, username: String, + usernameValidationErrorMessage: String?, + showUsernameAsAvailable: Boolean, // TODO: use this to add green checkmark onNameChange: (String) -> Unit, onUsernameChange: (String) -> Unit, onSubmit: () -> Unit @@ -84,15 +91,6 @@ fun UserProfileFields( verticalArrangement = Arrangement.spacedBy(25.dp), horizontalAlignment = Alignment.CenterHorizontally ) { - OutlinedTextField( - value = username, - placeholder = { Text(text = "Username") }, - label = { Text(text = "Username") }, - onValueChange = onUsernameChange, - keyboardOptions = KeyboardOptions(imeAction = ImeAction.Done), - keyboardActions = KeyboardActions(onDone = { focusManager.clearFocus() }) - ) - OutlinedTextField( value = name, placeholder = { Text(text = "Name") }, @@ -102,21 +100,44 @@ fun UserProfileFields( keyboardActions = KeyboardActions(onDone = { focusManager.clearFocus() }) ) - Button(onClick = { - if (name.isNotBlank() && username.isNotBlank()) { - onSubmit() - focusManager.clearFocus() - } else { - Toast.makeText( - context, - "Please enter a valid username and password.", - Toast.LENGTH_SHORT - ).show() + Column( + verticalArrangement = Arrangement.spacedBy(5.dp), + horizontalAlignment = Alignment.CenterHorizontally + ) { + OutlinedTextField( + value = username, + placeholder = { Text(text = "Username") }, + label = { Text(text = "Username") }, + onValueChange = onUsernameChange, + keyboardOptions = KeyboardOptions(imeAction = ImeAction.Done), + keyboardActions = KeyboardActions(onDone = { focusManager.clearFocus() }) + ) + + if (usernameValidationErrorMessage != null) { + Text( + text = usernameValidationErrorMessage!!, + style = MaterialTheme.typography.bodyLarge, + color = MaterialTheme.colorScheme.error, + ) } - }, colors = ButtonDefaults.buttonColors( - contentColor = Color(0xFF3D3D3D), - containerColor = Color(0xffffd234) - ) + } + + Button( + onClick = { + if (name.isNotBlank() && username.isNotBlank()) { + onSubmit() + focusManager.clearFocus() + } else { + Toast.makeText( + context, + "Please enter a valid username and password.", + Toast.LENGTH_SHORT + ).show() + } + }, colors = ButtonDefaults.buttonColors( + contentColor = Color(0xFF3D3D3D), + containerColor = Color(0xffffd234) + ) ) { Text( text = "Submit", diff --git a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/LoginViewModel.kt b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/LoginViewModel.kt index 158ab91c1..d174770be 100644 --- a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/LoginViewModel.kt +++ b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/LoginViewModel.kt @@ -5,16 +5,21 @@ import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.setValue import androidx.lifecycle.* import app.omnivore.omnivore.* +import app.omnivore.omnivore.graphql.generated.SearchQuery +import app.omnivore.omnivore.graphql.generated.ValidateUsernameQuery +import com.apollographql.apollo3.ApolloClient +import com.apollographql.apollo3.api.Optional import com.google.android.gms.auth.api.signin.GoogleSignInAccount import com.google.android.gms.common.api.ApiException import com.google.android.gms.tasks.Task import dagger.hilt.android.lifecycle.HiltViewModel +import kotlinx.coroutines.Job +import kotlinx.coroutines.delay import kotlinx.coroutines.flow.distinctUntilChanged import kotlinx.coroutines.launch import kotlinx.coroutines.runBlocking import javax.inject.Inject - enum class RegistrationState { SocialLogin, EmailSignIn, @@ -25,18 +30,26 @@ enum class RegistrationState { class LoginViewModel @Inject constructor( private val datastoreRepo: DatastoreRepository ): ViewModel() { + private var validateUsernameJob: Job? = null + var isLoading by mutableStateOf(false) private set var errorMessage by mutableStateOf(null) private set + var hasValidUsername by mutableStateOf(false) + private set + + var usernameValidationErrorMessage by mutableStateOf(null) + private set + val hasAuthTokenLiveData: LiveData = datastoreRepo .hasAuthTokenFlow .distinctUntilChanged() .asLiveData() - val registrationStateLiveData = MutableLiveData(RegistrationState.SocialLogin) + val registrationStateLiveData = MutableLiveData(RegistrationState.PendingUser) // TODO: switch back to Social fun getAuthCookieString(): String? = runBlocking { datastoreRepo.getString(DatastoreKeys.omnivoreAuthCookieString) @@ -57,6 +70,45 @@ class LoginViewModel @Inject constructor( showSocialLogin() } + fun validateUsername(potentialUsername: String) { + validateUsernameJob?.cancel() + + validateUsernameJob = viewModelScope.launch { + delay(500) + + // Check the username requirements first + if (potentialUsername.isEmpty()) { + usernameValidationErrorMessage = null + hasValidUsername = false + return@launch + } + + if (potentialUsername.length < 4 || potentialUsername.length > 15) { + usernameValidationErrorMessage = "Username must be between 4 and 15 characters long." + hasValidUsername = false + return@launch + } + + // TODO: check email regex + + val apolloClient = ApolloClient.Builder() + .serverUrl("${Constants.apiURL}/api/graphql") + .build() + + val response = apolloClient.query( + ValidateUsernameQuery(username = potentialUsername) + ).execute() + + if (response.data?.validateUsername == true) { + usernameValidationErrorMessage = null + hasValidUsername = true + } else { + hasValidUsername = false + usernameValidationErrorMessage = "This username is not available." + } + } + } + fun login(email: String, password: String) { val emailLogin = RetrofitHelper.getInstance().create(EmailLoginSubmit::class.java) From 1e93e462b988a3f51832b1fc3f99ad4de1eced85 Mon Sep 17 00:00:00 2001 From: Satindar Dhillon Date: Thu, 8 Sep 2022 21:56:53 -0700 Subject: [PATCH 30/39] add create-account call for user sign up --- .../app/omnivore/omnivore/RESTNetworker.kt | 16 ++++++++ .../omnivore/ui/auth/CreateUserProfile.kt | 2 +- .../omnivore/ui/auth/LoginViewModel.kt | 39 ++++++++++++++++++- 3 files changed, 55 insertions(+), 2 deletions(-) diff --git a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/RESTNetworker.kt b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/RESTNetworker.kt index 824eb42d9..bf58a49d4 100644 --- a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/RESTNetworker.kt +++ b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/RESTNetworker.kt @@ -33,6 +33,16 @@ data class EmailLoginCredentials( val password: String ) +data class CreateAccountParams( + val pendingUserToken: String, + val userProfile: UserProfile +) + +data class UserProfile( + val username: String, + val name: String +) + interface EmailLoginSubmit { @Headers("Content-Type: application/json") @POST("/api/mobile-auth/email-sign-in") @@ -51,6 +61,12 @@ interface PendingUserSubmit { suspend fun submitPendingUser(@Body params: SignInParams): Response } +interface CreateAccountSubmit { + @Headers("Content-Type: application/json") + @POST("/api/mobile-auth/create-account") + suspend fun submitCreateAccount(@Body params: CreateAccountParams): Response +} + object RetrofitHelper { fun getInstance(): Retrofit { return Retrofit.Builder().baseUrl(Constants.apiURL) diff --git a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/CreateUserProfile.kt b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/CreateUserProfile.kt index 1da7e33ae..989213264 100644 --- a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/CreateUserProfile.kt +++ b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/CreateUserProfile.kt @@ -51,7 +51,7 @@ fun CreateUserProfileView(viewModel: LoginViewModel) { username = it viewModel.validateUsername(it) }, - onSubmit = { } // TODO: add viewModel function + onSubmit = { viewModel.submitProfile(username = username, name = name) } ) // TODO: add a activity indicator (maybe after a delay?) diff --git a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/LoginViewModel.kt b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/LoginViewModel.kt index d174770be..bbc6cee8b 100644 --- a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/LoginViewModel.kt +++ b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/LoginViewModel.kt @@ -49,7 +49,7 @@ class LoginViewModel @Inject constructor( .distinctUntilChanged() .asLiveData() - val registrationStateLiveData = MutableLiveData(RegistrationState.PendingUser) // TODO: switch back to Social + val registrationStateLiveData = MutableLiveData(RegistrationState.SocialLogin) fun getAuthCookieString(): String? = runBlocking { datastoreRepo.getString(DatastoreKeys.omnivoreAuthCookieString) @@ -141,6 +141,43 @@ class LoginViewModel @Inject constructor( } } + private fun getPendingAuthToken(): String? = runBlocking { + datastoreRepo.getString(DatastoreKeys.omnivorePendingUserToken) + } + + fun submitProfile(username: String, name: String) { + viewModelScope.launch { + val request = RetrofitHelper.getInstance().create(CreateAccountSubmit::class.java) + + isLoading = true + errorMessage = null + + val pendingUserToken = getPendingAuthToken() ?: "" + + val userProfile = UserProfile(name = name, username = username) + val params = CreateAccountParams( + pendingUserToken = pendingUserToken, + userProfile = userProfile + ) + + val result = request.submitCreateAccount(params) + + isLoading = false + + if (result.body()?.authToken != null) { + datastoreRepo.putString(DatastoreKeys.omnivoreAuthToken, result.body()?.authToken!!) + } else { + errorMessage = "Something went wrong. Please check your email/password and try again" + } + + if (result.body()?.authCookieString != null) { + datastoreRepo.putString( + DatastoreKeys.omnivoreAuthCookieString, result.body()?.authCookieString!! + ) + } + } + } + fun handleAppleToken(authToken: String) { submitAuthProviderPayload( params = SignInParams(token = authToken, provider = "APPLE") From bf000e665c639c36c49258a1561eef6705cb67a1 Mon Sep 17 00:00:00 2001 From: Satindar Dhillon Date: Fri, 9 Sep 2022 10:42:37 -0700 Subject: [PATCH 31/39] validate username pattern. show checkmark when name is valid --- .../omnivore/ui/auth/CreateUserProfile.kt | 20 ++++++++++++++++--- .../omnivore/ui/auth/LoginViewModel.kt | 11 +++++++++- .../main/res/xml/data_extraction_rules.xml | 2 +- 3 files changed, 28 insertions(+), 5 deletions(-) diff --git a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/CreateUserProfile.kt b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/CreateUserProfile.kt index 989213264..153d3804e 100644 --- a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/CreateUserProfile.kt +++ b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/CreateUserProfile.kt @@ -6,6 +6,9 @@ import androidx.compose.foundation.layout.* import androidx.compose.foundation.text.ClickableText import androidx.compose.foundation.text.KeyboardActions import androidx.compose.foundation.text.KeyboardOptions +import androidx.compose.material.icons.Icons +import androidx.compose.material.icons.filled.CheckCircle +import androidx.compose.material.icons.filled.Search import androidx.compose.material3.* import androidx.compose.runtime.* import androidx.compose.runtime.saveable.rememberSaveable @@ -18,9 +21,11 @@ import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.AnnotatedString import androidx.compose.ui.text.TextStyle import androidx.compose.ui.text.input.ImeAction +import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.text.style.TextDecoration import androidx.compose.ui.unit.dp import app.omnivore.omnivore.R +import org.intellij.lang.annotations.JdkConstants @SuppressLint("CoroutineCreationDuringComposition") @Composable @@ -76,7 +81,7 @@ fun UserProfileFields( name: String, username: String, usernameValidationErrorMessage: String?, - showUsernameAsAvailable: Boolean, // TODO: use this to add green checkmark + showUsernameAsAvailable: Boolean, onNameChange: (String) -> Unit, onUsernameChange: (String) -> Unit, onSubmit: () -> Unit @@ -110,7 +115,15 @@ fun UserProfileFields( label = { Text(text = "Username") }, onValueChange = onUsernameChange, keyboardOptions = KeyboardOptions(imeAction = ImeAction.Done), - keyboardActions = KeyboardActions(onDone = { focusManager.clearFocus() }) + keyboardActions = KeyboardActions(onDone = { focusManager.clearFocus() }), + trailingIcon = { + if (showUsernameAsAvailable) { + Icon( + imageVector = Icons.Filled.CheckCircle, + contentDescription = null + ) + } + } ) if (usernameValidationErrorMessage != null) { @@ -118,6 +131,7 @@ fun UserProfileFields( text = usernameValidationErrorMessage!!, style = MaterialTheme.typography.bodyLarge, color = MaterialTheme.colorScheme.error, + textAlign = TextAlign.Center ) } } @@ -130,7 +144,7 @@ fun UserProfileFields( } else { Toast.makeText( context, - "Please enter a valid username and password.", + "Please enter a valid name and username.", Toast.LENGTH_SHORT ).show() } diff --git a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/LoginViewModel.kt b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/LoginViewModel.kt index bbc6cee8b..f7b5ab8d2 100644 --- a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/LoginViewModel.kt +++ b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/LoginViewModel.kt @@ -18,6 +18,7 @@ import kotlinx.coroutines.delay import kotlinx.coroutines.flow.distinctUntilChanged import kotlinx.coroutines.launch import kotlinx.coroutines.runBlocking +import java.util.regex.Pattern import javax.inject.Inject enum class RegistrationState { @@ -89,7 +90,15 @@ class LoginViewModel @Inject constructor( return@launch } - // TODO: check email regex + val isValidPattern = Pattern.compile("^[a-z0-9][a-z0-9_]+[a-z0-9]$") + .matcher(potentialUsername) + .matches() + + if (!isValidPattern) { + usernameValidationErrorMessage = "Username can contain only letters and numbers" + hasValidUsername = false + return@launch + } val apolloClient = ApolloClient.Builder() .serverUrl("${Constants.apiURL}/api/graphql") diff --git a/android/Omnivore/app/src/main/res/xml/data_extraction_rules.xml b/android/Omnivore/app/src/main/res/xml/data_extraction_rules.xml index 0c4f95cab..e59428ef8 100644 --- a/android/Omnivore/app/src/main/res/xml/data_extraction_rules.xml +++ b/android/Omnivore/app/src/main/res/xml/data_extraction_rules.xml @@ -5,7 +5,7 @@ --> - From bfbcf9b339ab28f234377973a2abe56aed01e2a0 Mon Sep 17 00:00:00 2001 From: Satindar Dhillon Date: Fri, 9 Sep 2022 10:57:54 -0700 Subject: [PATCH 32/39] stub in email signup view --- .../omnivore/omnivore/ui/auth/EmailLogin.kt | 7 + .../omnivore/ui/auth/EmailSignUpView.kt | 129 ++++++++++++++++++ .../omnivore/ui/auth/LoginViewModel.kt | 5 + .../omnivore/ui/auth/WelcomeScreen.kt | 3 + 4 files changed, 144 insertions(+) create mode 100644 android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/EmailSignUpView.kt diff --git a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/EmailLogin.kt b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/EmailLogin.kt index 6945ed327..09c2ff8d2 100644 --- a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/EmailLogin.kt +++ b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/EmailLogin.kt @@ -55,6 +55,13 @@ fun EmailLoginView(viewModel: LoginViewModel) { .plus(TextStyle(textDecoration = TextDecoration.Underline)), onClick = { viewModel.showSocialLogin() } ) + + ClickableText( + text = AnnotatedString("Don't have an account?"), + style = MaterialTheme.typography.titleMedium + .plus(TextStyle(textDecoration = TextDecoration.Underline)), + onClick = { viewModel.showEmailSignUp() } + ) } Spacer(modifier = Modifier.weight(1.0F)) } diff --git a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/EmailSignUpView.kt b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/EmailSignUpView.kt new file mode 100644 index 000000000..30184e10f --- /dev/null +++ b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/EmailSignUpView.kt @@ -0,0 +1,129 @@ +package app.omnivore.omnivore.ui.auth + +import android.annotation.SuppressLint +import android.widget.Toast +import androidx.compose.foundation.layout.* +import androidx.compose.foundation.text.ClickableText +import androidx.compose.foundation.text.KeyboardActions +import androidx.compose.foundation.text.KeyboardOptions +import androidx.compose.material3.* +import androidx.compose.runtime.* +import androidx.compose.runtime.saveable.rememberSaveable +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.platform.LocalContext +import androidx.compose.ui.platform.LocalFocusManager +import androidx.compose.ui.text.AnnotatedString +import androidx.compose.ui.text.TextStyle +import androidx.compose.ui.text.input.ImeAction +import androidx.compose.ui.text.input.PasswordVisualTransformation +import androidx.compose.ui.text.style.TextDecoration +import androidx.compose.ui.unit.dp + +@SuppressLint("CoroutineCreationDuringComposition") +@Composable +fun EmailSignUpView(viewModel: LoginViewModel) { + var email by rememberSaveable { mutableStateOf("") } + var password by rememberSaveable { mutableStateOf("") } + + Row( + horizontalArrangement = Arrangement.Center + ) { + Spacer(modifier = Modifier.weight(1.0F)) + Column( + verticalArrangement = Arrangement.Center, + horizontalAlignment = Alignment.CenterHorizontally + ) { + EmailSignUpFields( + email, + password, + onEmailChange = { email = it }, + onPasswordChange = { password = it }, + onLoginClick = { viewModel.login(email, password) } + ) + + // TODO: add a activity indicator (maybe after a delay?) + if (viewModel.isLoading) { + Text("Loading...") + } + + ClickableText( + text = AnnotatedString("Return to Social Login"), + style = MaterialTheme.typography.titleMedium + .plus(TextStyle(textDecoration = TextDecoration.Underline)), + onClick = { viewModel.showSocialLogin() } + ) + + ClickableText( + text = AnnotatedString("Already have an account?"), + style = MaterialTheme.typography.titleMedium + .plus(TextStyle(textDecoration = TextDecoration.Underline)), + onClick = { viewModel.showEmailSignIn() } + ) + } + Spacer(modifier = Modifier.weight(1.0F)) + } +} + +@OptIn(ExperimentalMaterial3Api::class) +@Composable +fun EmailSignUpFields( + email: String, + password: String, + onEmailChange: (String) -> Unit, + onPasswordChange: (String) -> Unit, + onLoginClick: () -> Unit +) { + val context = LocalContext.current + val focusManager = LocalFocusManager.current + + Column( + modifier = Modifier + .fillMaxWidth() + .height(300.dp), + verticalArrangement = Arrangement.spacedBy(25.dp), + horizontalAlignment = Alignment.CenterHorizontally + ) { + OutlinedTextField( + value = email, + placeholder = { Text(text = "user@email.com") }, + label = { Text(text = "Email") }, + onValueChange = onEmailChange, + keyboardOptions = KeyboardOptions(imeAction = ImeAction.Done), + keyboardActions = KeyboardActions(onDone = { focusManager.clearFocus() }) + ) + + OutlinedTextField( + value = password, + placeholder = { Text(text = "Password") }, + label = { Text(text = "Password") }, + onValueChange = onPasswordChange, + visualTransformation = PasswordVisualTransformation(), + keyboardOptions = KeyboardOptions(imeAction = ImeAction.Done), + keyboardActions = KeyboardActions(onDone = { focusManager.clearFocus() }) + ) + + Button(onClick = { + if (email.isNotBlank() && password.isNotBlank()) { + onLoginClick() + focusManager.clearFocus() + } else { + Toast.makeText( + context, + "Please enter an email address and password.", + Toast.LENGTH_SHORT + ).show() + } + }, colors = ButtonDefaults.buttonColors( + contentColor = Color(0xFF3D3D3D), + containerColor = Color(0xffffd234) + ) + ) { + Text( + text = "Login", + modifier = Modifier.padding(horizontal = 100.dp) + ) + } + } +} diff --git a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/LoginViewModel.kt b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/LoginViewModel.kt index f7b5ab8d2..187b8d280 100644 --- a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/LoginViewModel.kt +++ b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/LoginViewModel.kt @@ -24,6 +24,7 @@ import javax.inject.Inject enum class RegistrationState { SocialLogin, EmailSignIn, + EmailSignUp, PendingUser } @@ -64,6 +65,10 @@ class LoginViewModel @Inject constructor( registrationStateLiveData.value = RegistrationState.EmailSignIn } + fun showEmailSignUp() { + registrationStateLiveData.value = RegistrationState.EmailSignUp + } + fun cancelNewUserSignUp() { viewModelScope.launch { datastoreRepo.clearValue(DatastoreKeys.omnivorePendingUserToken) diff --git a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/WelcomeScreen.kt b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/WelcomeScreen.kt index 2996c81c4..7f497d556 100644 --- a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/WelcomeScreen.kt +++ b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/WelcomeScreen.kt @@ -63,6 +63,9 @@ fun WelcomeScreenContent(viewModel: LoginViewModel) { RegistrationState.EmailSignIn -> { EmailLoginView(viewModel = viewModel) } + RegistrationState.EmailSignUp -> { + EmailSignUpView(viewModel = viewModel) + } RegistrationState.SocialLogin -> { Text( text = stringResource(id = R.string.welcome_title), From 1024cb5a314a18b90fb70073737d0552c0142ef5 Mon Sep 17 00:00:00 2001 From: Satindar Dhillon Date: Fri, 9 Sep 2022 11:48:32 -0700 Subject: [PATCH 33/39] add name and username fields to email signup form --- .../omnivore/ui/auth/EmailSignUpView.kt | 83 +++++++++++++++++-- .../omnivore/ui/auth/LoginViewModel.kt | 9 ++ 2 files changed, 84 insertions(+), 8 deletions(-) diff --git a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/EmailSignUpView.kt b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/EmailSignUpView.kt index 30184e10f..e7bea14d2 100644 --- a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/EmailSignUpView.kt +++ b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/EmailSignUpView.kt @@ -6,6 +6,8 @@ import androidx.compose.foundation.layout.* import androidx.compose.foundation.text.ClickableText import androidx.compose.foundation.text.KeyboardActions import androidx.compose.foundation.text.KeyboardOptions +import androidx.compose.material.icons.Icons +import androidx.compose.material.icons.filled.CheckCircle import androidx.compose.material3.* import androidx.compose.runtime.* import androidx.compose.runtime.saveable.rememberSaveable @@ -18,6 +20,7 @@ import androidx.compose.ui.text.AnnotatedString import androidx.compose.ui.text.TextStyle import androidx.compose.ui.text.input.ImeAction import androidx.compose.ui.text.input.PasswordVisualTransformation +import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.text.style.TextDecoration import androidx.compose.ui.unit.dp @@ -26,6 +29,8 @@ import androidx.compose.ui.unit.dp fun EmailSignUpView(viewModel: LoginViewModel) { var email by rememberSaveable { mutableStateOf("") } var password by rememberSaveable { mutableStateOf("") } + var name by rememberSaveable { mutableStateOf("") } + var username by rememberSaveable { mutableStateOf("") } Row( horizontalArrangement = Arrangement.Center @@ -36,11 +41,27 @@ fun EmailSignUpView(viewModel: LoginViewModel) { horizontalAlignment = Alignment.CenterHorizontally ) { EmailSignUpFields( - email, - password, + email = email, + password = password, + name = name, + username = username, + usernameValidationErrorMessage = viewModel.usernameValidationErrorMessage, + showUsernameAsAvailable = viewModel.hasValidUsername, onEmailChange = { email = it }, onPasswordChange = { password = it }, - onLoginClick = { viewModel.login(email, password) } + onNameChange = { name = it }, + onUsernameChange = { + username = it + viewModel.validateUsername(it) + }, + onSubmit = { + viewModel.submitEmailSignUp( + email = email, + password = password, + username = username, + name = name + ) + } ) // TODO: add a activity indicator (maybe after a delay?) @@ -71,9 +92,15 @@ fun EmailSignUpView(viewModel: LoginViewModel) { fun EmailSignUpFields( email: String, password: String, + name: String, + username: String, + usernameValidationErrorMessage: String?, + showUsernameAsAvailable: Boolean, onEmailChange: (String) -> Unit, onPasswordChange: (String) -> Unit, - onLoginClick: () -> Unit + onNameChange: (String) -> Unit, + onUsernameChange: (String) -> Unit, + onSubmit: () -> Unit, ) { val context = LocalContext.current val focusManager = LocalFocusManager.current @@ -104,14 +131,54 @@ fun EmailSignUpFields( keyboardActions = KeyboardActions(onDone = { focusManager.clearFocus() }) ) + OutlinedTextField( + value = name, + placeholder = { Text(text = "Name") }, + label = { Text(text = "Name") }, + onValueChange = onNameChange, + keyboardOptions = KeyboardOptions(imeAction = ImeAction.Done), + keyboardActions = KeyboardActions(onDone = { focusManager.clearFocus() }) + ) + + Column( + verticalArrangement = Arrangement.spacedBy(5.dp), + horizontalAlignment = Alignment.CenterHorizontally + ) { + OutlinedTextField( + value = username, + placeholder = { Text(text = "Username") }, + label = { Text(text = "Username") }, + onValueChange = onUsernameChange, + keyboardOptions = KeyboardOptions(imeAction = ImeAction.Done), + keyboardActions = KeyboardActions(onDone = { focusManager.clearFocus() }), + trailingIcon = { + if (showUsernameAsAvailable) { + Icon( + imageVector = Icons.Filled.CheckCircle, + contentDescription = null + ) + } + } + ) + + if (usernameValidationErrorMessage != null) { + Text( + text = usernameValidationErrorMessage!!, + style = MaterialTheme.typography.bodyLarge, + color = MaterialTheme.colorScheme.error, + textAlign = TextAlign.Center + ) + } + } + Button(onClick = { - if (email.isNotBlank() && password.isNotBlank()) { - onLoginClick() + if (email.isNotBlank() && password.isNotBlank() && username.isNotBlank() && name.isNotBlank()) { + onSubmit() focusManager.clearFocus() } else { Toast.makeText( context, - "Please enter an email address and password.", + "Please complete all fields.", Toast.LENGTH_SHORT ).show() } @@ -121,7 +188,7 @@ fun EmailSignUpFields( ) ) { Text( - text = "Login", + text = "Sign Up", modifier = Modifier.padding(horizontal = 100.dp) ) } diff --git a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/LoginViewModel.kt b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/LoginViewModel.kt index 187b8d280..117d06432 100644 --- a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/LoginViewModel.kt +++ b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/LoginViewModel.kt @@ -155,6 +155,15 @@ class LoginViewModel @Inject constructor( } } + fun submitEmailSignUp( + email: String, + password: String, + username: String, + name: String, + ) { + // TODO: make network call + } + private fun getPendingAuthToken(): String? = runBlocking { datastoreRepo.getString(DatastoreKeys.omnivorePendingUserToken) } From 86693309327dabe1a7d3d3471e8cc1115d763234 Mon Sep 17 00:00:00 2001 From: Satindar Dhillon Date: Sat, 10 Sep 2022 07:27:16 -0700 Subject: [PATCH 34/39] add scroll to email sign up form --- .../java/app/omnivore/omnivore/ui/auth/EmailSignUpView.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/EmailSignUpView.kt b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/EmailSignUpView.kt index e7bea14d2..43cb3d973 100644 --- a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/EmailSignUpView.kt +++ b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/EmailSignUpView.kt @@ -3,9 +3,11 @@ package app.omnivore.omnivore.ui.auth import android.annotation.SuppressLint import android.widget.Toast import androidx.compose.foundation.layout.* +import androidx.compose.foundation.rememberScrollState import androidx.compose.foundation.text.ClickableText import androidx.compose.foundation.text.KeyboardActions import androidx.compose.foundation.text.KeyboardOptions +import androidx.compose.foundation.verticalScroll import androidx.compose.material.icons.Icons import androidx.compose.material.icons.filled.CheckCircle import androidx.compose.material3.* @@ -108,7 +110,7 @@ fun EmailSignUpFields( Column( modifier = Modifier .fillMaxWidth() - .height(300.dp), + .verticalScroll(rememberScrollState()), verticalArrangement = Arrangement.spacedBy(25.dp), horizontalAlignment = Alignment.CenterHorizontally ) { From e131e83fec3561de278bac972b4d6a5de610ed27 Mon Sep 17 00:00:00 2001 From: Satindar Dhillon Date: Sun, 11 Sep 2022 21:42:36 -0700 Subject: [PATCH 35/39] add spacing between clickable text --- .../omnivore/omnivore/ui/auth/EmailLogin.kt | 40 +++++++++++++------ .../omnivore/ui/auth/EmailSignUpView.kt | 28 +++++++------ .../omnivore/ui/auth/LoginViewModel.kt | 4 ++ 3 files changed, 48 insertions(+), 24 deletions(-) diff --git a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/EmailLogin.kt b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/EmailLogin.kt index 09c2ff8d2..22a4a3ba5 100644 --- a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/EmailLogin.kt +++ b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/EmailLogin.kt @@ -1,6 +1,10 @@ package app.omnivore.omnivore.ui.auth import android.annotation.SuppressLint +import android.view.ViewGroup +import android.webkit.CookieManager +import android.webkit.WebView +import android.webkit.WebViewClient import android.widget.Toast import androidx.compose.foundation.layout.* import androidx.compose.foundation.text.ClickableText @@ -21,6 +25,7 @@ import androidx.compose.ui.text.input.ImeAction import androidx.compose.ui.text.input.PasswordVisualTransformation import androidx.compose.ui.text.style.TextDecoration import androidx.compose.ui.unit.dp +import androidx.compose.ui.viewinterop.AndroidView @SuppressLint("CoroutineCreationDuringComposition") @Composable @@ -49,19 +54,30 @@ fun EmailLoginView(viewModel: LoginViewModel) { Text("Loading...") } - ClickableText( - text = AnnotatedString("Return to Social Login"), - style = MaterialTheme.typography.titleMedium - .plus(TextStyle(textDecoration = TextDecoration.Underline)), - onClick = { viewModel.showSocialLogin() } - ) + Column( + verticalArrangement = Arrangement.spacedBy(12.dp) + ) { + ClickableText( + text = AnnotatedString("Return to Social Login"), + style = MaterialTheme.typography.titleMedium + .plus(TextStyle(textDecoration = TextDecoration.Underline)), + onClick = { viewModel.showSocialLogin() } + ) - ClickableText( - text = AnnotatedString("Don't have an account?"), - style = MaterialTheme.typography.titleMedium - .plus(TextStyle(textDecoration = TextDecoration.Underline)), - onClick = { viewModel.showEmailSignUp() } - ) + ClickableText( + text = AnnotatedString("Don't have an account?"), + style = MaterialTheme.typography.titleMedium + .plus(TextStyle(textDecoration = TextDecoration.Underline)), + onClick = { viewModel.showEmailSignUp() } + ) + + ClickableText( + text = AnnotatedString("Forgot your password?"), + style = MaterialTheme.typography.titleMedium + .plus(TextStyle(textDecoration = TextDecoration.Underline)), + onClick = { viewModel.showForgotPasswordView() } + ) + } } Spacer(modifier = Modifier.weight(1.0F)) } diff --git a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/EmailSignUpView.kt b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/EmailSignUpView.kt index 43cb3d973..404ff791c 100644 --- a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/EmailSignUpView.kt +++ b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/EmailSignUpView.kt @@ -71,19 +71,23 @@ fun EmailSignUpView(viewModel: LoginViewModel) { Text("Loading...") } - ClickableText( - text = AnnotatedString("Return to Social Login"), - style = MaterialTheme.typography.titleMedium - .plus(TextStyle(textDecoration = TextDecoration.Underline)), - onClick = { viewModel.showSocialLogin() } - ) + Column( + verticalArrangement = Arrangement.spacedBy(12.dp) + ) { + ClickableText( + text = AnnotatedString("Return to Social Login"), + style = MaterialTheme.typography.titleMedium + .plus(TextStyle(textDecoration = TextDecoration.Underline)), + onClick = { viewModel.showSocialLogin() } + ) - ClickableText( - text = AnnotatedString("Already have an account?"), - style = MaterialTheme.typography.titleMedium - .plus(TextStyle(textDecoration = TextDecoration.Underline)), - onClick = { viewModel.showEmailSignIn() } - ) + ClickableText( + text = AnnotatedString("Already have an account?"), + style = MaterialTheme.typography.titleMedium + .plus(TextStyle(textDecoration = TextDecoration.Underline)), + onClick = { viewModel.showEmailSignIn() } + ) + } } Spacer(modifier = Modifier.weight(1.0F)) } diff --git a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/LoginViewModel.kt b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/LoginViewModel.kt index 117d06432..cfb84ceab 100644 --- a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/LoginViewModel.kt +++ b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/LoginViewModel.kt @@ -69,6 +69,10 @@ class LoginViewModel @Inject constructor( registrationStateLiveData.value = RegistrationState.EmailSignUp } + fun showForgotPasswordView() { + // TODO: show webview + } + fun cancelNewUserSignUp() { viewModelScope.launch { datastoreRepo.clearValue(DatastoreKeys.omnivorePendingUserToken) From ae72de90d142c29bcb05688d6856be430767989e Mon Sep 17 00:00:00 2001 From: Satindar Dhillon Date: Thu, 15 Sep 2022 21:12:13 -0700 Subject: [PATCH 36/39] open forgot password link in chrome when user taps button --- .../main/java/app/omnivore/omnivore/ui/auth/EmailLogin.kt | 8 +++++++- .../java/app/omnivore/omnivore/ui/auth/LoginViewModel.kt | 4 ---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/EmailLogin.kt b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/EmailLogin.kt index 22a4a3ba5..bc3c1056a 100644 --- a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/EmailLogin.kt +++ b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/EmailLogin.kt @@ -19,6 +19,7 @@ import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.RectangleShape import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.platform.LocalFocusManager +import androidx.compose.ui.platform.LocalUriHandler import androidx.compose.ui.text.AnnotatedString import androidx.compose.ui.text.TextStyle import androidx.compose.ui.text.input.ImeAction @@ -26,10 +27,12 @@ import androidx.compose.ui.text.input.PasswordVisualTransformation import androidx.compose.ui.text.style.TextDecoration import androidx.compose.ui.unit.dp import androidx.compose.ui.viewinterop.AndroidView +import app.omnivore.omnivore.BuildConfig @SuppressLint("CoroutineCreationDuringComposition") @Composable fun EmailLoginView(viewModel: LoginViewModel) { + val uriHandler = LocalUriHandler.current var email by rememberSaveable { mutableStateOf("") } var password by rememberSaveable { mutableStateOf("") } @@ -75,7 +78,10 @@ fun EmailLoginView(viewModel: LoginViewModel) { text = AnnotatedString("Forgot your password?"), style = MaterialTheme.typography.titleMedium .plus(TextStyle(textDecoration = TextDecoration.Underline)), - onClick = { viewModel.showForgotPasswordView() } + onClick = { + val uri = "${BuildConfig.OMNIVORE_WEB_URL}/auth/forgot-password" + uriHandler.openUri(uri) + } ) } } diff --git a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/LoginViewModel.kt b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/LoginViewModel.kt index cfb84ceab..117d06432 100644 --- a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/LoginViewModel.kt +++ b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/LoginViewModel.kt @@ -69,10 +69,6 @@ class LoginViewModel @Inject constructor( registrationStateLiveData.value = RegistrationState.EmailSignUp } - fun showForgotPasswordView() { - // TODO: show webview - } - fun cancelNewUserSignUp() { viewModelScope.launch { datastoreRepo.clearValue(DatastoreKeys.omnivorePendingUserToken) From 85cbe5ac33fd6c051743d55cb5834d96ed3c8945 Mon Sep 17 00:00:00 2001 From: Satindar Dhillon Date: Thu, 15 Sep 2022 22:12:46 -0700 Subject: [PATCH 37/39] handle email accounts that need verification --- .../app/omnivore/omnivore/RESTNetworker.kt | 13 +++++ .../omnivore/ui/auth/EmailSignUpView.kt | 49 +++++++++++++++++- .../omnivore/ui/auth/LoginViewModel.kt | 51 +++++++++++++++++-- 3 files changed, 109 insertions(+), 4 deletions(-) diff --git a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/RESTNetworker.kt b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/RESTNetworker.kt index bf58a49d4..11be50365 100644 --- a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/RESTNetworker.kt +++ b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/RESTNetworker.kt @@ -22,6 +22,13 @@ data class SignInParams( val source: String = "ANDROID" ) +data class EmailSignUpParams( + val email: String, + val password: String, + val username: String, + val name: String +) + data class EmailAuthPayload( val authCookieString: String?, val authToken: String?, @@ -67,6 +74,12 @@ interface CreateAccountSubmit { suspend fun submitCreateAccount(@Body params: CreateAccountParams): Response } +interface CreateEmailAccountSubmit { + @Headers("Content-Type: application/json") + @POST("/api/mobile-auth/email-sign-up") + suspend fun submitCreateEmailAccount(@Body params: EmailSignUpParams): Response +} + object RetrofitHelper { fun getInstance(): Retrofit { return Retrofit.Builder().baseUrl(Constants.apiURL) diff --git a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/EmailSignUpView.kt b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/EmailSignUpView.kt index 404ff791c..e9b486184 100644 --- a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/EmailSignUpView.kt +++ b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/EmailSignUpView.kt @@ -26,9 +26,56 @@ import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.text.style.TextDecoration import androidx.compose.ui.unit.dp -@SuppressLint("CoroutineCreationDuringComposition") @Composable fun EmailSignUpView(viewModel: LoginViewModel) { + if (viewModel.pendingEmailUserCreds != null) { + val email = viewModel.pendingEmailUserCreds?.email ?: "" + val password = viewModel.pendingEmailUserCreds?.password ?: "" + + val verificationMessage = "We've sent a verification email to ${email}. Please verify your email and then tap the button below." + + Row( + horizontalArrangement = Arrangement.Center + ) { + Spacer(modifier = Modifier.weight(1.0F)) + Column( + verticalArrangement = Arrangement.Center, + horizontalAlignment = Alignment.CenterHorizontally + ) { + Text( + text = verificationMessage, + style = MaterialTheme.typography.titleMedium + ) + + Button(onClick = { + viewModel.login(email, password) + }, colors = ButtonDefaults.buttonColors( + contentColor = Color(0xFF3D3D3D), + containerColor = Color(0xffffd234) + ) + ) { + Text( + text = "Check Status", + modifier = Modifier.padding(horizontal = 100.dp) + ) + } + + ClickableText( + text = AnnotatedString("Use a different email?"), + style = MaterialTheme.typography.titleMedium + .plus(TextStyle(textDecoration = TextDecoration.Underline)), + onClick = { viewModel.showEmailSignUp() } + ) + } + } + } else { + EmailSignUpForm(viewModel = viewModel) + } +} + +@SuppressLint("CoroutineCreationDuringComposition") +@Composable +fun EmailSignUpForm(viewModel: LoginViewModel) { var email by rememberSaveable { mutableStateOf("") } var password by rememberSaveable { mutableStateOf("") } var name by rememberSaveable { mutableStateOf("") } diff --git a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/LoginViewModel.kt b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/LoginViewModel.kt index 117d06432..ae058da27 100644 --- a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/LoginViewModel.kt +++ b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/ui/auth/LoginViewModel.kt @@ -4,6 +4,7 @@ import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.setValue import androidx.lifecycle.* +import androidx.lifecycle.viewmodel.compose.viewModel import app.omnivore.omnivore.* import app.omnivore.omnivore.graphql.generated.SearchQuery import app.omnivore.omnivore.graphql.generated.ValidateUsernameQuery @@ -28,6 +29,11 @@ enum class RegistrationState { PendingUser } +data class PendingEmailUserCreds( + val email: String, + val password: String +) + @HiltViewModel class LoginViewModel @Inject constructor( private val datastoreRepo: DatastoreRepository @@ -46,6 +52,9 @@ class LoginViewModel @Inject constructor( var usernameValidationErrorMessage by mutableStateOf(null) private set + var pendingEmailUserCreds by mutableStateOf(null) + private set + val hasAuthTokenLiveData: LiveData = datastoreRepo .hasAuthTokenFlow .distinctUntilChanged() @@ -58,24 +67,38 @@ class LoginViewModel @Inject constructor( } fun showSocialLogin() { + resetState() registrationStateLiveData.value = RegistrationState.SocialLogin } fun showEmailSignIn() { + resetState() registrationStateLiveData.value = RegistrationState.EmailSignIn } - fun showEmailSignUp() { + fun showEmailSignUp(pendingCreds: PendingEmailUserCreds? = null) { + resetState() + pendingEmailUserCreds = pendingCreds registrationStateLiveData.value = RegistrationState.EmailSignUp } fun cancelNewUserSignUp() { + resetState() viewModelScope.launch { datastoreRepo.clearValue(DatastoreKeys.omnivorePendingUserToken) } showSocialLogin() } + private fun resetState() { + validateUsernameJob = null + isLoading = false + errorMessage = null + hasValidUsername = false + usernameValidationErrorMessage = null + pendingEmailUserCreds = null + } + fun validateUsername(potentialUsername: String) { validateUsernameJob?.cancel() @@ -137,7 +160,7 @@ class LoginViewModel @Inject constructor( isLoading = false if (result.body()?.pendingEmailVerification == true) { - errorMessage = "Email needs verification" + showEmailSignUp(pendingCreds = PendingEmailUserCreds(email = email, password = password)) return@launch } @@ -161,7 +184,29 @@ class LoginViewModel @Inject constructor( username: String, name: String, ) { - // TODO: make network call + viewModelScope.launch { + val request = RetrofitHelper.getInstance().create(CreateEmailAccountSubmit::class.java) + + isLoading = true + errorMessage = null + + val params = EmailSignUpParams( + email = email, + password = password, + name = name, + username = username + ) + + val result = request.submitCreateEmailAccount(params) + + isLoading = false + + if (result.errorBody() != null) { + errorMessage = "Something went wrong. Please check your and try again" + } else { + pendingEmailUserCreds = PendingEmailUserCreds(email, password) + } + } } private fun getPendingAuthToken(): String? = runBlocking { From d3099e8611d28d14e5e169c44c1aa8f6ed65b765 Mon Sep 17 00:00:00 2001 From: Jackson Harper Date: Fri, 16 Sep 2022 16:10:35 +0800 Subject: [PATCH 38/39] Update to handle iOS16 menus On iOS16 the way context menus are built is slightly changed, this was causing "Look up" to be removed from our menu. --- .../Views/Article/OmnivoreWebView.swift | 58 ++++++++++++++++--- 1 file changed, 50 insertions(+), 8 deletions(-) diff --git a/apple/OmnivoreKit/Sources/Views/Article/OmnivoreWebView.swift b/apple/OmnivoreKit/Sources/Views/Article/OmnivoreWebView.swift index ef2d8905d..cbce256c2 100644 --- a/apple/OmnivoreKit/Sources/Views/Article/OmnivoreWebView.swift +++ b/apple/OmnivoreKit/Sources/Views/Article/OmnivoreWebView.swift @@ -8,12 +8,19 @@ public enum WebViewAction: String, CaseIterable { case readingProgressUpdate } +enum ContextMenu { + case defaultMenu + case highlightMenu +} + public final class OmnivoreWebView: WKWebView { #if os(iOS) private var panGestureRecognizer: UIPanGestureRecognizer? private var tapGestureRecognizer: UITapGestureRecognizer? #endif + private var currentMenu: ContextMenu = .defaultMenu + override init(frame: CGRect, configuration: WKWebViewConfiguration) { super.init(frame: frame, configuration: configuration) @@ -21,6 +28,10 @@ public final class OmnivoreWebView: WKWebView { initNativeIOSMenus() #endif + if #available(iOS 16.0, *) { + self.isFindInteractionEnabled = true + } + NotificationCenter.default.addObserver(forName: NSNotification.Name("SpeakingReaderItem"), object: nil, queue: OperationQueue.main, using: { notification in if let pageID = notification.userInfo?["pageID"] as? String, let anchorIdx = notification.userInfo?["anchorIdx"] as? String { self.dispatchEvent(.speakingSection(anchorIdx: anchorIdx)) @@ -132,19 +143,33 @@ public final class OmnivoreWebView: WKWebView { } private func setDefaultMenu() { - let annotate = UIMenuItem(title: "Annotate", action: #selector(annotateSelection)) - let highlight = UIMenuItem(title: "Highlight", action: #selector(highlightSelection)) - // let share = UIMenuItem(title: "Share", action: #selector(shareSelection)) + currentMenu = .defaultMenu - UIMenuController.shared.menuItems = [highlight, /* share, */ annotate] + if #available(iOS 16.0, *) { + // on iOS16 we use menuBuilder to create these items + } else { + let annotate = UIMenuItem(title: "Annotate", action: #selector(annotateSelection)) + let highlight = UIMenuItem(title: "Highlight", action: #selector(highlightSelection)) + // let share = UIMenuItem(title: "Share", action: #selector(shareSelection)) + + UIMenuController.shared.menuItems = [highlight, /* share, */ annotate] + } } private func setHighlightMenu() { - let annotate = UIMenuItem(title: "Annotate", action: #selector(annotateSelection)) - let remove = UIMenuItem(title: "Remove", action: #selector(removeSelection)) - // let share = UIMenuItem(title: "Share", action: #selector(shareSelection)) + currentMenu = .highlightMenu - UIMenuController.shared.menuItems = [remove, /* share, */ annotate] + if #available(iOS 16.0, *) { + // on iOS16 we use menuBuilder to create these items + } else { + // on iOS16 we use menuBuilder to create these items + currentMenu = .defaultMenu + let annotate = UIMenuItem(title: "Annotate", action: #selector(annotateSelection)) + let remove = UIMenuItem(title: "Remove", action: #selector(removeSelection)) + // let share = UIMenuItem(title: "Share", action: #selector(shareSelection)) + + UIMenuController.shared.menuItems = [remove, /* share, */ annotate] + } } override public var canBecomeFirstResponder: Bool { @@ -168,6 +193,8 @@ public final class OmnivoreWebView: WKWebView { case #selector(removeSelection): return true case #selector(copy(_:)): return true case Selector(("_lookup:")): return true + case Selector(("_define:")): return true + case Selector(("_findSelected:")): return true default: return false } } @@ -202,6 +229,21 @@ public final class OmnivoreWebView: WKWebView { hideMenu() } + override public func buildMenu(with builder: UIMenuBuilder) { + if #available(iOS 16.0, *) { + let annotate = UICommand(title: "Note", action: #selector(annotateSelection)) + let highlight = UICommand(title: "Highlight", action: #selector(highlightSelection)) + let remove = UICommand(title: "Remove", action: #selector(removeSelection)) + + let omnivore = UIMenu(title: "", + options: .displayInline, + children: currentMenu == .defaultMenu ? [highlight, annotate] : [annotate, remove]) + builder.insertSibling(omnivore, beforeMenu: .lookup) + } + + super.buildMenu(with: builder) + } + private func hideMenu() { UIMenuController.shared.hideMenu() if let tapGestureRecognizer = tapGestureRecognizer { From 37beb3f9c920fa59799e1d85f96de35a6e84adf6 Mon Sep 17 00:00:00 2001 From: Jackson Harper Date: Fri, 16 Sep 2022 16:29:50 +0800 Subject: [PATCH 39/39] Add a little padding between title/author --- apple/OmnivoreKit/Sources/Views/FeedItem/HomeFeedCardView.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/apple/OmnivoreKit/Sources/Views/FeedItem/HomeFeedCardView.swift b/apple/OmnivoreKit/Sources/Views/FeedItem/HomeFeedCardView.swift index 21b509c10..1ff78a853 100644 --- a/apple/OmnivoreKit/Sources/Views/FeedItem/HomeFeedCardView.swift +++ b/apple/OmnivoreKit/Sources/Views/FeedItem/HomeFeedCardView.swift @@ -18,6 +18,7 @@ public struct FeedCard: View { .lineSpacing(1.25) .foregroundColor(.appGrayTextContrast) .fixedSize(horizontal: false, vertical: true) + .padding(EdgeInsets(top: 0, leading: 0, bottom: 2, trailing: 0)) if let author = item.author { Text("By \(author)")
- + + +
+
-

- WHAT ELSE IS BREWING

+

+ TOGETHER WITH FACET WEALTH +

+

+ + + Money on everyone’s mind + + +

- +
- + +
+ +

In our current economic state, there’s a lot of attention on money—how much it’s worth, how much we pay in interest, inflation, the list goes on.

+

And if all that news has stirred up questions like, “Am I doing the right things with my money so that I can get the most out of life?” Facet can help.

+

Their CERTIFIED FINANCIAL PLANNER™ professionals work with you 1:1 for an affordable fixed fee to answer questions about your entire financial life, not just basic money management. Plus, their proprietary tech helps you get the full picture of where you’re at financially and where you’re going.

+

Brew readers get 2 free* months in their first year of financial planning. Sign up here.

+ + + + + +
+ + + + + + + + + +
+ +
+
+ + + + + + +
+ + + + + +
+ + + + +
+

+ WORLD +

+

+ + + Tour de headlines + + +

+
+ President Biden + Mandel Ngan/Getty Images + + + + +
+
+

Biden goes for a “moonshot” on cancer. Referencing JFK’s famous speech on its 60th anniversary, President Biden said yesterday he’s laying out his “moonshot” for eradicating cancer. The plan involves a new department focused on health and biomedical research, executive orders beefing up domestic biomanufacturing, and a government group called the “Cancer Cabinet.” In hopeful news that might help move things along, drugmaker Amgen reported its new cancer drug was more effective in some areas than chemo for late-stage lung cancer patients.

+

Goldman Sachs to lay off hundreds. The bank plans to reinstate annual employee culls, which it had suspended during the pandemic, and may start cutting jobs as soon as next week. Typically, Goldman targets between 1% and 5% of its workforce for layoffs each year, and this round is expected to be at the lower end of the spectrum (current headcount: 47,000). The expected layoffs come after Goldman’s profits fell by nearly half in the second quarter compared to the year before as deal-making slowed.

+

15,000 nurses walked off the job in Minnesota. The nurses involved in the largest-ever private sector nursing strike in the US plan to stay out for three days to demand fixes for understaffing, as well as higher pay. Though this strike targets 13 hospitals in the Minneapolis–St. Paul area, facilities across the country had trouble finding enough nurses even before the pandemic. Unions in at least two other states have also authorized work stoppages in the past month.

+
+
+
+ +
+ + + + +
+ + + + + +
+ + + + +
+

+ EDUCATION +

+

+ + The list that no one likes is out + +

+
+ + Students walking on campus in the fall. + Jon Lovette/Getty Images + + + + +
+
+

US News & World Report released its yearly ranking of the best colleges in the country yesterday. But this year’s list comes amid a growing number of complaints about how the scores that mean a lot to wide-eyed future loan borrowers (and the administrators who will eventually ask them for money) are calculated.

+

Besides controversial criteria like incoming students’ SAT scores and the level of alumni donations, one of the main problems critics have with the list is that it attributes 20% of its ranking formula to what amounts to basically a popularity contest. US News sends a yearly survey to college admins asking them to rate other schools’ “academic quality.”

+

Even Education Secretary Miguel Cardona, although not referring to the US News list directly, said last month that college rankings that value reputation above things like economic mobility are “a joke.”

+

There’s even more drama this year…Columbia University dropped from No. 2 to No. 18 because it didn’t submit any data while it investigated a math professor’s claims that the school might be fudging some numbers. On Friday, the university admitted to the fudging.

+

Final fun fact: 19 of the top 20 schools on this year’s list cost $55,000+ per year to attend.—MM

+
+ + + + + +
+ + + + + + + + + + + + +
+ +
+
+ +
+ + + + +
+ + + + + +
+ + + + +
+

+ FOOD & BEVERAGE +

+

+ Starbucks puts the ‘mint’ in peppermint + +

+
+ + A girl drinks from a Starbucks cup while looking at her phone + Zhang Peng/Getty Images + + + + +
+
+

The Starbucks customer loyalty program inspires more devotion than the Mocha Joe’s punch card that always gets lost in your wallet. Now the coffee chain is trying to spark even more loyalty by taking its app-based program to the next technological level with NFTs.

+

The company unveiled its Starbucks Odyssey program yesterday, a platform using Polygon, an Ethereum network, that coffee drinkers can log into with their existing program credentials to play games or take challenges to earn non-fungible tokens. They’ll also be available for purchase via credit card, no crypto necessary.

+

These NFTs, called “journey stamps,” will unlock rewards for users that go beyond the typical free coffee, like events or trips.

+

Customers can join a waitlist now, but only time will tell whether people will be clambering for coffee-themed digital art. The project is a relatively recent one—an exec told TechCrunch it’s only been in the works for six months, but in that time the market for NFTs has changed drastically. Trading volume at OpenSea, the most popular NFT marketplace, plunged 99% from early May to late August, per Fortune.

+

Zoom out: The Web3 push is one of many big changes coming to Starbucks. A new leader will succeed interim CEO Howard Schultz, but not before Schultz lays out a new strategy at today’s investor day that’s aimed at boosting efficiency.—AR

+
+ + + + + +
+ + + + + + + + + + + + +
+ +
+
+ +
+ + + + +
+ + + + + +
+ + + + +
+

+ GRAB BAG +

+

+ + + Key performance indicators + + +

+
+ A phone with an Instagram Reels icon and a 0 views notification + Francis Scialabba + + + + +
+
+

Stat: People spend 17.6 million hours a day watching Instagram Reels, just a fraction of the 197.8 million hours users waste daily on TikTok, according to an internal Meta document viewed by the Wall Street Journal. While Reels might seem inescapable in your feed, engagement is trending down, dropping 13.6% in August from the month before, the document showed.

+

Quote: “Nothing can justify the persistence of this fundamental abuse of human rights.”

+

The director-general of the UN’s labor standards agency yesterday called for an “all-hands-on-deck approach” to combating modern slavery after releasing a report that found 50 million people were living in modern slavery—28 million in forced labor and 22 million in forced marriages in 2021. That’s 10 million more than in 2016.

+

Read: Johnson & Johnson and a new war on consumer protection. (The New Yorker)

+
+
+
+ +
+ + + + +
+ + + + + +
+ + + + +
+

+ SPONSORED BY ACCRUE X VINCERO +

+
+ + Accrue X Vincero + + + + + +
+

Style meets savings. With Accrue Savings, you can earn cash rewards from brands like Vincero by saving up for your purchases without relying on credit. Elevate your everyday carry with Vincero’s ethically crafted, premium lifestyle accessories and earn 15% in cash rewards toward your purchase when you save up for your Vincero accessories with an Accrue Savings account. Sign up here in just a few minutes today.

+ + + + + +
+ + + + + + + + + +
+ +
+
+ +
+ + + + +
+ + + +
+ + + + +
+

+ WHAT ELSE IS BREWING +

+
+ + + @@ -1431,74 +792,34 @@
    -
  • Ukraine - took back territory from Russia all the way to its - northeastern border in some areas, leading one former member - of Russia’s parliament to call for peace talks on live - TV.
  • -
  • Streaming - services had a good night at the Emmys, - with HBO Max’s Succession - winning best drama and The White - Lotus nabbing the statue for best - limited series. The Apple TV+ series Ted - Lasso took the top prize for a comedy - series.
  • -
  • Twitter - whistleblower Peiter “Mudge” Zatko will - testify today before the Senate Judiciary Committee about - the platform’s privacy and security vulnerabilities. +
  • + Ukraine took back territory from Russia all the way to its northeastern border in some areas, leading one former member of Russia’s parliament to call for peace talks on live TV. +
  • +
  • + Streaming services had a good night at the Emmys, with HBO Max’s Succession winning best drama and The White Lotus nabbing the statue for best limited series. The Apple TV+ series Ted Lasso took the top prize for a comedy series. +
  • +
  • + Twitter whistleblower Peiter “Mudge” Zatko will testify today before the Senate Judiciary Committee about the platform’s privacy and security vulnerabilities. +
  • +
  • + Elon Musk’s college girlfriend is auctioning off mementos she saved from the relationship, including photos and a signed birthday card.
  • -
  • Elon - Musk’s college girlfriend is auctioning - off mementos she saved from the relationship, including - photos and a signed birthday card.
- + +
- +
-
- +
+
-

- BREW'S BETS

+

+ BREW'S BETS +

- +
- @@ -1507,66 +828,45 @@
+
-

Taking back texts: A complete guide - to Apple’s new operating system, which lets you personalize your - lock screen and a lot more.

-

Sleight of hand: Watch - the reigning world champion of card magic (a real title) do his - thing.

-

Interesting pod alert: After - years on a personal odyssey, journalist Lauren Ober found out - she was autistic. The Loudest Girl in the World shares - Lauren’s journey once she was diagnosed. Listen - now.

+

Taking back texts: A complete guide to Apple’s new operating system, which lets you personalize your lock screen and a lot more.

+

Sleight of hand: Watch the reigning world champion of card magic (a real title) do his thing.

+

Interesting pod alert: After years on a personal odyssey, journalist Lauren Ober found out she was autistic. The Loudest Girl in the World shares Lauren’s journey once she was diagnosed. Listen now.

-

Just like ⌘C, ⌘V: With CopyTrader,™ eToro’s most - popular feature, you can automatically copy the moves of real - investors in real time. No more second-guessing your crypto - decisions. Get - started today.*

- - -

- *This is sponsored advertising content.

+

Just like ⌘C, ⌘V: With CopyTrader,™ eToro’s most popular feature, you can automatically copy the moves of real investors in real time. No more second-guessing your crypto decisions. Get started today.*

*This is sponsored advertising content.

- + +
- +
-
- +
+
-

- GAMES

-

- - The puzzle section -

+

+ GAMES +

+

+ + + The puzzle section + + +

- +
- @@ -1576,81 +876,42 @@
+
-

Brew Mini: If you know what kind - of car James Bond drives, you’re more than 10% of the way to - completing today’s Mini. Solve - it here.

-

- Tagline trivia

-

There’s - nothing cringier than a movie tagline. We’ll give you the - tagline for a film, and you have to name the film.

+

Brew Mini: If you know what kind of car James Bond drives, you’re more than 10% of the way to completing today’s Mini. Solve it here.

+

Tagline trivia

+

There’s nothing cringier than a movie tagline. We’ll give you the tagline for a film, and you have to name the film.

    -
  1. “Midnight - never strikes when you’re in love.”
  2. -
  3. “Work - sucks.”
  4. -
  5. “You don’t - get to 500 million friends without making a few - enemies.”
  6. -
  7. “The - longer you wait, the harder it gets.”
  8. -
  9. “A comedy - of trial and error.”
  10. +
  11. “Midnight never strikes when you’re in love.”
  12. +
  13. “Work sucks.”
  14. +
  15. “You don’t get to 500 million friends without making a few enemies.”
  16. +
  17. “The longer you wait, the harder it gets.”
  18. +
  19. “A comedy of trial and error.”
- + +
- +
- - -
-

- - Morning Brew - -

-
-
-

Good morning. Apple’s iOS 16 dropped for iPhone users yesterday, and once you download the software update you’ll be able to edit an iMessage within 15 minutes of sending it and delete one within two minutes. While that may be useful for most people, the only text we’ve ever regretted sending was, “Sure I’ll go to your friend’s improv show.”

-

Max Knoblauch, Abby Rubenstein, Matty Merritt

+
+
+ + @@ -49,13 +51,17 @@ -
+
+ + + +
@@ -75,9 +81,6 @@

12,266.41

- +
+ -
-

+

-

- - How to save money in a recession -

+

+ + + How to save money in a recession + + +

How to save money in a recession - - +
+ + How to save money in a recession + + @@ -1659,66 +920,42 @@
-

Saving - at any point can be a challenge. Saving during an economic - downturn? Mission impossible. But Anish Mitra uses his knowledge - from 10 years on Wall Street to teach you how saving amid - slowing economic growth doesn't have to be difficult. Watch - here.

-

Check out more from the Brew: -

-

On Business - Casual: Nora chats with Alex Ma, the CEO and co-founder - of Poparazzi, an app that allows you to build your friends’ - profile pages instead of your own. Listen - or watch - here.

-

Ready to jumpstart - your career but don’t know where to start? We’ve got you - covered. Take - our short quiz and find out which Morning Brew - Accelerator is right for you.

+

Saving at any point can be a challenge. Saving during an economic downturn? Mission impossible. But Anish Mitra uses his knowledge from 10 years on Wall Street to teach you how saving amid slowing economic growth doesn't have to be difficult. Watch here.

+

Check out more from the Brew:

+

On Business Casual: Nora chats with Alex Ma, the CEO and co-founder of Poparazzi, an app that allows you to build your friends’ profile pages instead of your own. Listen or watch here.

+

Ready to jumpstart your career but don’t know where to start? We’ve got you covered. Take our short quiz and find out which Morning Brew Accelerator is right for you.

- + +
- +
- \ No newline at end of file diff --git a/packages/readabilityjs/test/test-pages/newsletters/morning-brew/source.html b/packages/readabilityjs/test/test-pages/newsletters/morning-brew/source.html index d48dfeefd..b681eea7e 100644 --- a/packages/readabilityjs/test/test-pages/newsletters/morning-brew/source.html +++ b/packages/readabilityjs/test/test-pages/newsletters/morning-brew/source.html @@ -1,1146 +1,1147 @@ - - - - - Daily Brew // Morning Brew // Update - - - -
- +
+
-

- SHARE THE BREW

+

+ SHARE THE BREW +

- +
-
-

- Share - Morning Brew with your friends, acquire free Brew swag, and - then acquire more friends as a result of your fresh Brew swag.

-

- We’re saying we’ll give you free stuff and more friends if you share - a link. One link.

-

- +

+

+ Share Morning Brew with your friends, acquire free Brew swag, and then acquire more friends as a result of your fresh Brew swag.

- -

- Your referral count: 0

Click - to Share -

- Or copy & paste your referral link to others:
morningbrew.com/daily/r/?kid=72b509de +

+ We’re saying we’ll give you free stuff and more friends if you share a link. One link.

+ +

+ +

+
+

Your referral count: 0

+ Click to Share +

Or copy & paste your referral link to others:
morningbrew.com/daily/r/?kid=72b509de

@@ -1726,50 +963,40 @@
- + +
- +
-
- +
+
-

+

-

- - Answer -

+

+ + + Answer + + +

- +
- @@ -1779,191 +1006,141 @@
+
-

1. - Cinderella

-

2. - Office Space

-

3. - The Social Network

-

4. - The 40-Year-Old Virgin

-

5. - My Cousin Vinny

+

1. Cinderella

+

2. Office Space

+

3. The Social Network

+

4. The 40-Year-Old Virgin

+

5. My Cousin Vinny


- + + - -
- - - - - -
- - - - -
-

- ✢ A Note From Facet Wealth

-

- Facet Wealth is an SEC Registered Investment Advisor headquartered - in Baltimore, Maryland. This is not an offer to sell securities or - the solicitation of an offer to purchase securities. This is not - investment, financial, legal, or tax advice.

-

- *Two months free offer is only valid for an annual fee paid at the - time of signing.

-
-
- -
- - +
+ +
- + -
- - - + + + + +
+

✢ A Note From Facet Wealth

+

Facet Wealth is an SEC Registered Investment Advisor headquartered in Baltimore, Maryland. This is not an offer to sell securities or the solicitation of an offer to purchase securities. This is not investment, financial, legal, or tax advice.

+

*Two months free offer is only valid for an annual fee paid at the time of signing.

+
+
- +
+ + + - + +
-

Written by Abigail - Rubenstein, Max - Knoblauch, and Matty - Merritt

-

Was this email forwarded to - you? Sign up here. +

+ + + + + + + + + + + + +
+ + + + - + -
+

+ Written by + Abigail Rubenstein, Max Knoblauch, and Matty Merritt +

+

+ Was this email forwarded to you? Sign up + here.

-

WANT MORE BREW?

+

+ WANT MORE BREW? +

- Tips for smarter living →

+ +Tips for smarter living → + +

    -
  • Money - Scoop: your personal finance upgrade
  • -
  • Sidekick: - lifestyle recs from every corner of the internet
  • +
  • + Money Scoop: your personal finance upgrade + +
  • +
  • + Sidekick: lifestyle recs from every corner of the internet + +
-

- YouTube -

+

+ + + YouTube + +

- Accelerate Your Career with our Courses → -

+ +Accelerate Your Career with our Courses → + +

- ADVERTISE - // CAREERS - // SHOP // - FAQ
-
Update your email preferences or unsubscribe here.
View our privacy policy here.

Copyright © 2022 Morning Brew. All rights - reserved.
22 W 19th St, 4th Floor, New York, NY 10011
+ ADVERTISE + // + CAREERS + // + SHOP + // + FAQ +
+
+ Update your email preferences or unsubscribe + here. +
+ View our privacy policy + here. +
+
+ Copyright © + 2022 + Morning Brew. All rights reserved. +
+ 22 W 19th St, 4th Floor, New York, NY 10011 +
+
+ - +
- From 1563ef9131e954bab32af8d5c19ad35c0d56f73e Mon Sep 17 00:00:00 2001 From: Hongbo Wu Date: Wed, 14 Sep 2022 15:56:49 +0800 Subject: [PATCH 07/39] replace tables whose role is not presentation with divs for newsletters --- packages/readabilityjs/Readability.js | 4 +- .../newsletters/morning-brew/expected.html | 1140 ++++---- .../newsletters/morning-brew/source.html | 2285 +++++++++-------- 3 files changed, 1715 insertions(+), 1714 deletions(-) diff --git a/packages/readabilityjs/Readability.js b/packages/readabilityjs/Readability.js index 521983738..c882451d1 100644 --- a/packages/readabilityjs/Readability.js +++ b/packages/readabilityjs/Readability.js @@ -918,8 +918,8 @@ Readability.prototype = { } }); - // replace tables of article content with divs for newsletters - this._keepTables && this._replaceNodeTags(this._getAllNodesWithTag(articleContent, ["table"]), "div"); + // replace tables whose role is not presentation with divs for newsletters + this._keepTables && this._replaceNodeTags(this._getAllNodesWithTag(articleContent, ["table"]).filter(t => t.getAttribute("role") !== "presentation"), "div"); // Final clean up of nodes that might pass readability conditions but still contain redundant text // For example, this article (https://www.sciencedirect.com/science/article/abs/pii/S0047248498902196) diff --git a/packages/readabilityjs/test/test-pages/newsletters/morning-brew/expected.html b/packages/readabilityjs/test/test-pages/newsletters/morning-brew/expected.html index a9e1d8670..2db2e09f0 100644 --- a/packages/readabilityjs/test/test-pages/newsletters/morning-brew/expected.html +++ b/packages/readabilityjs/test/test-pages/newsletters/morning-brew/expected.html @@ -2,10 +2,10 @@
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + + + + +
- - - - - + + + + + + +
+
+ + + + + + + +
+
+ + + + + + + +
+
+ + + + + + + +
+
+ + + + + + + +
+
+ + + + + + + + + + + +
+
+ + + + + + + +
+
+ + + + + + + +
+
+ + + + + + + +
+
+ + + + + + + + + + + +
+
+ + + + + + + +
+
+ + + + +

+ + + + + + + + + + + + +

+ +
+
+ + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
- - - - - - - -
-
- - - - - - - -
-
- - - - - - - -
-
- - - - - - - -
-
- - - - - - - - - - - -
-
- - - - - - - -
-
- - - - - - - -
-
- - - - - - - -
-
- - - - - - - - - - - -
-
- - - - - - - -
-
- - - - -

- - - - - - - - - - - - -

- -
-
- - - - - - - + + + +
+
@@ -63,591 +63,591 @@
-
+ + + + + + + +
+ + +

Nasdaq

+
+

12,266.41

+
+
+

+1.27%

+
+
+
- + + + + + + + +
+ + +

S&P

+
+

4,110.41

+
+
+

+1.06%

+
+
-

Nasdaq

+ + + + + + + +
+ + +

Dow

+
+

32,381.34

+
+
+

+0.71%

+
+
-

12,266.41

+ + + + + + + +
+ + +

10-Year

+
+

3.358%

+
+
+

+4.3 bps

+
+
+ + + + + + + +
+ + +

Bitcoin

+
+

$22,311.05

+
+
+

+3.05%

+
+
+
+ + + + + + + +
+ + +

Apple

+
+

$163.43

+
+
+

+3.85%

+
+
+
+

*Stock data as of market close, cryptocurrency data as of 11:00pm ET. Here's what these numbers mean. +

+
+
    +
  • + Markets: Stocks continued to rally yesterday, with the S&P 500 posting its biggest four-day gain since June. Helping to boost markets was Apple, which rose on bullish news about preorders for the iPhone 14 Pro Max. +
  • +
  • + Economy: Happy CPI Day to all who celebrate. The consumer price index report that drops this morning is expected to show that inflation fell to 8% last month. It’s the last major piece of data that will arrive before the Fed decides how big to go on interest rate hikes next week. +
  • +
+
-
-

+1.27%

-
-
-
- - -

S&P

-
-

4,110.41

-
+
-

+1.06%

+

AUTO

+

+ Nikola founder’s fraud trial gets rolling +

+ + woman with back to camera looking at paintings + Stefan Puchner/Getty Images +
+
+

The fraud trial of Trevor Milton, the founder and former CEO of electric truck company Nikola Motors, began yesterday with jury selection. Milton, who pleaded not guilty in the case, stands accused of lying about his company’s progress in developing electric vehicles, leading to huge losses for investors.

+

The case—a shoo-in for Hulu’s next ripped-from-the-headlines original that everyone at work except you is watching—is seen as a cautionary tale of buying into the hype around companies before they deliver a single product.

+

So how did Nikola go from the third-largest auto company in the US in 2020 with a $33 billion market value to just a $2.3 billion market value as of yesterday with an indicted founder?

+

A hype-y road

+

Milton founded Nikola in 2015, capitalizing on investor fervor around EVs, particularly those made by Elon Musk’s Tesla. In June 2020, the company went public via a SPAC. Prosecutors claim that Milton misled investors by making false claims about Nikola’s ability to produce hydrogen and by releasing a now-infamous promotional video that showed a moving Nikola truck (not disclosed: the truck was merely rolling downhill in neutral).

+

Beyond simply drumming up name association with retail investor darling Tesla, Milton also deliberately targeted less knowledgeable investors by promoting Nikola’s stock on social media and in interviews, prosecutors allege.

+

And those retail investors ultimately bore the brunt of Nikola’s losses when its stock dropped 40% following Milton’s resignation in September 2020, days after an activist short seller published a scathing report calling the company an “intricate fraud built on dozens of lies.”

+

Where things stand now

+

In December, Nikola agreed to pay a $125 million penalty to settle an SEC fraud investigation. The company, which is still around and has begun production on a battery-powered semi-truck model, reported a net loss of $173 million in the second quarter.

+

Before stepping down, Milton purchased a $32.5 million Utah ranch and a jet, and since his resignation, he has sold more than $300 million in company stock. The main charge against him carries a maximum sentence of 25 years, though he’s likely to see much less time, if he’s even convicted.—MK

+
+ +

+ + + + + + + + + + + + +

+ +
+
+
+

TOGETHER WITH FACET WEALTH

+

+ + Money on everyone’s mind + +

+
+
+

In our current economic state, there’s a lot of attention on money—how much it’s worth, how much we pay in interest, inflation, the list goes on.

+

And if all that news has stirred up questions like, “Am I doing the right things with my money so that I can get the most out of life?” Facet can help.

+

Their CERTIFIED FINANCIAL PLANNER™ professionals work with you 1:1 for an affordable fixed fee to answer questions about your entire financial life, not just basic money management. Plus, their proprietary tech helps you get the full picture of where you’re at financially and where you’re going.

+

Brew readers get 2 free* months in their first year of financial planning. Sign up here.

+ +

+ + + + + + + + + +

+ +
+
+
+

WORLD

+

+ + Tour de headlines + +

+
+ President Biden + Mandel Ngan/Getty Images +
+

Biden goes for a “moonshot” on cancer. Referencing JFK’s famous speech on its 60th anniversary, President Biden said yesterday he’s laying out his “moonshot” for eradicating cancer. The plan involves a new department focused on health and biomedical research, executive orders beefing up domestic biomanufacturing, and a government group called the “Cancer Cabinet.” In hopeful news that might help move things along, drugmaker Amgen reported its new cancer drug was more effective in some areas than chemo for late-stage lung cancer patients.

+

Goldman Sachs to lay off hundreds. The bank plans to reinstate annual employee culls, which it had suspended during the pandemic, and may start cutting jobs as soon as next week. Typically, Goldman targets between 1% and 5% of its workforce for layoffs each year, and this round is expected to be at the lower end of the spectrum (current headcount: 47,000). The expected layoffs come after Goldman’s profits fell by nearly half in the second quarter compared to the year before as deal-making slowed.

+

15,000 nurses walked off the job in Minnesota. The nurses involved in the largest-ever private sector nursing strike in the US plan to stay out for three days to demand fixes for understaffing, as well as higher pay. Though this strike targets 13 hospitals in the Minneapolis–St. Paul area, facilities across the country had trouble finding enough nurses even before the pandemic. Unions in at least two other states have also authorized work stoppages in the past month.

+
+
+
+

EDUCATION

+

+ The list that no one likes is out +

+
+ + Students walking on campus in the fall. + Jon Lovette/Getty Images +
+
+

US News & World Report released its yearly ranking of the best colleges in the country yesterday. But this year’s list comes amid a growing number of complaints about how the scores that mean a lot to wide-eyed future loan borrowers (and the administrators who will eventually ask them for money) are calculated.

+

Besides controversial criteria like incoming students’ SAT scores and the level of alumni donations, one of the main problems critics have with the list is that it attributes 20% of its ranking formula to what amounts to basically a popularity contest. US News sends a yearly survey to college admins asking them to rate other schools’ “academic quality.”

+

Even Education Secretary Miguel Cardona, although not referring to the US News list directly, said last month that college rankings that value reputation above things like economic mobility are “a joke.”

+

There’s even more drama this year…Columbia University dropped from No. 2 to No. 18 because it didn’t submit any data while it investigated a math professor’s claims that the school might be fudging some numbers. On Friday, the university admitted to the fudging.

+

Final fun fact: 19 of the top 20 schools on this year’s list cost $55,000+ per year to attend.—MM

+
+ +

+ + + + + + + + + + + + +

+ +
+
+
+

FOOD & BEVERAGE

+

Starbucks puts the ‘mint’ in peppermint

+
+ + A girl drinks from a Starbucks cup while looking at her phone + Zhang Peng/Getty Images +
+
+

The Starbucks customer loyalty program inspires more devotion than the Mocha Joe’s punch card that always gets lost in your wallet. Now the coffee chain is trying to spark even more loyalty by taking its app-based program to the next technological level with NFTs.

+

The company unveiled its Starbucks Odyssey program yesterday, a platform using Polygon, an Ethereum network, that coffee drinkers can log into with their existing program credentials to play games or take challenges to earn non-fungible tokens. They’ll also be available for purchase via credit card, no crypto necessary.

+

These NFTs, called “journey stamps,” will unlock rewards for users that go beyond the typical free coffee, like events or trips.

+

Customers can join a waitlist now, but only time will tell whether people will be clambering for coffee-themed digital art. The project is a relatively recent one—an exec told TechCrunch it’s only been in the works for six months, but in that time the market for NFTs has changed drastically. Trading volume at OpenSea, the most popular NFT marketplace, plunged 99% from early May to late August, per Fortune.

+

Zoom out: The Web3 push is one of many big changes coming to Starbucks. A new leader will succeed interim CEO Howard Schultz, but not before Schultz lays out a new strategy at today’s investor day that’s aimed at boosting efficiency.—AR

+
+ +

+ + + + + + + + + + + + +

+ +
+
+ + A phone with an Instagram Reels icon and a 0 views notification + Francis Scialabba +
+

Stat: People spend 17.6 million hours a day watching Instagram Reels, just a fraction of the 197.8 million hours users waste daily on TikTok, according to an internal Meta document viewed by the Wall Street Journal. While Reels might seem inescapable in your feed, engagement is trending down, dropping 13.6% in August from the month before, the document showed.

+

Quote: “Nothing can justify the persistence of this fundamental abuse of human rights.”

+

The director-general of the UN’s labor standards agency yesterday called for an “all-hands-on-deck approach” to combating modern slavery after releasing a report that found 50 million people were living in modern slavery—28 million in forced labor and 22 million in forced marriages in 2021. That’s 10 million more than in 2016.

+

Read: Johnson & Johnson and a new war on consumer protection. (The New Yorker)

+
+
+
+

WHAT ELSE IS BREWING

+
+
+
    +
  • + Ukraine took back territory from Russia all the way to its northeastern border in some areas, leading one former member of Russia’s parliament to call for peace talks on live TV. +
  • +
  • + Streaming services had a good night at the Emmys, with HBO Max’s Succession winning best drama and The White Lotus nabbing the statue for best limited series. The Apple TV+ series Ted Lasso took the top prize for a comedy series. +
  • +
  • + Twitter whistleblower Peiter “Mudge” Zatko will testify today before the Senate Judiciary Committee about the platform’s privacy and security vulnerabilities. +
  • +
  • + Elon Musk’s college girlfriend is auctioning off mementos she saved from the relationship, including photos and a signed birthday card. +
  • +
+
+
+
+

BREW'S BETS

+
+
+

Taking back texts: A complete guide to Apple’s new operating system, which lets you personalize your lock screen and a lot more.

+

Sleight of hand: Watch the reigning world champion of card magic (a real title) do his thing.

+

Interesting pod alert: After years on a personal odyssey, journalist Lauren Ober found out she was autistic. The Loudest Girl in the World shares Lauren’s journey once she was diagnosed. Listen now.

+

Just like ⌘C, ⌘V: With CopyTrader,™ eToro’s most popular feature, you can automatically copy the moves of real investors in real time. No more second-guessing your crypto decisions. Get started today.*

+ + +

*This is sponsored advertising content.

+
+
+
+

GAMES

+

+ + The puzzle section + +

+
+
+

Brew Mini: If you know what kind of car James Bond drives, you’re more than 10% of the way to completing today’s Mini. Solve it here.

+

Tagline trivia

+

There’s nothing cringier than a movie tagline. We’ll give you the tagline for a film, and you have to name the film.

+
    +
  1. “Midnight never strikes when you’re in love.”
  2. +
  3. “Work sucks.”
  4. +
  5. “You don’t get to 500 million friends without making a few enemies.”
  6. +
  7. “The longer you wait, the harder it gets.”
  8. +
  9. “A comedy of trial and error.”
  10. +
+
+
+ + + How to save money in a recession + +
+

Saving at any point can be a challenge. Saving during an economic downturn? Mission impossible. But Anish Mitra uses his knowledge from 10 years on Wall Street to teach you how saving amid slowing economic growth doesn't have to be difficult. Watch here.

+

Check out more from the Brew:

+

On Business Casual: Nora chats with Alex Ma, the CEO and co-founder of Poparazzi, an app that allows you to build your friends’ profile pages instead of your own. Listen or watch here.

+

Ready to jumpstart your career but don’t know where to start? We’ve got you covered. Take our short quiz and find out which Morning Brew Accelerator is right for you.

+
+
+
+

+ + Answer + +

+
+
+

1. Cinderella

+

2. Office Space

+

3. The Social Network

+

4. The 40-Year-Old Virgin

+

5. My Cousin Vinny

+
+
+
+

✢ A Note From Facet Wealth

+

Facet Wealth is an SEC Registered Investment Advisor headquartered in Baltimore, Maryland. This is not an offer to sell securities or the solicitation of an offer to purchase securities. This is not investment, financial, legal, or tax advice.

+

*Two months free offer is only valid for an annual fee paid at the time of signing.

+
+
+

Written by Abigail Rubenstein, Max Knoblauch, and Matty Merritt +

+

Was this email forwarded to you? Sign up here.

+
+ ADVERTISE // CAREERS // SHOP // FAQ +

Update your email preferences or unsubscribe here.
View our privacy policy here.

+

Copyright © 2022 Morning Brew. All rights reserved.
22 W 19th St, 4th Floor, New York, NY 10011

-
-
- - -

Dow

-
-

32,381.34

-
-
-

+0.71%

-
-
-
-
- - -

10-Year

-
-

3.358%

-
-
-

+4.3 bps

-
-
-
-
- - -

Bitcoin

-
-

$22,311.05

-
-
-

+3.05%

-
-
-
-
- - -

Apple

-
-

$163.43

-
-
-

+3.85%

-
-
-

*Stock data as of market close, cryptocurrency data as of 11:00pm ET. Here's what these numbers mean. -

-
-
    -
  • - Markets: Stocks continued to rally yesterday, with the S&P 500 posting its biggest four-day gain since June. Helping to boost markets was Apple, which rose on bullish news about preorders for the iPhone 14 Pro Max. -
  • -
  • - Economy: Happy CPI Day to all who celebrate. The consumer price index report that drops this morning is expected to show that inflation fell to 8% last month. It’s the last major piece of data that will arrive before the Fed decides how big to go on interest rate hikes next week. -
  • -
-
-
-
-

AUTO

-

- Nikola founder’s fraud trial gets rolling -

-
- - woman with back to camera looking at paintings - Stefan Puchner/Getty Images -
-
-

The fraud trial of Trevor Milton, the founder and former CEO of electric truck company Nikola Motors, began yesterday with jury selection. Milton, who pleaded not guilty in the case, stands accused of lying about his company’s progress in developing electric vehicles, leading to huge losses for investors.

-

The case—a shoo-in for Hulu’s next ripped-from-the-headlines original that everyone at work except you is watching—is seen as a cautionary tale of buying into the hype around companies before they deliver a single product.

-

So how did Nikola go from the third-largest auto company in the US in 2020 with a $33 billion market value to just a $2.3 billion market value as of yesterday with an indicted founder?

-

A hype-y road

-

Milton founded Nikola in 2015, capitalizing on investor fervor around EVs, particularly those made by Elon Musk’s Tesla. In June 2020, the company went public via a SPAC. Prosecutors claim that Milton misled investors by making false claims about Nikola’s ability to produce hydrogen and by releasing a now-infamous promotional video that showed a moving Nikola truck (not disclosed: the truck was merely rolling downhill in neutral).

-

Beyond simply drumming up name association with retail investor darling Tesla, Milton also deliberately targeted less knowledgeable investors by promoting Nikola’s stock on social media and in interviews, prosecutors allege.

-

And those retail investors ultimately bore the brunt of Nikola’s losses when its stock dropped 40% following Milton’s resignation in September 2020, days after an activist short seller published a scathing report calling the company an “intricate fraud built on dozens of lies.”

-

Where things stand now

-

In December, Nikola agreed to pay a $125 million penalty to settle an SEC fraud investigation. The company, which is still around and has begun production on a battery-powered semi-truck model, reported a net loss of $173 million in the second quarter.

-

Before stepping down, Milton purchased a $32.5 million Utah ranch and a jet, and since his resignation, he has sold more than $300 million in company stock. The main charge against him carries a maximum sentence of 25 years, though he’s likely to see much less time, if he’s even convicted.—MK

-
- -

- - - - - - - - - - - - -

- -
-
-
-

TOGETHER WITH FACET WEALTH

-

- - Money on everyone’s mind - -

-
-
-

In our current economic state, there’s a lot of attention on money—how much it’s worth, how much we pay in interest, inflation, the list goes on.

-

And if all that news has stirred up questions like, “Am I doing the right things with my money so that I can get the most out of life?” Facet can help.

-

Their CERTIFIED FINANCIAL PLANNER™ professionals work with you 1:1 for an affordable fixed fee to answer questions about your entire financial life, not just basic money management. Plus, their proprietary tech helps you get the full picture of where you’re at financially and where you’re going.

-

Brew readers get 2 free* months in their first year of financial planning. Sign up here.

- -

- - - - - - - - - -

- -
-
-
-

WORLD

-

- - Tour de headlines - -

-
- President Biden - Mandel Ngan/Getty Images -
-

Biden goes for a “moonshot” on cancer. Referencing JFK’s famous speech on its 60th anniversary, President Biden said yesterday he’s laying out his “moonshot” for eradicating cancer. The plan involves a new department focused on health and biomedical research, executive orders beefing up domestic biomanufacturing, and a government group called the “Cancer Cabinet.” In hopeful news that might help move things along, drugmaker Amgen reported its new cancer drug was more effective in some areas than chemo for late-stage lung cancer patients.

-

Goldman Sachs to lay off hundreds. The bank plans to reinstate annual employee culls, which it had suspended during the pandemic, and may start cutting jobs as soon as next week. Typically, Goldman targets between 1% and 5% of its workforce for layoffs each year, and this round is expected to be at the lower end of the spectrum (current headcount: 47,000). The expected layoffs come after Goldman’s profits fell by nearly half in the second quarter compared to the year before as deal-making slowed.

-

15,000 nurses walked off the job in Minnesota. The nurses involved in the largest-ever private sector nursing strike in the US plan to stay out for three days to demand fixes for understaffing, as well as higher pay. Though this strike targets 13 hospitals in the Minneapolis–St. Paul area, facilities across the country had trouble finding enough nurses even before the pandemic. Unions in at least two other states have also authorized work stoppages in the past month.

-
-
-
-

EDUCATION

-

- The list that no one likes is out -

-
- - Students walking on campus in the fall. - Jon Lovette/Getty Images -
-
-

US News & World Report released its yearly ranking of the best colleges in the country yesterday. But this year’s list comes amid a growing number of complaints about how the scores that mean a lot to wide-eyed future loan borrowers (and the administrators who will eventually ask them for money) are calculated.

-

Besides controversial criteria like incoming students’ SAT scores and the level of alumni donations, one of the main problems critics have with the list is that it attributes 20% of its ranking formula to what amounts to basically a popularity contest. US News sends a yearly survey to college admins asking them to rate other schools’ “academic quality.”

-

Even Education Secretary Miguel Cardona, although not referring to the US News list directly, said last month that college rankings that value reputation above things like economic mobility are “a joke.”

-

There’s even more drama this year…Columbia University dropped from No. 2 to No. 18 because it didn’t submit any data while it investigated a math professor’s claims that the school might be fudging some numbers. On Friday, the university admitted to the fudging.

-

Final fun fact: 19 of the top 20 schools on this year’s list cost $55,000+ per year to attend.—MM

-
- -

- - - - - - - - - - - - -

- -
-
-
-

FOOD & BEVERAGE

-

Starbucks puts the ‘mint’ in peppermint

-
- - A girl drinks from a Starbucks cup while looking at her phone - Zhang Peng/Getty Images -
-
-

The Starbucks customer loyalty program inspires more devotion than the Mocha Joe’s punch card that always gets lost in your wallet. Now the coffee chain is trying to spark even more loyalty by taking its app-based program to the next technological level with NFTs.

-

The company unveiled its Starbucks Odyssey program yesterday, a platform using Polygon, an Ethereum network, that coffee drinkers can log into with their existing program credentials to play games or take challenges to earn non-fungible tokens. They’ll also be available for purchase via credit card, no crypto necessary.

-

These NFTs, called “journey stamps,” will unlock rewards for users that go beyond the typical free coffee, like events or trips.

-

Customers can join a waitlist now, but only time will tell whether people will be clambering for coffee-themed digital art. The project is a relatively recent one—an exec told TechCrunch it’s only been in the works for six months, but in that time the market for NFTs has changed drastically. Trading volume at OpenSea, the most popular NFT marketplace, plunged 99% from early May to late August, per Fortune.

-

Zoom out: The Web3 push is one of many big changes coming to Starbucks. A new leader will succeed interim CEO Howard Schultz, but not before Schultz lays out a new strategy at today’s investor day that’s aimed at boosting efficiency.—AR

-
- -

- - - - - - - - - - - - -

- -
-
- - A phone with an Instagram Reels icon and a 0 views notification - Francis Scialabba -
-

Stat: People spend 17.6 million hours a day watching Instagram Reels, just a fraction of the 197.8 million hours users waste daily on TikTok, according to an internal Meta document viewed by the Wall Street Journal. While Reels might seem inescapable in your feed, engagement is trending down, dropping 13.6% in August from the month before, the document showed.

-

Quote: “Nothing can justify the persistence of this fundamental abuse of human rights.”

-

The director-general of the UN’s labor standards agency yesterday called for an “all-hands-on-deck approach” to combating modern slavery after releasing a report that found 50 million people were living in modern slavery—28 million in forced labor and 22 million in forced marriages in 2021. That’s 10 million more than in 2016.

-

Read: Johnson & Johnson and a new war on consumer protection. (The New Yorker)

-
-
-
-

WHAT ELSE IS BREWING

-
-
-
    -
  • - Ukraine took back territory from Russia all the way to its northeastern border in some areas, leading one former member of Russia’s parliament to call for peace talks on live TV. -
  • -
  • - Streaming services had a good night at the Emmys, with HBO Max’s Succession winning best drama and The White Lotus nabbing the statue for best limited series. The Apple TV+ series Ted Lasso took the top prize for a comedy series. -
  • -
  • - Twitter whistleblower Peiter “Mudge” Zatko will testify today before the Senate Judiciary Committee about the platform’s privacy and security vulnerabilities. -
  • -
  • - Elon Musk’s college girlfriend is auctioning off mementos she saved from the relationship, including photos and a signed birthday card. -
  • -
-
-
-
-

BREW'S BETS

-
-
-

Taking back texts: A complete guide to Apple’s new operating system, which lets you personalize your lock screen and a lot more.

-

Sleight of hand: Watch the reigning world champion of card magic (a real title) do his thing.

-

Interesting pod alert: After years on a personal odyssey, journalist Lauren Ober found out she was autistic. The Loudest Girl in the World shares Lauren’s journey once she was diagnosed. Listen now.

-

Just like ⌘C, ⌘V: With CopyTrader,™ eToro’s most popular feature, you can automatically copy the moves of real investors in real time. No more second-guessing your crypto decisions. Get started today.*

- - -

*This is sponsored advertising content.

-
-
-
-

GAMES

-

- - The puzzle section - -

-
-
-

Brew Mini: If you know what kind of car James Bond drives, you’re more than 10% of the way to completing today’s Mini. Solve it here.

-

Tagline trivia

-

There’s nothing cringier than a movie tagline. We’ll give you the tagline for a film, and you have to name the film.

-
    -
  1. “Midnight never strikes when you’re in love.”
  2. -
  3. “Work sucks.”
  4. -
  5. “You don’t get to 500 million friends without making a few enemies.”
  6. -
  7. “The longer you wait, the harder it gets.”
  8. -
  9. “A comedy of trial and error.”
  10. -
-
-
- - - How to save money in a recession - -
-

Saving at any point can be a challenge. Saving during an economic downturn? Mission impossible. But Anish Mitra uses his knowledge from 10 years on Wall Street to teach you how saving amid slowing economic growth doesn't have to be difficult. Watch here.

-

Check out more from the Brew:

-

On Business Casual: Nora chats with Alex Ma, the CEO and co-founder of Poparazzi, an app that allows you to build your friends’ profile pages instead of your own. Listen or watch here.

-

Ready to jumpstart your career but don’t know where to start? We’ve got you covered. Take our short quiz and find out which Morning Brew Accelerator is right for you.

-
-
-
-

- - Answer - -

-
-
-

1. Cinderella

-

2. Office Space

-

3. The Social Network

-

4. The 40-Year-Old Virgin

-

5. My Cousin Vinny

-
-
-
-

✢ A Note From Facet Wealth

-

Facet Wealth is an SEC Registered Investment Advisor headquartered in Baltimore, Maryland. This is not an offer to sell securities or the solicitation of an offer to purchase securities. This is not investment, financial, legal, or tax advice.

-

*Two months free offer is only valid for an annual fee paid at the time of signing.

-
-
-

Written by Abigail Rubenstein, Max Knoblauch, and Matty Merritt -

-

Was this email forwarded to you? Sign up here.

-
- ADVERTISE // CAREERS // SHOP // FAQ -

Update your email preferences or unsubscribe here.
View our privacy policy here.

-

Copyright © 2022 Morning Brew. All rights reserved.
22 W 19th St, 4th Floor, New York, NY 10011

-
+
- - - -
- A trial over EV fraud gets going... -
-
- -
- - - - -
- -
- - -
- - - - - -
- - - - - -
- September 13, 2022 - - View Online - | - Sign Up - | - Shop -
- - - - -
-

- - Morning Brew -

-
- - - - - -
- Facet Wealth - -
- - - - -
-
-

Good morning. Apple’s iOS 16 dropped for iPhone users yesterday, and once you download the software update you’ll be able to edit an iMessage within 15 minutes of sending it and delete one within two minutes. While that may be useful for most people, the only text we’ve ever regretted sending was, “Sure I’ll go to your friend’s improv show.”

-

Max Knoblauch, Abby Rubenstein, Matty Merritt

-
-
-
- -
- - - - -
-
- - - - - -
- - - - -
-

- MARKETS -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - -
- - -

Nasdaq

-
-

12,266.41

-
- - - - - -
-
- - - - - - - -
- - -

S&P

-
-

4,110.41

-
- - - - - -
-
- - - - - - - -
- - -

Dow

-
-

32,381.34

-
- - - - - -
-
- - - - - - - -
- - -

10-Year

-
-

3.358%

-
- - - - - -
-
- - - - - - - -
- - -

Bitcoin

-
-

$22,311.05

-
- - - - - -
-
- - - - - - - -
- - -

Apple

-
-

$163.43

-
- - - - - -
-
-

- *Stock data as of market close, cryptocurrency data as of 11:00pm ET. - Here's what these numbers mean. -

-
-
    -
  • - Markets: Stocks continued to rally yesterday, with the S&P 500 posting its biggest four-day gain since June. Helping to boost markets was Apple, which rose on bullish news about preorders for the iPhone 14 Pro Max. -
  • -
  • - Economy: Happy CPI Day to all who celebrate. The consumer price index report that drops this morning is expected to show that inflation fell to 8% last month. It’s the last major piece of data that will arrive before the Fed decides how big to go on interest rate hikes next week. -
  • -
-
-
-
- -
-
- - - - -
- - - - - -
- - - - -
-

- AUTO -

-

- - Nikola founder’s fraud trial gets rolling - -

-
- - woman with back to camera looking at paintings - Stefan Puchner/Getty Images - - - - -
-
-

The fraud trial of Trevor Milton, the founder and former CEO of electric truck company Nikola Motors, began yesterday with jury selection. Milton, who pleaded not guilty in the case, stands accused of lying about his company’s progress in developing electric vehicles, leading to huge losses for investors.

-

The case—a shoo-in for Hulu’s next ripped-from-the-headlines original that everyone at work except you is watching—is seen as a cautionary tale of buying into the hype around companies before they deliver a single product.

-

So how did Nikola go from the third-largest auto company in the US in 2020 with a $33 billion market value to just a $2.3 billion market value as of yesterday with an indicted founder?

-

A hype-y road

-

Milton founded Nikola in 2015, capitalizing on investor fervor around EVs, particularly those made by Elon Musk’s Tesla. In June 2020, the company went public via a SPAC. Prosecutors claim that Milton misled investors by making false claims about Nikola’s ability to produce hydrogen and by releasing a now-infamous promotional video that showed a moving Nikola truck (not disclosed: the truck was merely rolling downhill in neutral).

-

Beyond simply drumming up name association with retail investor darling Tesla, Milton also deliberately targeted less knowledgeable investors by promoting Nikola’s stock on social media and in interviews, prosecutors allege.

-

And those retail investors ultimately bore the brunt of Nikola’s losses when its stock dropped 40% following Milton’s resignation in September 2020, days after an activist short seller published a scathing report calling the company an “intricate fraud built on dozens of lies.”

-

Where things stand now

-

In December, Nikola agreed to pay a $125 million penalty to settle an SEC fraud investigation. The company, which is still around and has begun production on a battery-powered semi-truck model, reported a net loss of $173 million in the second quarter.

-

Before stepping down, Milton purchased a $32.5 million Utah ranch and a jet, and since his resignation, he has sold more than $300 million in company stock. The main charge against him carries a maximum sentence of 25 years, though he’s likely to see much less time, if he’s even convicted.—MK

-
- - - - - -
- - - - - - - - - - - - -
- -
-
- -
- - - - -
- - - - - -
- - - - -
-

- TOGETHER WITH FACET WEALTH -

-

- - - Money on everyone’s mind - - -

-
- - - - -
-

In our current economic state, there’s a lot of attention on money—how much it’s worth, how much we pay in interest, inflation, the list goes on.

-

And if all that news has stirred up questions like, “Am I doing the right things with my money so that I can get the most out of life?” Facet can help.

-

Their CERTIFIED FINANCIAL PLANNER™ professionals work with you 1:1 for an affordable fixed fee to answer questions about your entire financial life, not just basic money management. Plus, their proprietary tech helps you get the full picture of where you’re at financially and where you’re going.

-

Brew readers get 2 free* months in their first year of financial planning. Sign up here.

- - - - - -
- - - - - - - - - -
- -
-
- -
- - - - -
- - - - - -
- - - - -
-

- WORLD -

-

- - - Tour de headlines - - -

-
- President Biden - Mandel Ngan/Getty Images - - - - -
-
-

Biden goes for a “moonshot” on cancer. Referencing JFK’s famous speech on its 60th anniversary, President Biden said yesterday he’s laying out his “moonshot” for eradicating cancer. The plan involves a new department focused on health and biomedical research, executive orders beefing up domestic biomanufacturing, and a government group called the “Cancer Cabinet.” In hopeful news that might help move things along, drugmaker Amgen reported its new cancer drug was more effective in some areas than chemo for late-stage lung cancer patients.

-

Goldman Sachs to lay off hundreds. The bank plans to reinstate annual employee culls, which it had suspended during the pandemic, and may start cutting jobs as soon as next week. Typically, Goldman targets between 1% and 5% of its workforce for layoffs each year, and this round is expected to be at the lower end of the spectrum (current headcount: 47,000). The expected layoffs come after Goldman’s profits fell by nearly half in the second quarter compared to the year before as deal-making slowed.

-

15,000 nurses walked off the job in Minnesota. The nurses involved in the largest-ever private sector nursing strike in the US plan to stay out for three days to demand fixes for understaffing, as well as higher pay. Though this strike targets 13 hospitals in the Minneapolis–St. Paul area, facilities across the country had trouble finding enough nurses even before the pandemic. Unions in at least two other states have also authorized work stoppages in the past month.

-
-
-
- -
- - - - -
- - - - - -
- - - - -
-

- EDUCATION -

-

- - The list that no one likes is out - -

-
- - Students walking on campus in the fall. - Jon Lovette/Getty Images - - - - -
-
-

US News & World Report released its yearly ranking of the best colleges in the country yesterday. But this year’s list comes amid a growing number of complaints about how the scores that mean a lot to wide-eyed future loan borrowers (and the administrators who will eventually ask them for money) are calculated.

-

Besides controversial criteria like incoming students’ SAT scores and the level of alumni donations, one of the main problems critics have with the list is that it attributes 20% of its ranking formula to what amounts to basically a popularity contest. US News sends a yearly survey to college admins asking them to rate other schools’ “academic quality.”

-

Even Education Secretary Miguel Cardona, although not referring to the US News list directly, said last month that college rankings that value reputation above things like economic mobility are “a joke.”

-

There’s even more drama this year…Columbia University dropped from No. 2 to No. 18 because it didn’t submit any data while it investigated a math professor’s claims that the school might be fudging some numbers. On Friday, the university admitted to the fudging.

-

Final fun fact: 19 of the top 20 schools on this year’s list cost $55,000+ per year to attend.—MM

-
- - - - - -
- - - - - - - - - - - - -
- -
-
- -
- - - - -
- - - - - -
- - - - -
-

- FOOD & BEVERAGE -

-

- Starbucks puts the ‘mint’ in peppermint - -

-
- - A girl drinks from a Starbucks cup while looking at her phone - Zhang Peng/Getty Images - - - - -
-
-

The Starbucks customer loyalty program inspires more devotion than the Mocha Joe’s punch card that always gets lost in your wallet. Now the coffee chain is trying to spark even more loyalty by taking its app-based program to the next technological level with NFTs.

-

The company unveiled its Starbucks Odyssey program yesterday, a platform using Polygon, an Ethereum network, that coffee drinkers can log into with their existing program credentials to play games or take challenges to earn non-fungible tokens. They’ll also be available for purchase via credit card, no crypto necessary.

-

These NFTs, called “journey stamps,” will unlock rewards for users that go beyond the typical free coffee, like events or trips.

-

Customers can join a waitlist now, but only time will tell whether people will be clambering for coffee-themed digital art. The project is a relatively recent one—an exec told TechCrunch it’s only been in the works for six months, but in that time the market for NFTs has changed drastically. Trading volume at OpenSea, the most popular NFT marketplace, plunged 99% from early May to late August, per Fortune.

-

Zoom out: The Web3 push is one of many big changes coming to Starbucks. A new leader will succeed interim CEO Howard Schultz, but not before Schultz lays out a new strategy at today’s investor day that’s aimed at boosting efficiency.—AR

-
- - - - - -
- - - - - - - - - - - - -
- -
-
- -
- - - - -
- - - - - -
- - - - -
-

- GRAB BAG -

-

- - - Key performance indicators - - -

-
- A phone with an Instagram Reels icon and a 0 views notification - Francis Scialabba - - - - -
-
-

Stat: People spend 17.6 million hours a day watching Instagram Reels, just a fraction of the 197.8 million hours users waste daily on TikTok, according to an internal Meta document viewed by the Wall Street Journal. While Reels might seem inescapable in your feed, engagement is trending down, dropping 13.6% in August from the month before, the document showed.

-

Quote: “Nothing can justify the persistence of this fundamental abuse of human rights.”

-

The director-general of the UN’s labor standards agency yesterday called for an “all-hands-on-deck approach” to combating modern slavery after releasing a report that found 50 million people were living in modern slavery—28 million in forced labor and 22 million in forced marriages in 2021. That’s 10 million more than in 2016.

-

Read: Johnson & Johnson and a new war on consumer protection. (The New Yorker)

-
-
-
- -
- - - - -
- - - - - -
- - - - -
-

- SPONSORED BY ACCRUE X VINCERO -

-
- - Accrue X Vincero - - - - - -
-

Style meets savings. With Accrue Savings, you can earn cash rewards from brands like Vincero by saving up for your purchases without relying on credit. Elevate your everyday carry with Vincero’s ethically crafted, premium lifestyle accessories and earn 15% in cash rewards toward your purchase when you save up for your Vincero accessories with an Accrue Savings account. Sign up here in just a few minutes today.

- - - - - -
- - - - - - - - - -
- -
-
- -
- - - - -
- - - - - -
- - - - -
-

- WHAT ELSE IS BREWING -

-
- - - - -
-
    -
  • - Ukraine took back territory from Russia all the way to its northeastern border in some areas, leading one former member of Russia’s parliament to call for peace talks on live TV. -
  • -
  • - Streaming services had a good night at the Emmys, with HBO Max’s Succession winning best drama and The White Lotus nabbing the statue for best limited series. The Apple TV+ series Ted Lasso took the top prize for a comedy series. -
  • -
  • - Twitter whistleblower Peiter “Mudge” Zatko will testify today before the Senate Judiciary Committee about the platform’s privacy and security vulnerabilities. -
  • -
  • - Elon Musk’s college girlfriend is auctioning off mementos she saved from the relationship, including photos and a signed birthday card. -
  • -
-
-
- -
- - - - -
- - - - - -
- - - - -
-

- BREW'S BETS -

-
- - - - -
-
-

Taking back texts: A complete guide to Apple’s new operating system, which lets you personalize your lock screen and a lot more.

-

Sleight of hand: Watch the reigning world champion of card magic (a real title) do his thing.

-

Interesting pod alert: After years on a personal odyssey, journalist Lauren Ober found out she was autistic. The Loudest Girl in the World shares Lauren’s journey once she was diagnosed. Listen now.

-

-

Just like ⌘C, ⌘V: With CopyTrader,™ eToro’s most popular feature, you can automatically copy the moves of real investors in real time. No more second-guessing your crypto decisions. Get started today.*

*This is sponsored advertising content.

-
-
-
- -
- - - - -
- - - - - -
- - - - -
-

- GAMES -

-

- - - The puzzle section - - -

-
- - - - -
-
-

Brew Mini: If you know what kind of car James Bond drives, you’re more than 10% of the way to completing today’s Mini. Solve it here.

-

Tagline trivia

-

There’s nothing cringier than a movie tagline. We’ll give you the tagline for a film, and you have to name the film.

-
    -
  1. “Midnight never strikes when you’re in love.”
  2. -
  3. “Work sucks.”
  4. -
  5. “You don’t get to 500 million friends without making a few enemies.”
  6. -
  7. “The longer you wait, the harder it gets.”
  8. -
  9. “A comedy of trial and error.”
  10. -
-
-
-
- -
- - - - -
- - - - - -
- - - - -
-

-

-

- - - How to save money in a recession - - -

-
- - How to save money in a recession - - - - - -
-
-

Saving at any point can be a challenge. Saving during an economic downturn? Mission impossible. But Anish Mitra uses his knowledge from 10 years on Wall Street to teach you how saving amid slowing economic growth doesn't have to be difficult. Watch here.

-

Check out more from the Brew:

-

On Business Casual: Nora chats with Alex Ma, the CEO and co-founder of Poparazzi, an app that allows you to build your friends’ profile pages instead of your own. Listen or watch here.

-

Ready to jumpstart your career but don’t know where to start? We’ve got you covered. Take our short quiz and find out which Morning Brew Accelerator is right for you.

-
-
-
- -
- - - - -
- - - - - -
- - - - -
-

- SHARE THE BREW -

-
- - - - -
-

- Share Morning Brew with your friends, acquire free Brew swag, and then acquire more friends as a result of your fresh Brew swag. -

-

- We’re saying we’ll give you free stuff and more friends if you share a link. One link. -

- -

- -

-
-

Your referral count: 0

- Click to Share -

Or copy & paste your referral link to others:
morningbrew.com/daily/r/?kid=72b509de

-
-
- -
- - - - -
- - - - - -
- - - - -
-

-

-

- - - Answer - - -

-
- - - - -
-
-

1. Cinderella

-

2. Office Space

-

3. The Social Network

-

4. The 40-Year-Old Virgin

-

5. My Cousin Vinny

-


-
-
-
- -
- - - -
- - - - - -
- - - - -
-

✢ A Note From Facet Wealth

-

Facet Wealth is an SEC Registered Investment Advisor headquartered in Baltimore, Maryland. This is not an offer to sell securities or the solicitation of an offer to purchase securities. This is not investment, financial, legal, or tax advice.

-

*Two months free offer is only valid for an annual fee paid at the time of signing.

-
-
-
- - - - - -
- - - - - - - - - - - - -
- - - - - - - - -
-

- Written by - Abigail Rubenstein, Max Knoblauch, and Matty Merritt -

-

- Was this email forwarded to you? Sign up - here. -

-
-

- WANT MORE BREW? -

-

- -Tips for smarter living → - -

-
    -
  • - Money Scoop: your personal finance upgrade - -
  • -
  • - Sidekick: lifestyle recs from every corner of the internet - -
  • -
-

- - - YouTube - -

-

- -Accelerate Your Career with our Courses → - -

- -
-
- ADVERTISE - // - CAREERS - // - SHOP - // - FAQ -
-
- Update your email preferences or unsubscribe - here. -
- View our privacy policy - here. -
-
- Copyright © - 2022 - Morning Brew. All rights reserved. -
- 22 W 19th St, 4th Floor, New York, NY 10011 -
- -
- + + + + + -
+ A trial over EV fraud gets going... +
- -
- +
+
+ +
+ + + + +
+ +
+ + +
+ + + + + +
+ + + + + +
+ September 13, 2022 + + View Online + | + Sign Up + | + Shop +
+ + + + +
+

+ + Morning Brew +

+
+ + + + + +
+ Facet Wealth + +
+ + + + +
+
+

Good morning. Apple’s iOS 16 dropped for iPhone users yesterday, and once you download the software update you’ll be able to edit an iMessage within 15 minutes of sending it and delete one within two minutes. While that may be useful for most people, the only text we’ve ever regretted sending was, “Sure I’ll go to your friend’s improv show.”

+

Max Knoblauch, Abby Rubenstein, Matty Merritt

+
+
+
+ +
+ + + + +
+
+ + + + + +
+ + + + +
+

+ MARKETS +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+ + +

Nasdaq

+
+

12,266.41

+
+ + + + + +
+
+ + + + + + + +
+ + +

S&P

+
+

4,110.41

+
+ + + + + +
+
+ + + + + + + +
+ + +

Dow

+
+

32,381.34

+
+ + + + + +
+
+ + + + + + + +
+ + +

10-Year

+
+

3.358%

+
+ + + + + +
+
+ + + + + + + +
+ + +

Bitcoin

+
+

$22,311.05

+
+ + + + + +
+
+ + + + + + + +
+ + +

Apple

+
+

$163.43

+
+ + + + + +
+
+

+ *Stock data as of market close, cryptocurrency data as of 11:00pm ET. + Here's what these numbers mean. +

+
+
    +
  • + Markets: Stocks continued to rally yesterday, with the S&P 500 posting its biggest four-day gain since June. Helping to boost markets was Apple, which rose on bullish news about preorders for the iPhone 14 Pro Max. +
  • +
  • + Economy: Happy CPI Day to all who celebrate. The consumer price index report that drops this morning is expected to show that inflation fell to 8% last month. It’s the last major piece of data that will arrive before the Fed decides how big to go on interest rate hikes next week. +
  • +
+
+
+
+ +
+
+ + + + +
+ + + + + +
+ + + + +
+

+ AUTO +

+

+ + Nikola founder’s fraud trial gets rolling + +

+
+ + woman with back to camera looking at paintings + Stefan Puchner/Getty Images + + + + +
+
+

The fraud trial of Trevor Milton, the founder and former CEO of electric truck company Nikola Motors, began yesterday with jury selection. Milton, who pleaded not guilty in the case, stands accused of lying about his company’s progress in developing electric vehicles, leading to huge losses for investors.

+

The case—a shoo-in for Hulu’s next ripped-from-the-headlines original that everyone at work except you is watching—is seen as a cautionary tale of buying into the hype around companies before they deliver a single product.

+

So how did Nikola go from the third-largest auto company in the US in 2020 with a $33 billion market value to just a $2.3 billion market value as of yesterday with an indicted founder?

+

A hype-y road

+

Milton founded Nikola in 2015, capitalizing on investor fervor around EVs, particularly those made by Elon Musk’s Tesla. In June 2020, the company went public via a SPAC. Prosecutors claim that Milton misled investors by making false claims about Nikola’s ability to produce hydrogen and by releasing a now-infamous promotional video that showed a moving Nikola truck (not disclosed: the truck was merely rolling downhill in neutral).

+

Beyond simply drumming up name association with retail investor darling Tesla, Milton also deliberately targeted less knowledgeable investors by promoting Nikola’s stock on social media and in interviews, prosecutors allege.

+

And those retail investors ultimately bore the brunt of Nikola’s losses when its stock dropped 40% following Milton’s resignation in September 2020, days after an activist short seller published a scathing report calling the company an “intricate fraud built on dozens of lies.”

+

Where things stand now

+

In December, Nikola agreed to pay a $125 million penalty to settle an SEC fraud investigation. The company, which is still around and has begun production on a battery-powered semi-truck model, reported a net loss of $173 million in the second quarter.

+

Before stepping down, Milton purchased a $32.5 million Utah ranch and a jet, and since his resignation, he has sold more than $300 million in company stock. The main charge against him carries a maximum sentence of 25 years, though he’s likely to see much less time, if he’s even convicted.—MK

+
+ + + + + +
+ + + + + + + + + + + + +
+ +
+
+ +
+ + + + +
+ + + + + +
+ + + + +
+

+ TOGETHER WITH FACET WEALTH +

+

+ + + Money on everyone’s mind + + +

+
+ + + + +
+

In our current economic state, there’s a lot of attention on money—how much it’s worth, how much we pay in interest, inflation, the list goes on.

+

And if all that news has stirred up questions like, “Am I doing the right things with my money so that I can get the most out of life?” Facet can help.

+

Their CERTIFIED FINANCIAL PLANNER™ professionals work with you 1:1 for an affordable fixed fee to answer questions about your entire financial life, not just basic money management. Plus, their proprietary tech helps you get the full picture of where you’re at financially and where you’re going.

+

Brew readers get 2 free* months in their first year of financial planning. Sign up here.

+ + + + + +
+ + + + + + + + + +
+ +
+
+ +
+ + + + +
+ + + + + +
+ + + + +
+

+ WORLD +

+

+ + + Tour de headlines + + +

+
+ President Biden + Mandel Ngan/Getty Images + + + + +
+
+

Biden goes for a “moonshot” on cancer. Referencing JFK’s famous speech on its 60th anniversary, President Biden said yesterday he’s laying out his “moonshot” for eradicating cancer. The plan involves a new department focused on health and biomedical research, executive orders beefing up domestic biomanufacturing, and a government group called the “Cancer Cabinet.” In hopeful news that might help move things along, drugmaker Amgen reported its new cancer drug was more effective in some areas than chemo for late-stage lung cancer patients.

+

Goldman Sachs to lay off hundreds. The bank plans to reinstate annual employee culls, which it had suspended during the pandemic, and may start cutting jobs as soon as next week. Typically, Goldman targets between 1% and 5% of its workforce for layoffs each year, and this round is expected to be at the lower end of the spectrum (current headcount: 47,000). The expected layoffs come after Goldman’s profits fell by nearly half in the second quarter compared to the year before as deal-making slowed.

+

15,000 nurses walked off the job in Minnesota. The nurses involved in the largest-ever private sector nursing strike in the US plan to stay out for three days to demand fixes for understaffing, as well as higher pay. Though this strike targets 13 hospitals in the Minneapolis–St. Paul area, facilities across the country had trouble finding enough nurses even before the pandemic. Unions in at least two other states have also authorized work stoppages in the past month.

+
+
+
+ +
+ + + + +
+ + + + + +
+ + + + +
+

+ EDUCATION +

+

+ + The list that no one likes is out + +

+
+ + Students walking on campus in the fall. + Jon Lovette/Getty Images + + + + +
+
+

US News & World Report released its yearly ranking of the best colleges in the country yesterday. But this year’s list comes amid a growing number of complaints about how the scores that mean a lot to wide-eyed future loan borrowers (and the administrators who will eventually ask them for money) are calculated.

+

Besides controversial criteria like incoming students’ SAT scores and the level of alumni donations, one of the main problems critics have with the list is that it attributes 20% of its ranking formula to what amounts to basically a popularity contest. US News sends a yearly survey to college admins asking them to rate other schools’ “academic quality.”

+

Even Education Secretary Miguel Cardona, although not referring to the US News list directly, said last month that college rankings that value reputation above things like economic mobility are “a joke.”

+

There’s even more drama this year…Columbia University dropped from No. 2 to No. 18 because it didn’t submit any data while it investigated a math professor’s claims that the school might be fudging some numbers. On Friday, the university admitted to the fudging.

+

Final fun fact: 19 of the top 20 schools on this year’s list cost $55,000+ per year to attend.—MM

+
+ + + + + +
+ + + + + + + + + + + + +
+ +
+
+ +
+ + + + +
+ + + + + +
+ + + + +
+

+ FOOD & BEVERAGE +

+

+ Starbucks puts the ‘mint’ in peppermint + +

+
+ + A girl drinks from a Starbucks cup while looking at her phone + Zhang Peng/Getty Images + + + + +
+
+

The Starbucks customer loyalty program inspires more devotion than the Mocha Joe’s punch card that always gets lost in your wallet. Now the coffee chain is trying to spark even more loyalty by taking its app-based program to the next technological level with NFTs.

+

The company unveiled its Starbucks Odyssey program yesterday, a platform using Polygon, an Ethereum network, that coffee drinkers can log into with their existing program credentials to play games or take challenges to earn non-fungible tokens. They’ll also be available for purchase via credit card, no crypto necessary.

+

These NFTs, called “journey stamps,” will unlock rewards for users that go beyond the typical free coffee, like events or trips.

+

Customers can join a waitlist now, but only time will tell whether people will be clambering for coffee-themed digital art. The project is a relatively recent one—an exec told TechCrunch it’s only been in the works for six months, but in that time the market for NFTs has changed drastically. Trading volume at OpenSea, the most popular NFT marketplace, plunged 99% from early May to late August, per Fortune.

+

Zoom out: The Web3 push is one of many big changes coming to Starbucks. A new leader will succeed interim CEO Howard Schultz, but not before Schultz lays out a new strategy at today’s investor day that’s aimed at boosting efficiency.—AR

+
+ + + + + +
+ + + + + + + + + + + + +
+ +
+
+ +
+ + + + +
+ + + + + +
+ + + + +
+

+ GRAB BAG +

+

+ + + Key performance indicators + + +

+
+ A phone with an Instagram Reels icon and a 0 views notification + Francis Scialabba + + + + +
+
+

Stat: People spend 17.6 million hours a day watching Instagram Reels, just a fraction of the 197.8 million hours users waste daily on TikTok, according to an internal Meta document viewed by the Wall Street Journal. While Reels might seem inescapable in your feed, engagement is trending down, dropping 13.6% in August from the month before, the document showed.

+

Quote: “Nothing can justify the persistence of this fundamental abuse of human rights.”

+

The director-general of the UN’s labor standards agency yesterday called for an “all-hands-on-deck approach” to combating modern slavery after releasing a report that found 50 million people were living in modern slavery—28 million in forced labor and 22 million in forced marriages in 2021. That’s 10 million more than in 2016.

+

Read: Johnson & Johnson and a new war on consumer protection. (The New Yorker)

+
+
+
+ +
+ + + + +
+ + + + + +
+ + + + +
+

+ SPONSORED BY ACCRUE X VINCERO +

+
+ + Accrue X Vincero + + + + + +
+

Style meets savings. With Accrue Savings, you can earn cash rewards from brands like Vincero by saving up for your purchases without relying on credit. Elevate your everyday carry with Vincero’s ethically crafted, premium lifestyle accessories and earn 15% in cash rewards toward your purchase when you save up for your Vincero accessories with an Accrue Savings account. Sign up here in just a few minutes today.

+ + + + + +
+ + + + + + + + + +
+ +
+
+ +
+ + + + +
+ + + + + +
+ + + + +
+

+ WHAT ELSE IS BREWING +

+
+ + + + +
+
    +
  • + Ukraine took back territory from Russia all the way to its northeastern border in some areas, leading one former member of Russia’s parliament to call for peace talks on live TV. +
  • +
  • + Streaming services had a good night at the Emmys, with HBO Max’s Succession winning best drama and The White Lotus nabbing the statue for best limited series. The Apple TV+ series Ted Lasso took the top prize for a comedy series. +
  • +
  • + Twitter whistleblower Peiter “Mudge” Zatko will testify today before the Senate Judiciary Committee about the platform’s privacy and security vulnerabilities. +
  • +
  • + Elon Musk’s college girlfriend is auctioning off mementos she saved from the relationship, including photos and a signed birthday card. +
  • +
+
+
+ +
+ + + + +
+ + + + + +
+ + + + +
+

+ BREW'S BETS +

+
+ + + + +
+
+

Taking back texts: A complete guide to Apple’s new operating system, which lets you personalize your lock screen and a lot more.

+

Sleight of hand: Watch the reigning world champion of card magic (a real title) do his thing.

+

Interesting pod alert: After years on a personal odyssey, journalist Lauren Ober found out she was autistic. The Loudest Girl in the World shares Lauren’s journey once she was diagnosed. Listen now.

+

+

Just like ⌘C, ⌘V: With CopyTrader,™ eToro’s most popular feature, you can automatically copy the moves of real investors in real time. No more second-guessing your crypto decisions. Get started today.*

*This is sponsored advertising content.

+
+
+
+ +
+ + + + +
+ + + + + +
+ + + + +
+

+ GAMES +

+

+ + + The puzzle section + + +

+
+ + + + +
+
+

Brew Mini: If you know what kind of car James Bond drives, you’re more than 10% of the way to completing today’s Mini. Solve it here.

+

Tagline trivia

+

There’s nothing cringier than a movie tagline. We’ll give you the tagline for a film, and you have to name the film.

+
    +
  1. “Midnight never strikes when you’re in love.”
  2. +
  3. “Work sucks.”
  4. +
  5. “You don’t get to 500 million friends without making a few enemies.”
  6. +
  7. “The longer you wait, the harder it gets.”
  8. +
  9. “A comedy of trial and error.”
  10. +
+
+
+
+ +
+ + + + +
+ + + + + +
+ + + + +
+

+

+

+ + + How to save money in a recession + + +

+
+ + How to save money in a recession + + + + + +
+
+

Saving at any point can be a challenge. Saving during an economic downturn? Mission impossible. But Anish Mitra uses his knowledge from 10 years on Wall Street to teach you how saving amid slowing economic growth doesn't have to be difficult. Watch here.

+

Check out more from the Brew:

+

On Business Casual: Nora chats with Alex Ma, the CEO and co-founder of Poparazzi, an app that allows you to build your friends’ profile pages instead of your own. Listen or watch here.

+

Ready to jumpstart your career but don’t know where to start? We’ve got you covered. Take our short quiz and find out which Morning Brew Accelerator is right for you.

+
+
+
+ +
+ + + + +
+ + + + + +
+ + + + +
+

+ SHARE THE BREW +

+
+ + + + +
+

+ Share Morning Brew with your friends, acquire free Brew swag, and then acquire more friends as a result of your fresh Brew swag. +

+

+ We’re saying we’ll give you free stuff and more friends if you share a link. One link. +

+ +

+ +

+
+

Your referral count: 0

+ Click to Share +

Or copy & paste your referral link to others:
morningbrew.com/daily/r/?kid=72b509de

+
+
+ +
+ + + + +
+ + + + + +
+ + + + +
+

+

+

+ + + Answer + + +

+
+ + + + +
+
+

1. Cinderella

+

2. Office Space

+

3. The Social Network

+

4. The 40-Year-Old Virgin

+

5. My Cousin Vinny

+


+
+
+
+ +
+ + + +
+ + + + + +
+ + + + +
+

✢ A Note From Facet Wealth

+

Facet Wealth is an SEC Registered Investment Advisor headquartered in Baltimore, Maryland. This is not an offer to sell securities or the solicitation of an offer to purchase securities. This is not investment, financial, legal, or tax advice.

+

*Two months free offer is only valid for an annual fee paid at the time of signing.

+
+
+
+ + + + + +
+ + + + + + + + + + + + +
+ + + + + + + + +
+

+ Written by + Abigail Rubenstein, Max Knoblauch, and Matty Merritt +

+

+ Was this email forwarded to you? Sign up + here. +

+
+

+ WANT MORE BREW? +

+

+ + Tips for smarter living → + +

+
    +
  • + Money Scoop: your personal finance upgrade + +
  • +
  • + Sidekick: lifestyle recs from every corner of the internet + +
  • +
+

+ + + YouTube + +

+

+ + Accelerate Your Career with our Courses → + +

+ +
+
+ ADVERTISE + // + CAREERS + // + SHOP + // + FAQ +
+
+ Update your email preferences or unsubscribe + here. +
+ View our privacy policy + here. +
+
+ Copyright © + 2022 + Morning Brew. All rights reserved. +
+ 22 W 19th St, 4th Floor, New York, NY 10011 +
+ +
+ +
+ From 6435a2024630a56aa062a6eaefe4afda281b70df Mon Sep 17 00:00:00 2001 From: Hongbo Wu Date: Wed, 14 Sep 2022 16:55:57 +0800 Subject: [PATCH 08/39] Remove social links --- packages/readabilityjs/Readability.js | 8 +- .../newsletters/morning-brew/expected.html | 836 +++++++++--------- 2 files changed, 404 insertions(+), 440 deletions(-) diff --git a/packages/readabilityjs/Readability.js b/packages/readabilityjs/Readability.js index c882451d1..adc1ef57f 100644 --- a/packages/readabilityjs/Readability.js +++ b/packages/readabilityjs/Readability.js @@ -831,6 +831,9 @@ Readability.prototype = { * @return void **/ _prepArticle: async function (articleContent) { + // replace tables whose role is not presentation with divs for newsletters + this._keepTables && this._replaceNodeTags(this._getAllNodesWithTag(articleContent, ["table"]).filter(t => t.getAttribute("role") !== "presentation"), "div"); + await this._createPlaceholders(articleContent); this._cleanStyles(articleContent); // Check for data tables before we continue, to avoid removing items in @@ -874,7 +877,7 @@ Readability.prototype = { // Do these last as the previous stuff may have removed junk // that will affect these - !this._keepTables && this._cleanConditionally(articleContent, "table"); + this._cleanConditionally(articleContent, "table"); this._cleanConditionally(articleContent, "ul"); this._cleanConditionally(articleContent, "div"); @@ -918,9 +921,6 @@ Readability.prototype = { } }); - // replace tables whose role is not presentation with divs for newsletters - this._keepTables && this._replaceNodeTags(this._getAllNodesWithTag(articleContent, ["table"]).filter(t => t.getAttribute("role") !== "presentation"), "div"); - // Final clean up of nodes that might pass readability conditions but still contain redundant text // For example, this article (https://www.sciencedirect.com/science/article/abs/pii/S0047248498902196) // has a "View full text" anchor at the bottom of the page diff --git a/packages/readabilityjs/test/test-pages/newsletters/morning-brew/expected.html b/packages/readabilityjs/test/test-pages/newsletters/morning-brew/expected.html index 2db2e09f0..21a6f6f06 100644 --- a/packages/readabilityjs/test/test-pages/newsletters/morning-brew/expected.html +++ b/packages/readabilityjs/test/test-pages/newsletters/morning-brew/expected.html @@ -9,24 +9,20 @@
-
+
-
+
September 13, 2022 - View Online | Sign Up | Shop +

+ + Morning Brew + +

@@ -38,9 +34,15 @@
+
+

Good morning. Apple’s iOS 16 dropped for iPhone users yesterday, and once you download the software update you’ll be able to edit an iMessage within 15 minutes of sending it and delete one within two minutes. While that may be useful for most people, the only text we’ve ever regretted sending was, “Sure I’ll go to your friend’s improv show.”

+

Max Knoblauch, Abby Rubenstein, Matty Merritt

+
+
-
-

MARKETS

-
-
+
+
+

MARKETS

+
-
-

+1.27%

-
@@ -99,9 +102,6 @@

4,110.41

-
-

+1.06%

-
@@ -123,9 +123,6 @@

32,381.34

-
-

+0.71%

-
@@ -147,9 +144,6 @@

3.358%

-
-

+4.3 bps

-
@@ -171,9 +165,6 @@

$22,311.05

-
-

+3.05%

-
@@ -195,9 +186,6 @@

$163.43

-
-

+3.85%

-
@@ -236,412 +224,388 @@ -
+
-
-

AUTO

-

- Nikola founder’s fraud trial gets rolling -

-
- - woman with back to camera looking at paintings - Stefan Puchner/Getty Images -
-
-

The fraud trial of Trevor Milton, the founder and former CEO of electric truck company Nikola Motors, began yesterday with jury selection. Milton, who pleaded not guilty in the case, stands accused of lying about his company’s progress in developing electric vehicles, leading to huge losses for investors.

-

The case—a shoo-in for Hulu’s next ripped-from-the-headlines original that everyone at work except you is watching—is seen as a cautionary tale of buying into the hype around companies before they deliver a single product.

-

So how did Nikola go from the third-largest auto company in the US in 2020 with a $33 billion market value to just a $2.3 billion market value as of yesterday with an indicted founder?

-

A hype-y road

-

Milton founded Nikola in 2015, capitalizing on investor fervor around EVs, particularly those made by Elon Musk’s Tesla. In June 2020, the company went public via a SPAC. Prosecutors claim that Milton misled investors by making false claims about Nikola’s ability to produce hydrogen and by releasing a now-infamous promotional video that showed a moving Nikola truck (not disclosed: the truck was merely rolling downhill in neutral).

-

Beyond simply drumming up name association with retail investor darling Tesla, Milton also deliberately targeted less knowledgeable investors by promoting Nikola’s stock on social media and in interviews, prosecutors allege.

-

And those retail investors ultimately bore the brunt of Nikola’s losses when its stock dropped 40% following Milton’s resignation in September 2020, days after an activist short seller published a scathing report calling the company an “intricate fraud built on dozens of lies.”

-

Where things stand now

-

In December, Nikola agreed to pay a $125 million penalty to settle an SEC fraud investigation. The company, which is still around and has begun production on a battery-powered semi-truck model, reported a net loss of $173 million in the second quarter.

-

Before stepping down, Milton purchased a $32.5 million Utah ranch and a jet, and since his resignation, he has sold more than $300 million in company stock. The main charge against him carries a maximum sentence of 25 years, though he’s likely to see much less time, if he’s even convicted.—MK

-
- -

- - - - - - - - - - - - -

- -
-
-
-

TOGETHER WITH FACET WEALTH

-

- - Money on everyone’s mind - -

-
-
-

In our current economic state, there’s a lot of attention on money—how much it’s worth, how much we pay in interest, inflation, the list goes on.

-

And if all that news has stirred up questions like, “Am I doing the right things with my money so that I can get the most out of life?” Facet can help.

-

Their CERTIFIED FINANCIAL PLANNER™ professionals work with you 1:1 for an affordable fixed fee to answer questions about your entire financial life, not just basic money management. Plus, their proprietary tech helps you get the full picture of where you’re at financially and where you’re going.

-

Brew readers get 2 free* months in their first year of financial planning. Sign up here.

- -

- - - - - - - - - -

- -
-
-
-

WORLD

-

- - Tour de headlines - -

-
- President Biden - Mandel Ngan/Getty Images -
-

Biden goes for a “moonshot” on cancer. Referencing JFK’s famous speech on its 60th anniversary, President Biden said yesterday he’s laying out his “moonshot” for eradicating cancer. The plan involves a new department focused on health and biomedical research, executive orders beefing up domestic biomanufacturing, and a government group called the “Cancer Cabinet.” In hopeful news that might help move things along, drugmaker Amgen reported its new cancer drug was more effective in some areas than chemo for late-stage lung cancer patients.

-

Goldman Sachs to lay off hundreds. The bank plans to reinstate annual employee culls, which it had suspended during the pandemic, and may start cutting jobs as soon as next week. Typically, Goldman targets between 1% and 5% of its workforce for layoffs each year, and this round is expected to be at the lower end of the spectrum (current headcount: 47,000). The expected layoffs come after Goldman’s profits fell by nearly half in the second quarter compared to the year before as deal-making slowed.

-

15,000 nurses walked off the job in Minnesota. The nurses involved in the largest-ever private sector nursing strike in the US plan to stay out for three days to demand fixes for understaffing, as well as higher pay. Though this strike targets 13 hospitals in the Minneapolis–St. Paul area, facilities across the country had trouble finding enough nurses even before the pandemic. Unions in at least two other states have also authorized work stoppages in the past month.

-
-
-
-

EDUCATION

-

- The list that no one likes is out -

-
- - Students walking on campus in the fall. - Jon Lovette/Getty Images -
-
-

US News & World Report released its yearly ranking of the best colleges in the country yesterday. But this year’s list comes amid a growing number of complaints about how the scores that mean a lot to wide-eyed future loan borrowers (and the administrators who will eventually ask them for money) are calculated.

-

Besides controversial criteria like incoming students’ SAT scores and the level of alumni donations, one of the main problems critics have with the list is that it attributes 20% of its ranking formula to what amounts to basically a popularity contest. US News sends a yearly survey to college admins asking them to rate other schools’ “academic quality.”

-

Even Education Secretary Miguel Cardona, although not referring to the US News list directly, said last month that college rankings that value reputation above things like economic mobility are “a joke.”

-

There’s even more drama this year…Columbia University dropped from No. 2 to No. 18 because it didn’t submit any data while it investigated a math professor’s claims that the school might be fudging some numbers. On Friday, the university admitted to the fudging.

-

Final fun fact: 19 of the top 20 schools on this year’s list cost $55,000+ per year to attend.—MM

-
- -

- - - - - - - - - - - - -

- -
-
-
-

FOOD & BEVERAGE

-

Starbucks puts the ‘mint’ in peppermint

-
- - A girl drinks from a Starbucks cup while looking at her phone - Zhang Peng/Getty Images -
-
-

The Starbucks customer loyalty program inspires more devotion than the Mocha Joe’s punch card that always gets lost in your wallet. Now the coffee chain is trying to spark even more loyalty by taking its app-based program to the next technological level with NFTs.

-

The company unveiled its Starbucks Odyssey program yesterday, a platform using Polygon, an Ethereum network, that coffee drinkers can log into with their existing program credentials to play games or take challenges to earn non-fungible tokens. They’ll also be available for purchase via credit card, no crypto necessary.

-

These NFTs, called “journey stamps,” will unlock rewards for users that go beyond the typical free coffee, like events or trips.

-

Customers can join a waitlist now, but only time will tell whether people will be clambering for coffee-themed digital art. The project is a relatively recent one—an exec told TechCrunch it’s only been in the works for six months, but in that time the market for NFTs has changed drastically. Trading volume at OpenSea, the most popular NFT marketplace, plunged 99% from early May to late August, per Fortune.

-

Zoom out: The Web3 push is one of many big changes coming to Starbucks. A new leader will succeed interim CEO Howard Schultz, but not before Schultz lays out a new strategy at today’s investor day that’s aimed at boosting efficiency.—AR

-
- -

- - - - - - - - - - - - -

- -
-
- - A phone with an Instagram Reels icon and a 0 views notification - Francis Scialabba -
-

Stat: People spend 17.6 million hours a day watching Instagram Reels, just a fraction of the 197.8 million hours users waste daily on TikTok, according to an internal Meta document viewed by the Wall Street Journal. While Reels might seem inescapable in your feed, engagement is trending down, dropping 13.6% in August from the month before, the document showed.

-

Quote: “Nothing can justify the persistence of this fundamental abuse of human rights.”

-

The director-general of the UN’s labor standards agency yesterday called for an “all-hands-on-deck approach” to combating modern slavery after releasing a report that found 50 million people were living in modern slavery—28 million in forced labor and 22 million in forced marriages in 2021. That’s 10 million more than in 2016.

-

Read: Johnson & Johnson and a new war on consumer protection. (The New Yorker)

-
-
-
-

WHAT ELSE IS BREWING

-
-
-
    -
  • - Ukraine took back territory from Russia all the way to its northeastern border in some areas, leading one former member of Russia’s parliament to call for peace talks on live TV. -
  • -
  • - Streaming services had a good night at the Emmys, with HBO Max’s Succession winning best drama and The White Lotus nabbing the statue for best limited series. The Apple TV+ series Ted Lasso took the top prize for a comedy series. -
  • -
  • - Twitter whistleblower Peiter “Mudge” Zatko will testify today before the Senate Judiciary Committee about the platform’s privacy and security vulnerabilities. -
  • -
  • - Elon Musk’s college girlfriend is auctioning off mementos she saved from the relationship, including photos and a signed birthday card. -
  • -
-
-
-
-

BREW'S BETS

-
-
-

Taking back texts: A complete guide to Apple’s new operating system, which lets you personalize your lock screen and a lot more.

-

Sleight of hand: Watch the reigning world champion of card magic (a real title) do his thing.

-

Interesting pod alert: After years on a personal odyssey, journalist Lauren Ober found out she was autistic. The Loudest Girl in the World shares Lauren’s journey once she was diagnosed. Listen now.

-

Just like ⌘C, ⌘V: With CopyTrader,™ eToro’s most popular feature, you can automatically copy the moves of real investors in real time. No more second-guessing your crypto decisions. Get started today.*

- - -

*This is sponsored advertising content.

-
-
-
-

GAMES

-

- - The puzzle section - -

-
-
-

Brew Mini: If you know what kind of car James Bond drives, you’re more than 10% of the way to completing today’s Mini. Solve it here.

-

Tagline trivia

-

There’s nothing cringier than a movie tagline. We’ll give you the tagline for a film, and you have to name the film.

-
    -
  1. “Midnight never strikes when you’re in love.”
  2. -
  3. “Work sucks.”
  4. -
  5. “You don’t get to 500 million friends without making a few enemies.”
  6. -
  7. “The longer you wait, the harder it gets.”
  8. -
  9. “A comedy of trial and error.”
  10. -
-
-
- - - How to save money in a recession - -
-

Saving at any point can be a challenge. Saving during an economic downturn? Mission impossible. But Anish Mitra uses his knowledge from 10 years on Wall Street to teach you how saving amid slowing economic growth doesn't have to be difficult. Watch here.

-

Check out more from the Brew:

-

On Business Casual: Nora chats with Alex Ma, the CEO and co-founder of Poparazzi, an app that allows you to build your friends’ profile pages instead of your own. Listen or watch here.

-

Ready to jumpstart your career but don’t know where to start? We’ve got you covered. Take our short quiz and find out which Morning Brew Accelerator is right for you.

-
-
-
-

- - Answer - -

-
-
-

1. Cinderella

-

2. Office Space

-

3. The Social Network

-

4. The 40-Year-Old Virgin

-

5. My Cousin Vinny

-
-
-
-

✢ A Note From Facet Wealth

-

Facet Wealth is an SEC Registered Investment Advisor headquartered in Baltimore, Maryland. This is not an offer to sell securities or the solicitation of an offer to purchase securities. This is not investment, financial, legal, or tax advice.

-

*Two months free offer is only valid for an annual fee paid at the time of signing.

-
-
-

Written by Abigail Rubenstein, Max Knoblauch, and Matty Merritt -

-

Was this email forwarded to you? Sign up here.

-
- ADVERTISE // CAREERS // SHOP // FAQ -

Update your email preferences or unsubscribe here.
View our privacy policy here.

-

Copyright © 2022 Morning Brew. All rights reserved.
22 W 19th St, 4th Floor, New York, NY 10011

+

AUTO

+

+ Nikola founder’s fraud trial gets rolling +

+
+

The fraud trial of Trevor Milton, the founder and former CEO of electric truck company Nikola Motors, began yesterday with jury selection. Milton, who pleaded not guilty in the case, stands accused of lying about his company’s progress in developing electric vehicles, leading to huge losses for investors.

+

The case—a shoo-in for Hulu’s next ripped-from-the-headlines original that everyone at work except you is watching—is seen as a cautionary tale of buying into the hype around companies before they deliver a single product.

+

So how did Nikola go from the third-largest auto company in the US in 2020 with a $33 billion market value to just a $2.3 billion market value as of yesterday with an indicted founder?

+

A hype-y road

+

Milton founded Nikola in 2015, capitalizing on investor fervor around EVs, particularly those made by Elon Musk’s Tesla. In June 2020, the company went public via a SPAC. Prosecutors claim that Milton misled investors by making false claims about Nikola’s ability to produce hydrogen and by releasing a now-infamous promotional video that showed a moving Nikola truck (not disclosed: the truck was merely rolling downhill in neutral).

+

Beyond simply drumming up name association with retail investor darling Tesla, Milton also deliberately targeted less knowledgeable investors by promoting Nikola’s stock on social media and in interviews, prosecutors allege.

+

And those retail investors ultimately bore the brunt of Nikola’s losses when its stock dropped 40% following Milton’s resignation in September 2020, days after an activist short seller published a scathing report calling the company an “intricate fraud built on dozens of lies.”

+

Where things stand now

+

In December, Nikola agreed to pay a $125 million penalty to settle an SEC fraud investigation. The company, which is still around and has begun production on a battery-powered semi-truck model, reported a net loss of $173 million in the second quarter.

+

Before stepping down, Milton purchased a $32.5 million Utah ranch and a jet, and since his resignation, he has sold more than $300 million in company stock. The main charge against him carries a maximum sentence of 25 years, though he’s likely to see much less time, if he’s even convicted.—MK

+
+ + +
+
+
+

In our current economic state, there’s a lot of attention on money—how much it’s worth, how much we pay in interest, inflation, the list goes on.

+

And if all that news has stirred up questions like, “Am I doing the right things with my money so that I can get the most out of life?” Facet can help.

+

Their CERTIFIED FINANCIAL PLANNER™ professionals work with you 1:1 for an affordable fixed fee to answer questions about your entire financial life, not just basic money management. Plus, their proprietary tech helps you get the full picture of where you’re at financially and where you’re going.

+

Brew readers get 2 free* months in their first year of financial planning. Sign up here.

+ + +
+ President Biden + Mandel Ngan/Getty Images +
+
+
+

Biden goes for a “moonshot” on cancer. Referencing JFK’s famous speech on its 60th anniversary, President Biden said yesterday he’s laying out his “moonshot” for eradicating cancer. The plan involves a new department focused on health and biomedical research, executive orders beefing up domestic biomanufacturing, and a government group called the “Cancer Cabinet.” In hopeful news that might help move things along, drugmaker Amgen reported its new cancer drug was more effective in some areas than chemo for late-stage lung cancer patients.

+

Goldman Sachs to lay off hundreds. The bank plans to reinstate annual employee culls, which it had suspended during the pandemic, and may start cutting jobs as soon as next week. Typically, Goldman targets between 1% and 5% of its workforce for layoffs each year, and this round is expected to be at the lower end of the spectrum (current headcount: 47,000). The expected layoffs come after Goldman’s profits fell by nearly half in the second quarter compared to the year before as deal-making slowed.

+

15,000 nurses walked off the job in Minnesota. The nurses involved in the largest-ever private sector nursing strike in the US plan to stay out for three days to demand fixes for understaffing, as well as higher pay. Though this strike targets 13 hospitals in the Minneapolis–St. Paul area, facilities across the country had trouble finding enough nurses even before the pandemic. Unions in at least two other states have also authorized work stoppages in the past month.

+
+
+
+
+

EDUCATION

+

+ The list that no one likes is out +

+
+
+

US News & World Report released its yearly ranking of the best colleges in the country yesterday. But this year’s list comes amid a growing number of complaints about how the scores that mean a lot to wide-eyed future loan borrowers (and the administrators who will eventually ask them for money) are calculated.

+

Besides controversial criteria like incoming students’ SAT scores and the level of alumni donations, one of the main problems critics have with the list is that it attributes 20% of its ranking formula to what amounts to basically a popularity contest. US News sends a yearly survey to college admins asking them to rate other schools’ “academic quality.”

+

Even Education Secretary Miguel Cardona, although not referring to the US News list directly, said last month that college rankings that value reputation above things like economic mobility are “a joke.”

+

There’s even more drama this year…Columbia University dropped from No. 2 to No. 18 because it didn’t submit any data while it investigated a math professor’s claims that the school might be fudging some numbers. On Friday, the university admitted to the fudging.

+

Final fun fact: 19 of the top 20 schools on this year’s list cost $55,000+ per year to attend.—MM

+
+ + +
+
+
+

FOOD & BEVERAGE

+

Starbucks puts the ‘mint’ in peppermint

+
+
+

The Starbucks customer loyalty program inspires more devotion than the Mocha Joe’s punch card that always gets lost in your wallet. Now the coffee chain is trying to spark even more loyalty by taking its app-based program to the next technological level with NFTs.

+

The company unveiled its Starbucks Odyssey program yesterday, a platform using Polygon, an Ethereum network, that coffee drinkers can log into with their existing program credentials to play games or take challenges to earn non-fungible tokens. They’ll also be available for purchase via credit card, no crypto necessary.

+

These NFTs, called “journey stamps,” will unlock rewards for users that go beyond the typical free coffee, like events or trips.

+

Customers can join a waitlist now, but only time will tell whether people will be clambering for coffee-themed digital art. The project is a relatively recent one—an exec told TechCrunch it’s only been in the works for six months, but in that time the market for NFTs has changed drastically. Trading volume at OpenSea, the most popular NFT marketplace, plunged 99% from early May to late August, per Fortune.

+

Zoom out: The Web3 push is one of many big changes coming to Starbucks. A new leader will succeed interim CEO Howard Schultz, but not before Schultz lays out a new strategy at today’s investor day that’s aimed at boosting efficiency.—AR

+
+ + +
+ A phone with an Instagram Reels icon and a 0 views notification + Francis Scialabba +
+
+
+

Stat: People spend 17.6 million hours a day watching Instagram Reels, just a fraction of the 197.8 million hours users waste daily on TikTok, according to an internal Meta document viewed by the Wall Street Journal. While Reels might seem inescapable in your feed, engagement is trending down, dropping 13.6% in August from the month before, the document showed.

+

Quote: “Nothing can justify the persistence of this fundamental abuse of human rights.”

+

The director-general of the UN’s labor standards agency yesterday called for an “all-hands-on-deck approach” to combating modern slavery after releasing a report that found 50 million people were living in modern slavery—28 million in forced labor and 22 million in forced marriages in 2021. That’s 10 million more than in 2016.

+

Read: Johnson & Johnson and a new war on consumer protection. (The New Yorker)

+
+
+
+
+

SPONSORED BY ACCRUE X VINCERO

+
+

Style meets savings. With Accrue Savings, you can earn cash rewards from brands like Vincero by saving up for your purchases without relying on credit. Elevate your everyday carry with Vincero’s ethically crafted, premium lifestyle accessories and earn 15% in cash rewards toward your purchase when you save up for your Vincero accessories with an Accrue Savings account. Sign up here in just a few minutes today.

+ + +
+
+
+

WHAT ELSE IS BREWING

+
+
    +
  • + Ukraine took back territory from Russia all the way to its northeastern border in some areas, leading one former member of Russia’s parliament to call for peace talks on live TV. +
  • +
  • + Streaming services had a good night at the Emmys, with HBO Max’s Succession winning best drama and The White Lotus nabbing the statue for best limited series. The Apple TV+ series Ted Lasso took the top prize for a comedy series. +
  • +
  • + Twitter whistleblower Peiter “Mudge” Zatko will testify today before the Senate Judiciary Committee about the platform’s privacy and security vulnerabilities. +
  • +
  • + Elon Musk’s college girlfriend is auctioning off mementos she saved from the relationship, including photos and a signed birthday card. +
  • +
+
+
+
+

BREW'S BETS

+
+
+

Taking back texts: A complete guide to Apple’s new operating system, which lets you personalize your lock screen and a lot more.

+

Sleight of hand: Watch the reigning world champion of card magic (a real title) do his thing.

+

Interesting pod alert: After years on a personal odyssey, journalist Lauren Ober found out she was autistic. The Loudest Girl in the World shares Lauren’s journey once she was diagnosed. Listen now.

+

Just like ⌘C, ⌘V: With CopyTrader,™ eToro’s most popular feature, you can automatically copy the moves of real investors in real time. No more second-guessing your crypto decisions. Get started today.*

+ + +

*This is sponsored advertising content.

+
+
+
+
+
+

Brew Mini: If you know what kind of car James Bond drives, you’re more than 10% of the way to completing today’s Mini. Solve it here.

+

Tagline trivia

+

There’s nothing cringier than a movie tagline. We’ll give you the tagline for a film, and you have to name the film.

+
    +
  1. “Midnight never strikes when you’re in love.”
  2. +
  3. “Work sucks.”
  4. +
  5. “You don’t get to 500 million friends without making a few enemies.”
  6. +
  7. “The longer you wait, the harder it gets.”
  8. +
  9. “A comedy of trial and error.”
  10. +
+
+
+ + How to save money in a recession + +
+
+
+

Saving at any point can be a challenge. Saving during an economic downturn? Mission impossible. But Anish Mitra uses his knowledge from 10 years on Wall Street to teach you how saving amid slowing economic growth doesn't have to be difficult. Watch here.

+

Check out more from the Brew:

+

On Business Casual: Nora chats with Alex Ma, the CEO and co-founder of Poparazzi, an app that allows you to build your friends’ profile pages instead of your own. Listen or watch here.

+

Ready to jumpstart your career but don’t know where to start? We’ve got you covered. Take our short quiz and find out which Morning Brew Accelerator is right for you.

+
+
+
+
+
+

1. Cinderella

+

2. Office Space

+

3. The Social Network

+

4. The 40-Year-Old Virgin

+

5. My Cousin Vinny

+
+
+
+
+

✢ A Note From Facet Wealth

+

Facet Wealth is an SEC Registered Investment Advisor headquartered in Baltimore, Maryland. This is not an offer to sell securities or the solicitation of an offer to purchase securities. This is not investment, financial, legal, or tax advice.

+

*Two months free offer is only valid for an annual fee paid at the time of signing.

+
- - - - - - - -
- - -

Nasdaq

-
-

12,266.41

-
-
-

+1.27%

-
-
-
- - - - - - - -
- - -

S&P

-
-

4,110.41

-
-
-

+1.06%

-
-
+
- - - - - - - -
- - -

Dow

-
-

32,381.34

-
-
-

+0.71%

-
-
+

Nasdaq

- - - - - - - -
- - -

10-Year

-
-

3.358%

-
-
-

+4.3 bps

-
-
+

12,266.41

- - - - - - - -
- - -

Bitcoin

-
-

$22,311.05

-
-
-

+3.05%

-
-
-
- - - - - - - -
- - -

Apple

-
-

$163.43

-
-
-

+3.85%

-
-
-
-

*Stock data as of market close, cryptocurrency data as of 11:00pm ET. Here's what these numbers mean. -

-
-
    -
  • - Markets: Stocks continued to rally yesterday, with the S&P 500 posting its biggest four-day gain since June. Helping to boost markets was Apple, which rose on bullish news about preorders for the iPhone 14 Pro Max. -
  • -
  • - Economy: Happy CPI Day to all who celebrate. The consumer price index report that drops this morning is expected to show that inflation fell to 8% last month. It’s the last major piece of data that will arrive before the Fed decides how big to go on interest rate hikes next week. -
  • -
-
-
+ +
-

AUTO

-

- Nikola founder’s fraud trial gets rolling -

+
+
+ + +

S&P

+
+

4,110.41

+
-
-

The fraud trial of Trevor Milton, the founder and former CEO of electric truck company Nikola Motors, began yesterday with jury selection. Milton, who pleaded not guilty in the case, stands accused of lying about his company’s progress in developing electric vehicles, leading to huge losses for investors.

-

The case—a shoo-in for Hulu’s next ripped-from-the-headlines original that everyone at work except you is watching—is seen as a cautionary tale of buying into the hype around companies before they deliver a single product.

-

So how did Nikola go from the third-largest auto company in the US in 2020 with a $33 billion market value to just a $2.3 billion market value as of yesterday with an indicted founder?

-

A hype-y road

-

Milton founded Nikola in 2015, capitalizing on investor fervor around EVs, particularly those made by Elon Musk’s Tesla. In June 2020, the company went public via a SPAC. Prosecutors claim that Milton misled investors by making false claims about Nikola’s ability to produce hydrogen and by releasing a now-infamous promotional video that showed a moving Nikola truck (not disclosed: the truck was merely rolling downhill in neutral).

-

Beyond simply drumming up name association with retail investor darling Tesla, Milton also deliberately targeted less knowledgeable investors by promoting Nikola’s stock on social media and in interviews, prosecutors allege.

-

And those retail investors ultimately bore the brunt of Nikola’s losses when its stock dropped 40% following Milton’s resignation in September 2020, days after an activist short seller published a scathing report calling the company an “intricate fraud built on dozens of lies.”

-

Where things stand now

-

In December, Nikola agreed to pay a $125 million penalty to settle an SEC fraud investigation. The company, which is still around and has begun production on a battery-powered semi-truck model, reported a net loss of $173 million in the second quarter.

-

Before stepping down, Milton purchased a $32.5 million Utah ranch and a jet, and since his resignation, he has sold more than $300 million in company stock. The main charge against him carries a maximum sentence of 25 years, though he’s likely to see much less time, if he’s even convicted.—MK

-
- - -
+
+
+ + +

Dow

+
+

32,381.34

+
+
+
+
+ + +

10-Year

+
+

3.358%

+
+
+
+
+ + +

Bitcoin

+
+

$22,311.05

+
+
+
+
+ + +

Apple

+
+

$163.43

+
+
+

*Stock data as of market close, cryptocurrency data as of 11:00pm ET. Here's what these numbers mean. +

+
+
    +
  • + Markets: Stocks continued to rally yesterday, with the S&P 500 posting its biggest four-day gain since June. Helping to boost markets was Apple, which rose on bullish news about preorders for the iPhone 14 Pro Max. +
  • +
  • + Economy: Happy CPI Day to all who celebrate. The consumer price index report that drops this morning is expected to show that inflation fell to 8% last month. It’s the last major piece of data that will arrive before the Fed decides how big to go on interest rate hikes next week. +
  • +
+
+
+
+
+

AUTO

+

+ Nikola founder’s fraud trial gets rolling +

+
+
+

The fraud trial of Trevor Milton, the founder and former CEO of electric truck company Nikola Motors, began yesterday with jury selection. Milton, who pleaded not guilty in the case, stands accused of lying about his company’s progress in developing electric vehicles, leading to huge losses for investors.

+

The case—a shoo-in for Hulu’s next ripped-from-the-headlines original that everyone at work except you is watching—is seen as a cautionary tale of buying into the hype around companies before they deliver a single product.

+

So how did Nikola go from the third-largest auto company in the US in 2020 with a $33 billion market value to just a $2.3 billion market value as of yesterday with an indicted founder?

+

A hype-y road

+

Milton founded Nikola in 2015, capitalizing on investor fervor around EVs, particularly those made by Elon Musk’s Tesla. In June 2020, the company went public via a SPAC. Prosecutors claim that Milton misled investors by making false claims about Nikola’s ability to produce hydrogen and by releasing a now-infamous promotional video that showed a moving Nikola truck (not disclosed: the truck was merely rolling downhill in neutral).

+

Beyond simply drumming up name association with retail investor darling Tesla, Milton also deliberately targeted less knowledgeable investors by promoting Nikola’s stock on social media and in interviews, prosecutors allege.

+

And those retail investors ultimately bore the brunt of Nikola’s losses when its stock dropped 40% following Milton’s resignation in September 2020, days after an activist short seller published a scathing report calling the company an “intricate fraud built on dozens of lies.”

+

Where things stand now

+

In December, Nikola agreed to pay a $125 million penalty to settle an SEC fraud investigation. The company, which is still around and has begun production on a battery-powered semi-truck model, reported a net loss of $173 million in the second quarter.

+

Before stepping down, Milton purchased a $32.5 million Utah ranch and a jet, and since his resignation, he has sold more than $300 million in company stock. The main charge against him carries a maximum sentence of 25 years, though he’s likely to see much less time, if he’s even convicted.—MK

+
+ + +