This week President Trump reached a deal with Democrats to enshrine into law protections for young illegal immigrants brought to the United States as children. Within a matter of days, these young people went from fearing deportation to homelands some had never known, to having a potential shot at citizenship.

Did this mark the arrival of a new, compassionate, capable Donald Trump?

Sadly, probably not. Mr. Trump’s actions are rarely underpinned by principles, or a vision of who we are as a nation. Even on matters of near-perfect moral clarity, he is often transactional and capricious. If he does the right thing, there must be an angle.

His word is never final; it’s only the latest in a never-ending set of tactical adjustments made with one eye on his poll numbers, and the other on Fox News. If it benefits Mr. Trump personally to renege on this week’s tentative deal with Democrats and woo xenophobes and bigots instead of reviving the “Dream Act,” he will.

If his core supporters thought his sympathy for Dreamers was evidence that he was getting wobbly on immigration, he made clear they could still count on his sympathy for racists. Soon after Tim Scott of South Carolina, the Senate’s lone black Republican, privately scolded him for his “sterile” response to “hate groups who over three centuries of this country’s history have made it their mission to create upheaval in minority communities,” Mr. Trump once again asserted what he saw as an equivalence between the white supremacists who marched in Charlottesville, Va., and those who aggressively opposed them. And while he did sign a congressional resolution denouncing these hate groups, his refusal to unequivocally reject them is what led to the unanimously approved measure to begin with.