Skip to content

Comments

Fix blocking messages and dialogs centering#421

Merged
agarny merged 5 commits intoopencor:mainfrom
akhuoa:bugfix/dialog-centre
Feb 23, 2026
Merged

Fix blocking messages and dialogs centering#421
agarny merged 5 commits intoopencor:mainfrom
akhuoa:bugfix/dialog-centre

Conversation

@akhuoa
Copy link
Contributor

@akhuoa akhuoa commented Feb 23, 2026

This PR fixes issue #420.

I've added a padding-top value to the dialog backdrop container using the main menu's height, so it won't affect the dialog's dragging behaviour. For the blocking messages, I've added half the main menu's height to their margin-top since the blocks use the translate property. These modifications apply only when it has a main menu.
I've tested it on both web app and desktop app.

@agarny
Copy link
Contributor

agarny commented Feb 23, 2026

Thanks a lot @akhuoa, I can confirm that it all works as I would expect! I wish I had thought of it!

However, I am not keen on hard-coded values. I mean, if I "manually" (e.g., in DevTools) change the font size for the menu bar then blocking messages and dialogs won't be vertically centered anymore. So, whatever solution is used needs to be reactive to the height of the menu bar. I know how to do that (see 9dbc15f for instance). I am happy to do it unless you want to give a try. If so then on top of doing this, please:

  • Create a New version. commit after running the version:new script; and
  • Create, if needed, an Updated our dependencies. commit after running the dependencies:update script.
    In the Git history for this PR, I would expect New version. first, Updated our dependencies. second, and then whatever commits actually needed for this PR. This is what I do before merging anything. (This means that I sometimes force push a commit.)

@akhuoa akhuoa force-pushed the bugfix/dialog-centre branch from a594dfd to f66181f Compare February 23, 2026 04:58
@akhuoa
Copy link
Contributor Author

akhuoa commented Feb 23, 2026

Thanks a lot @akhuoa, I can confirm that it all works as I would expect! I wish I had thought of it!

However, I am not keen on hard-coded values. I mean, if I "manually" (e.g., in DevTools) change the font size for the menu bar then blocking messages and dialogs won't be vertically centered anymore. So, whatever solution is used needs to be reactive to the height of the menu bar. I know how to do that (see 9dbc15f for instance). I am happy to do it unless you want to give a try. If so then on top of doing this, please:

  • Create a New version. commit after running the version:new script; and
  • Create, if needed, an Updated our dependencies. commit after running the dependencies:update script.
    In the Git history for this PR, I would expect New version. first, Updated our dependencies. second, and then whatever commits actually needed for this PR. This is what I do before merging anything. (This means that I sometimes force push a commit.)

Hi @agarny, thanks for the feedback.

  • A new commit for versioning has been added (as the first commit).
  • Height tracking for the main menu has been added, which can handle the main menu's height changes, including font-size changes, padding updates, and also border thickness changes dynamically. 7e9a448

@agarny agarny force-pushed the bugfix/dialog-centre branch from c591167 to b36f11e Compare February 23, 2026 08:03
@agarny
Copy link
Contributor

agarny commented Feb 23, 2026

Thanks a lot @akhuoa. I have just pushed some minor cleaning up and I am going to merge your changes in once CI is complete.

@agarny agarny merged commit 74ce3ff into opencor:main Feb 23, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants