When prevailing opinion shifts on an issue, going one way is opportunistic, and the other is principled/idealistic. Or in language you sort might understand: hurr durrrrr.
No, you are trying to link principled and idealistic as being synonymous and they are not. You can be principled and realistic which would be mutually exclusive to idealistic.
Your argument is that she shifted her mind because popular belief was that the TPP was bad. I am saying she did it because she would rather drop support for something she believed in, because she did not want to have an unpopular stance. Rather than defend something that is unpopular, she would just let it go, much in the same way she was against gay marriage while it was popular to be against, and then became for gay marriage once it became popular.
Trump will have no problem doing things that are unpopular, and considering his views, is going to likely do far worse than drop support for something like the TPP.
Your body is amazingly flexible. The positions it must be able to contort into I can only fantasize about.