It was signed in 1984: https://en.wikipedia.org/wiki/Sino-British_Joint_Declaration
You are otherwise correct.
China is in clear violation of the agreement, since it explicitly stated that civil rights should remain protected for fifty years following the 1997 handover date.
Trump not remaining in office is indeed a blow against fascism.