hugsy / ctfhub

Where CTFs happen
77 stars 13 forks source link

Bootstrap Upgrade #72

Closed h4ckd0tm3 closed 1 year ago

h4ckd0tm3 commented 1 year ago

Oh boy... That was a journey but behold CTFPad is now running with the newest Bootstrap Version (5.3.0). It is possible that I missed some things somewhere but as for now I am pretty confident I change everything that needed to be changed in order for everything to work and look nice.

hugsy commented 1 year ago

We have different formatters for HTML. This makes every change from you re-format the code and then same for me. This is crazy annoying.

Before I review I will add various formatters (html, js , css, python). Please make sure your IDE follow them.

h4ckd0tm3 commented 1 year ago

We have different formatters for HTML. This makes every change from you re-format the code and then same for me. This is crazy annoying.

Before I review I will add various formatters (html, js , css, python). Please make sure your IDE follow them.

Thanks! Just ping me when you are done and I will do the propper formatting :)

hugsy commented 1 year ago

It's on the works now, and it will be:

All enforced by a pre-push policy. Those integrations work fine on VScode, check on your IDE and lmk. This will all be done in the merge of #71

Cheers

h4ckd0tm3 commented 1 year ago

It's on the works now, and it will be:

  • black for python code formatting
  • djhtml for html templates/js/css

All enforced by a pre-push policy. Those integrations work fine on VScode, check on your IDE and lmk. This will all be done in the merge of #71

Cheers

Checked and should be fine with PyCharm. 👍

EDIT: Question tho: Shouldn't it be rather "pre-commit" than "pre-push"? Because if you check after commit the changes are already commited no? But if you check pre-commit the hooks would run before the commit is done and commit the correctly formatted files. At least that's my understanding of it.

hugsy commented 1 year ago

It will be pre-push for the repo to prevent PRs that do not comply. But locally, I encourage to format at each commit (TBH I format at every save), however I don't wanna control that, everyone has their own preference.

There might also be an action coming for this at some point to refuse PR merging if not compliant to black

hugsy commented 1 year ago

Pretty much everything is ready, I'll double-check it all today after work because it'll be quite a big change 😂

h4ckd0tm3 commented 1 year ago

Glad to see your changes merged! What's left for me to do now?

hugsy commented 1 year ago

Somehow this has made things worst 😭

image

I think I will just test your branch, if all works I'll merge and then fix everything manually so formatting stuff like that don't ever happen.

hugsy commented 1 year ago

This is not manageable, can you revert to before a24b5f893ff227540e440cc97ebcf7d2003389c7 and force push? I'll review from that point directly in GH and then merge. Just like this I have no idea what changes you made... 😔

I'll apply the formatting later on.

h4ckd0tm3 commented 1 year ago

Will do, just gimme a few min!

h4ckd0tm3 commented 1 year ago

Nice :) yeah could be that I missed some stuff. I made quite the changes and could be that some copy paste stuff stayed there.

hugsy commented 1 year ago

Nice :) yeah could be that I missed some stuff. I made quite the changes and could be that some copy paste stuff stayed there.

Yeah 🙂 I suspected so

h4ckd0tm3 commented 1 year ago

Alright, I think I fixed everything that was broken. Tested every button in the UI to see if everything works, we really need tests xD