What is the Trump travel ban and who does it affect?

The Supreme Court has allowed some parts of Trump’s controversial order to stand

The US Supreme Court backs the travel ban on visitors from Iran, Libya, Somalia, Sudan, Syria and Yemen. Ted S Warren / AP
Powered by automated translation

Depending on who you ask, the most recent round of legal arguments against Donald Trump's travel ban has either been a success for the administration or a failure. As always with questions of law, it hasn't really been either.
This week, after several attempts by Mr Trump and legal challenges, the United States Supreme Court finally approved a partial ban on citizens from six Muslim-majority countries entering the United States for 90 days, pending a final agreement on the technicalities of the order in autumn. That allowed parts of the revised order to go ahead and be implemented yesterday, before the Court considers the full case later this year.
To understand what has changed, what it means and who will be affected, it is important to start with the original order, issued by Mr Trump days after taking office. That order barred people from seven Muslim-majority countries from entering the US for 90 days. It also stopped refugees from those countries who had been accepted.
There was, naturally, enormous uncertainty about who was affected, resulting in heart-breaking stories of people denied entry at ports around the US, or before they boarded planes in other countries. The new order removes some uncertainty – it will not affect anyone with a valid visa or green card, nor dual nationals.
The countries under the ban are Libya, Sudan, Syria, Yemen, Somalia and Iran – Iraq has been removed from the list. Visas that have already been approved won't retroactively be revoked. 
But a new caveat has been introduced, that of a "bona fide" connection. The court has explained that those who have a close family relationship, or a relationship with an institution (university, company, etc), or have a job offer or university place, would all be exempted from the ban. That said, it remains to be seen in the coming days how consular and border officials interpret and apply guidelines sent out on Wednesday.
The exemptions, nevertheless, should mean that thousands fewer will be affected by the executive order, but that parts of it will stand, allowing both sides to claim victory.
Still, there will almost certainly be court cases to decide what constitutes a "bona fide" relationship. While acceptable family ties are clear – parents, spouse and children, for example, but not grandparents, grandchildren and aunts and uncles – less clear are business links. For instance, would a business trip to a potential client be considered bona fide or could it be seen as only for the purpose of avoiding the rules? 
But for all that, the ban may yet be struck down. The Supreme Court will hear arguments on the legality of the new order in the autumn. Which means that nationals of affected countries, as well as lawyers for groups concerned by the ban, will face a long, hot summer of disrupted travel, broken family meetings, and suspended studies. Whither, then, the idea of America as the ultimate open country?