From the videos I have seen many of the Hamas terrorists appear to be wearing a uniform of sorts.
If they are this time? Good.
It also appears some of those Israelis killed were armed and were either 'civilian' security, off duty IDF out of uniform, or military reservists out of uniform. Others were armed on duty military in uniforms.
I'm not certain about the specifics here, but if Hamas was attacking, self-defense applies regardless.
If a Hamas was in a uniform and attacked armed on duty Israeli miltary does that entitle him to be considered a legitimate combatant, and to protection under the Geneva convention?
Honestly, I'm not certain off the top of my head. If I was the arbiter, a dangerous thing to read too much into when it comes to one who is not an expert like myself, I would say that the principles and goals behind the Geneva convention are the actually important thing. I would count them as if they were a legitimate combatant and grant them equal treatment to any other soldier. I would do that because I seek to encourage the wearing of uniforms to clearly distinguish between combatants and civilians and reduce the ensuing problems that result when the distinction is not clear.
If Israelis were not in uniform and opened fire on 'uniformed' Hamas should they be regarded as terrorists?
I say that the situation is important here when it comes to determining specifics. If said uniformed Hamas soldiers were attacking, self-defense applies. If the Israelis were attacking, they just indefensibly changed their status from civilian to
enemy combatant, with all the consequences that that entails.
"Terrorist" is a separate matter. To borrow a quick Googling's definition for ease and demonstration -
a person who uses unlawful violence and intimidation, especially against civilians, in the pursuit of political aims.
I'd say that it's currently quite unlikely, but probably technically possible, that the Israelis should be deemed terrorists, depending on the specifics, but that determining that requires information not available in the question.
If Hamas gave a warning to people in a bunker to come out within five minutes or they would throw in a grenade does that provide them with the same justification as the IDF saying people have 24 hours to get out of North Gaza?
Unless I'm misunderstanding something notable - no. The IDF saying that is about giving Palestinian civilians time to get out of what's intended to become a war zone to reduce civilian casualties. As a general rule, "Come out from your bunker within 5 minutes or we'll grenade you" is all about forcing a confrontation in which one has to directly fight or surrender. For all the problems with the IDF's proclamation, those two situations are just not reasonably equatable.