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

Fat menu and mobile menu implementation. #237

Merged
merged 23 commits into from
Nov 16, 2023
Merged

Conversation

iFlameing
Copy link
Member

@iFlameing iFlameing commented Sep 22, 2023

On purpose I left back content in mobile menu because it make much more sense. All the visaully implementation are there. I need to refactor the code. so please don't review the code only look and feel and ui implementation please.

cc @sneridagh @davisagli

@iFlameing
Copy link
Member Author

iFlameing commented Sep 26, 2023

@sneridagh Ready for first review from my side. I tried to fix as much code as possible, but please review css code.

Also I am not able to fix the fatmenu in Edit mode. I don't want to write css for specific cases. Please try it once locally and review it.

cc @steffenri @davisagli

Copy link
Member

@sneridagh sneridagh left a comment

Choose a reason for hiding this comment

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

@iFlameing I can see the menu a bit shifted up:

image

Regarding the edit, I won't display it, just disable it. There's no point to display it in there.

@iRohitSingh
Copy link
Member

iRohitSingh commented Nov 7, 2023

After :hover

Screenshot 2023-11-07 at 8 37 02 PM

After :click

Screenshot 2023-11-07 at 8 37 31 PM

@iRohitSingh iRohitSingh requested a review from sneridagh November 7, 2023 15:09
@iRohitSingh
Copy link
Member

@sneridagh I don't know why I am getting these linting problem in my new laptop. I ran the make format still I am getting error.

@sneridagh
Copy link
Member

@iRohitSingh I had to fix the height of the overall header was a bit off, that's why it wasn't looking well (I know only a few pixels), but still... but now the menu and the underline are a bit off again 🙂 could you please fix it?

@iRohitSingh
Copy link
Member

@sneridagh Fixed.

Screenshot 2023-11-08 at 3 33 08 PM Screenshot 2023-11-08 at 3 33 54 PM

Add page.
Screenshot 2023-11-08 at 3 34 46 PM

function toggleMobileMenu() {
const body = document.getElementsByTagName('body')[0];
if (!isMobileMenuOpen) {
body.style.position = 'fixed';
Copy link
Member

Choose a reason for hiding this comment

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

@iFlameing Is there really no way around inline styling? I know this is the kind of styling we likely won't ever touch/overwrite for the mobile navigation but .. we should still try to avoid it.

Copy link
Member Author

Choose a reason for hiding this comment

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

There are no other options than this. We want this behavior for the mobile menu and we can only do it by js manipulation. Before react you not only do for style but also for appending div and section also. Just think how cumbersome it was before.

Copy link
Member

Choose a reason for hiding this comment

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

You can also inject a className ;) I think that is what I was doing in zeelandia and other projects.

Copy link
Member

@sneridagh sneridagh left a comment

Choose a reason for hiding this comment

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

Please take a look at the comments.

@iRohitSingh
Copy link
Member

Screenshot 2023-11-15 at 5 07 58 PM

@sneridagh sneridagh merged commit 3f1e68f into main Nov 16, 2023
@sneridagh sneridagh deleted the fatmenu-mobile-menu branch November 16, 2023 10:23
sneridagh added a commit that referenced this pull request Nov 20, 2023
* main:
  Release 2.0.0
  Pinsliderblock upgrade several things (#262)
  Fix header alignment of the sections (#261)
  Fat menu and mobile menu implementation. (#237)
  Added Focus and Hover Attributes to UI Buttons (#260)
  Fix max height for full map iframe (#257)
This was referenced Nov 29, 2023
padding-top: 20px;
padding-bottom: 6px;
border: none;
border-bottom: 9px solid transparent;
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Member

@iRohitSingh iRohitSingh Jan 11, 2024

Choose a reason for hiding this comment

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

@danalvrz As you can clearly see if we don't give the border 9px transparent we wll not get the desired the space between navigation and fatmenu which is 35px according to figma.

Screenshot 2024-01-11 at 4 34 10 PM

Also if you see submenu-wrapper has a marign-top 40px. So if you don't give the border 9px then we will be short of space.

You are right if we don't want this transparent border we have to do these changes.

  1. Give submenu-wrapper margin 49px.
  2. remove the border-bottom
  3. make it 40px before.

But there is also other region see this screenshot

Screenshot 2024-01-11 at 5 00 17 PM

this is example of demo plone org. we use the the border bottom to show a active one. I think this is why we use that. I am just giving you cases that how it landed in there. Not a correct description why we did that in first place.

Copy link
Contributor

Choose a reason for hiding this comment

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

@iRohitSingh thanks for the answer! In general, creating spacing with transparent lines seems odd, but I get the use case here. Maybe we can revisit this at some point in volto, and change the approach.

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.

5 participants