With Donald Trump gone from the White House and banned from the major social media platforms, the Supreme Court on Monday finally brought an end to the long-running litigation over the former president’s practice of blocking critics from his Twitter account, declaring the case to be moot.

The lawsuit, which we and our colleagues filed six months into Mr. Trump’s tenure, will likely be remembered as an artifact of the Trump era—a collision of the First Amendment, the pathologies of social media and a thin-skinned, attention-craving demagogue indifferent to constitutional limits on his authority.

But the case will have lasting effects, even if the appeals court decision holding that Mr. Trump acted unconstitutionally has now been vacated. The case has broad implications for other officials and for platforms other than Twitter, and it will shape the digital public sphere—in valuable ways—for a long time to come.

The case grew out of Mr. Trump’s decision to conduct his presidency by tweet. From the beginning, he used his Twitter account to make cabinet appointments, announce policy initiatives and engage with foreign leaders. He used it to harangue and demean his perceived adversaries, including journalists and former officials of his own administration.

Harnessing Twitter’s interactive features, he used his account to communicate directly with the public, unfiltered by what he called the “fake news media.” To his critics—and to some of his supporters, too—Mr. Trump’s Twitter habits were undignified or worse, an insult to the office. He saw things differently. “My use of social media is not Presidential—it’s MODERN DAY PRESIDENTIAL,” he tweeted in the summer of 2017.

The core proposition of the lawsuit was that Mr. Trump’s account had become a public forum for First Amendment purposes because it was a space that a government official had opened to the public for expression. It’s well established that the First Amendment prohibits public officials from excluding citizens from public forums such as city council meetings, school board meetings and legislators’ town halls because of their political viewpoints. We argued that officials who use their social media accounts as extensions of their offices should be subject to the same rule.

Some legal scholars questioned whether the public forum doctrine should be applied on private platforms. We pointed out that courts had applied the doctrine to private property before, and that the alternative would be to allow city councils and other public bodies to evade the First Amendment simply by moving their meetings to hotel conference rooms. The district court and the appeals court ultimately saw things our way.

After the district court issued a decision in our case, the White House unblocked our clients and dozens of others who had been locked out of Mr. Trump’s comment threads after they criticized the president or his policies.

Our case focused on the former president, but its implications are broader. Public officials and government agencies all over the country now use social media to communicate with the public. Representative Alexandria Ocasio-Cortez, Democrat of New York, has used her Twitter account to solicit her constituents’ opinions about her legislative agenda. The Centers for Disease Control and Prevention says its Twitter account is for sharing “daily credible health & safety updates.” Florida’s Division of Emergency Management uses its account to warn residents of hurricanes and inform them about emergency relief.

When officials and agencies use interactive social media in these ways, they create spaces that play important functions in our democracy. Their accounts can be sources of official information, channels through which citizens can petition their representatives for “redress of grievances” (as the First Amendment puts it) and forums in which citizens can exchange information and ideas. The same reasoning that led the appeals court to hold that Mr. Trump couldn’t constitutionally block critics from his Twitter account makes clear that other government actors who engage in similar conduct do so at their peril.

In fact, since we filed the case, almost a dozen other courts have applied the First Amendment’s public forum doctrine in cases involving the social media accounts of legislators, mayors, city councilors and sheriffs. The effect of these judicial rulings extends beyond the litigants. Made aware of these rulings, many public officials who were excluding people from their accounts based on viewpoint have voluntarily changed their practices.

These rulings also have implications for government-run accounts on platforms other than Twitter. The Army and Navy have been using Twitch, a gaming platform, to livestream e-sports as part of their recruiting efforts. Those who watch these multiplayer video games on the military’s Twitch channels can also exchange messages in moderated forums. The exchanges can be wide-ranging, but until recently moderators made a practice of ejecting participants who asked questions about war crimes. Moderators changed course only after the court’s decision in Mr. Trump’s case was brought to their attention.

These developments in the law, and in the practice of government agencies and officials, should be welcomed. The technology may be new, but the rule that government actors can’t exclude people from public forums on the basis of viewpoint has been practically synonymous with the First Amendment for decades. It’s a good thing that speakers who were previously silenced can now voice their dissent, that public officials who were previously shielded from the views of their constituents are now exposed to them and that digital forums that were previously echo chambers are now more ideologically diverse.

Over the next years, the courts, legislatures and the public will have to answer a slew of thorny questions about free speech and social media, including about the extent of Congress’s power to regulate the companies. As Justice Clarence Thomas noted Monday in connection with the Supreme Court’s order, some of these questions were presented starkly by the major social media companies’ decision to deplatform Mr. Trump after the siege on the Capitol. In comparison with these questions, the one presented by our case was easy.

But if the proposition that government officials may not exclude speakers from public forums because of their political views is straightforward, it’s also foundational to our democracy. Even those disinclined to thank Mr. Trump for anything can perhaps thank him for having given the courts an occasion to reaffirm this basic principle.