ADDED: The case is Rucho v. Common Cause.
The question here is whether there is an “appropriate role for the Federal Judiciary” in remedying the problem of partisan gerrymandering—whether such claims are claims of legal right, resolvable according to legal principles, or political questions that must find their resolution elsewhere....But in Baker v. Carr, the Court rejected the idea that redistricting was entirely left to the legislature. It detailed the "political question" doctrine, identifying 6 factors, one of which is "a lack of judicially discoverable and manageable standards," and decided that, in the context of districts with unequal numbers of residents, the Equal Protection Clause was a source of standards. Later, it said the standard was "one person, one vote" — that is, a requirement roughly equal numbers in each district.
The Framers were aware of electoral districting problems and considered what to do about them. They settled on a characteristic approach, assigning the issue to the state legislatures, expressly checked and balanced by the Federal Congress. As Alexander Hamilton explained, “it will . . . not be denied that a discretionary power over elections ought to exist somewhere. It will, I presume, be as readily conceded that there were only three ways in which this power could have been reasonably modified and disposed: that it must either have been lodged wholly in the national legislature, or wholly in the State legislatures, or primarily in the latter, and ultimately in the former.” The Federalist No. 59, p. 362 (C. Rossiter ed. 1961). At no point was there a suggestion that the federal courts had a role to play. Nor was there any indication that the Framers had ever heard of courts doing such a thing....
There's still a lot of advantage to be taken in where you draw the lines, but it's harder for judges to discover a standard and manage it. When the lines were drawn for racial reasons, the Court got involved, but lines drawn for partisan reasons were always troublesome. There have been a few cases (described in the opinion), but the Court was always fractured over what the standards should be, and a minority of Justices maintained that partisan gerrymandering fell within the political question doctrine. After more than 3 decades, that minority view has become the majority. It was Justice Kennedy — concurring in Vieth (2004) — who kept partisan gerrymandering from going into the "political question" category 15 years ago. So Kavanaugh replacing Kennedy made the big difference.
Roberts writes, showing some deference to Anthony Kennedy but much more respect to Justice O'Connor (who wrote an excellent concurring opinion in the key case Davis v. Bandemer (1986)):



