Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: improve style of menu buttons and labels #9533

Closed
wants to merge 2 commits into from

Conversation

GallyTi
Copy link

@GallyTi GallyTi commented Oct 13, 2024

Description

Improve Sidebar Menu's button and label placement

#9481

Code review checklist

  • [ x] Readable: Concise, well named, follows the style guide, documented if necessary.
  • Documented: Configuration and user documentation on cht-docs
  • Tested: Unit and/or e2e where appropriate
  • [ x] Internationalised: All user facing text
  • Backwards compatible: Works with existing data and configuration or includes a migration. Any breaking changes documented in the release notes.

License

The software is provided under AGPL-3.0. Contributions to this project are accepted under the same license.

@latin-panda latin-panda linked an issue Oct 14, 2024 that may be closed by this pull request
@latin-panda latin-panda changed the title The main changes to layout of buttons chore: improve style of menu buttons and labels Oct 14, 2024
@latin-panda latin-panda self-requested a review October 14, 2024 14:31
@latin-panda
Copy link
Contributor

Thanks for sending this @GallyTi, I'll be reviewing your PR tomorrow.

The Pull Request title will be the commit message before merging. I have updated the title to follow the commit message format.

Copy link
Contributor

@latin-panda latin-panda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice start!

It can get tricky with CSS since everything needs to align.
My advice is to keep changes at minimum, work with the icons first and leave changes to labels as last option.
Let me know if you need with anything

@@ -76,7 +76,6 @@ button.mat-mdc-unelevated-button {
*/
mm-panel-header {
display: flex;
padding: 14px 20px 10px 20px;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The mm-panel-header is a component reused in several places, and this change affects headers of modals, FAB menu, revision of reports. For example:
Screenshot 2024-10-15 at 3 44 28 PM

Please revert this change and override the component in the mm-sidebar-menu code block from inbox.less file.

@@ -1456,7 +1487,7 @@ mm-sidebar-menu .mat-sidenav-container {
top: 0;
font-size: @font-XXS;
padding-top: 5px;
text-overflow: ellipsis;
//text-overflow: ellipsis;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In mobile, this is looking a bit off, there is single letters left in a second line, and the icons aren't aligned anymore

This bar is initially okay for mobile, master branch:

The scope of the ellipsis work is only for desktop display:
Screenshot 2024-10-15 at 4 06 44 PM

I recommend leaving this bar as it is originally on mobile display (master branch) and only applying the changes to the desktop display. When applying the changes to the desktop display, there can be side effects to the mobile because it inherits the styles, in that case, you'll need to override the mobile styles so it displays the same as in master branch

@@ -1327,7 +1339,8 @@ mm-sidebar-menu .mat-sidenav-container {
}

.nav-item {
padding: 0 20px 20px 20px;
//padding: 0 20px 20px 20px;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove any new comment

@@ -1363,7 +1376,12 @@ mm-sidebar-menu .mat-sidenav-container {
color: @text-secondary-color;
}

.nav-item-title {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are some side effects to these texts, but I'm not sure what is causing it.

In this one, the texts are overlapping
Screenshot 2024-10-15 at 3 49 45 PM

See master branch where it doesn't overlap

Screenshot 2024-10-15 at 4 20 20 PM

In this other one, the text is all the way to the left.
Screenshot 2024-10-15 at 3 49 35 PM

Have a look at master branch, the text is aligned with the icons
Screenshot 2024-10-15 at 4 20 12 PM

width: 48px !important;
}

.nav-item-title {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The label on the pink box should align to the red line

Screenshot 2024-10-15 at 3 51 20 PM

This is how it is in master branch.
Screenshot 2024-10-15 at 4 23 36 PM

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While on the please keep the X icon about similar size as "Menu", just as in master branch:
Screenshot 2024-10-15 at 4 26 09 PM

@GallyTi
Copy link
Author

GallyTi commented Oct 15, 2024

Hello @latin-panda,

I apologize for the inconvenience. I needed a fresh start, so I created a new git clone and a new branch, which led to this new pull request. I’m really sorry for the trouble, but everything should now be properly aligned as requested, with cleaner and more organized code.

Thank you for your understanding!

If it is possible i will link this pull request to the new one, and pelase close or remove this pull request. Thank you! 🥺🥺

#9545

@latin-panda
Copy link
Contributor

That's okay @GallyTi, thank you for your time on this. I'll review the other PR tomorrow :)

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.

Improve Sidebar Menu's button and label placement
2 participants