I agree that the mainland government acted rashly. The forced implementation of the national security law definitely violates the spirit, if not the law here, and understandably a lot of people were alienated by this move. That said, the Basic Law does provide a provision for the implementation of such a law (Article 23), and there's ample wiggle room for the governments involved to argue that they haven't yet demolished the "one country, two systems" approach as yet.