When Barack Obama left office, his final approval rating in Gallup's poll was 59 percent — positively splendid in this hyperpartisan age. Obama passed some significant legislation and avoided the kind of major scandals that befell many of his predecessors. And despite Democrats getting thumped in the 2016 election, Obama could say fairly that his party's positions on important issues were popular and getting more so. Majorities of Americans support a strong government role in health care, oppose trickle-down economics, and believe in marriage equality.

Of course, it wasn't all roses. During Obama's time as president, the Democratic Party lost huge ground at the state and local level. They held 968 fewer state legislative seats than they had when Obama took office, nearly three times as many as Republicans lost under George W. Bush, and almost twice as many as Democrats lost under Bill Clinton. They gave up the Senate and the House, as well as almost two dozen governorships. By almost any measure, the party had been drastically weakened over Obama's eight years.

You can debate whether Obama could have done much to change that, but it does raise an ominous question for Republicans: How is the presidency of Donald Trump going to affect the GOP?

Some have indulged in overheated rhetoric on this question, claiming that the GOP's indulgence of Trump will destroy it forevermore. That's just silly; when Trump leaves office, either in three years or seven, the GOP will still be one of our two great parties. But what will Trump have done to them?

Just a year into Trump's presidency it's hard to know for sure. But you'd have to be an awfully optimistic Republican not to think that your party will stumble from the Trump presidency bruised and battered. Every president produces a backlash, but the surge of Democratic activism that greeted Trump's election is looking to be even bigger than the Tea Party was. Many Republicans in Washington now think it's inevitable that the Democrats will take back the House, and if they don't get the Senate this year, they might well in 2020. The pattern of downballot losses for the president's party could put Democrats in the position Republicans were in 2010, with control of state houses after the Census, allowing them to draw new district lines in their favor.

Then there's the question of what the Republican Party represents. In 2016, Trump accomplished something few thought was possible: He cobbled together a victory almost entirely on a crumbling demographic base. It was widely assumed that a Republican candidate who failed to appeal to the parts of the United States that are growing as a portion of the population, particularly Latinos but also other minority groups and young people, could not possibly succeed. When Trump hijacked the primary campaign, the other candidates, who had believed that the party needed to expand its appeal, quickly realized that if they didn't win over the angry whites who were flocking to Trump, they could never get the nomination.

One of the most revealing moments of that primary campaign was when Marco Rubio aired this ad, in which he said, "This election is about the essence of America, about all of us who feel out of place in our own country." It was so strange because the whole point of Marco Rubio as a political figure, the reason he appeared on the cover of Time magazine in 2013 under the headline "The Republican Savior," is that he doesn't feel out of place in modern America. He's young, he's Hispanic, he's bilingual, he quotes rap lyrics — he was the one who was supposed to sell the GOP to the young people and minorities who will populate the future. But there he was trying to appeal to a bunch of old white guys mad at what America had become. Naturally, he failed.

To everyone's surprise, in the general election Trump managed to get enough white voters to turn out in key areas to win the Electoral College even as Hillary Clinton got nearly three million more votes. The problem for Republicans is that barring some truly extraordinary circumstance, 2016 may have been the last year such a win was possible, the last time that they can overcome the Democrats' more diverse coalition. The white share of the electorate is now below 70 percent, and will only get lower.

Of course, the party could nominate someone like Marco Rubio in the future. The trouble is that each and every day of the Trump presidency will make his job more difficult. Trump has a theory guiding his political decisions, which is that feeding his base is all that matters. If he can keep their support, he'll be protected. There are ways in which that's valid, but a relentless focus on the desires of anti-immigrant white voters only ends up pushing away minorities. If you wanted to find a president who would do more to alienate the electorate of the 21st century, you couldn't do much better than Trump.

We're already seeing some of the fruits of Trump's labor. As McClatchy recently reported, "as few as a quarter of voters under the age of 30 approve of Trump's job performance. And among young Republicans, Trump's approval rating has plummeted 12 percentage points since the spring, according to Harvard's Institute of Politics poll released last month, down to 66 percent." Even young Republicans are turned off by Trump's naked racism. Trump is creating a generation of voters whose first exposure to the Republican Party is in the form of a narcissistic, ignorant buffoon.

Even after he leaves, Trump's specter will hang over the GOP. The Republican candidates in 2016 had to grapple with whether the Iraq War was a mistake, as George W. Bush's blunder haunted them 13 years after it started. We're still arguing about the legacy of Bill Clinton, a quarter-century after he was first elected. The next round of Republican presidential candidates, whether they come in 2024 or 2028, are going to have to spend a lot of time answering questions about Donald Trump.

Their party will eventually recover from whatever damage Trump does to it. But that recovery may take a long while.