Ah yes! Now I remember. California, like Texas, became an independent (From Mexico) republic after English speaking immigrants from the US rebelled and declared independence, then petitioned the US for annexation.
The difference in the Ukraine, as I understand it, is that the Russian speaking Crimeans are not immigrants...but I could be wrong.
Then there is the Reconquista movement of Spanish speaking immigrants in the SW US...
“What difference, at this point, does it make?” HRC
“Borders, language, culture” MS
Mexico had been sovereign over those territories since 1821 but its control was very feeble. Most of the population were Indians who had no loyalty to Mexico (if they were aware that they belonged to the government in Mexico City).
There were some Spanish-speakers in New Mexico and California descended from pre-1821 settlers. Most of the current Hispanic population of the Southwest is the result of post-1848 immigration.
Even if we had not forced Mexico to cede California in 1848, the gold rush was about to happen and it's hard to see how Mexico could have held on to California once there were hundreds of thousands of inhabitants there, with only a small minority being Spanish-speaking or having any ties to Mexico.