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

feat: enable header to accept custom menus #466

Merged
merged 3 commits into from
Apr 19, 2024

Conversation

syedsajjadkazmii
Copy link
Contributor

@syedsajjadkazmii syedsajjadkazmii commented Mar 13, 2024

This PR adds the following functionality

  • Accept the main menu in the props. if not provided, the default main menu will be used.
  • Accept the secondary menu in the props.
  • Accept the user menu in the props.
  • Restructure the user menu to add support for menu groups with heading in the user menu.
  • Removed appMenu from DesktopHeader because its usage could not be found. (reference)(Please let me know if I am missing its usage)
  • This will not affect the current usages of the frontend-component-header.

Screenshots of using custom headers for replicating different MFE headers.
Note: Screenshots are with local setup.

Screenshot 2024-03-13 at 4 21 19 PM Screenshot 2024-03-13 at 4 21 32 PM Screenshot 2024-03-13 at 4 21 47 PM Screenshot 2024-03-13 at 4 22 03 PM Screenshot 2024-03-13 at 4 22 15 PM Screenshot 2024-03-13 at 4 22 45 PM

@syedsajjadkazmii syedsajjadkazmii force-pushed the sajjad/VAN-1823-custom-header branch 2 times, most recently from b45023b to 613ffc8 Compare March 13, 2024 11:00
@syedsajjadkazmii syedsajjadkazmii marked this pull request as draft March 13, 2024 11:02
@syedsajjadkazmii syedsajjadkazmii force-pushed the sajjad/VAN-1823-custom-header branch 2 times, most recently from 0c6e968 to b3d375f Compare March 13, 2024 11:12
Copy link

codecov bot commented Mar 13, 2024

Codecov Report

Attention: Patch coverage is 93.33333% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 70.42%. Comparing base (abb08be) to head (e6aa4be).

Files Patch % Lines
src/DesktopHeader.jsx 94.73% 1 Missing ⚠️
src/Header.jsx 90.90% 0 Missing and 1 partial ⚠️
src/MobileHeader.jsx 93.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #466      +/-   ##
==========================================
+ Coverage   66.86%   70.42%   +3.55%     
==========================================
  Files          24       24              
  Lines         338      355      +17     
  Branches       78       88      +10     
==========================================
+ Hits          226      250      +24     
+ Misses        110      103       -7     
  Partials        2        2              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@syedsajjadkazmii syedsajjadkazmii force-pushed the sajjad/VAN-1823-custom-header branch 3 times, most recently from cf7a4b1 to 57f1b04 Compare March 13, 2024 11:18
@syedsajjadkazmii syedsajjadkazmii marked this pull request as ready for review March 15, 2024 06:48
@arbrandes arbrandes self-requested a review March 15, 2024 15:40
docs/using_custom_header.rst Outdated Show resolved Hide resolved
docs/using_custom_header.rst Outdated Show resolved Hide resolved
@zainab-amir
Copy link

@arbrandes Can you give an estimated time on when you will be able to review this PR?

@syedsajjadkazmii syedsajjadkazmii force-pushed the sajjad/VAN-1823-custom-header branch from 2dede18 to 004592a Compare March 19, 2024 10:11
@arbrandes
Copy link
Contributor

@zainab-amir, I'll do my best to get to it today.

src/Header.jsx Outdated Show resolved Hide resolved
@syedsajjadkazmii syedsajjadkazmii force-pushed the sajjad/VAN-1823-custom-header branch from 004592a to e6aa4be Compare March 25, 2024 07:49
@syedsajjadkazmii
Copy link
Contributor Author

Hi @arbrandes, waiting for your review on this PR. :)

Copy link
Member

@MaxFrank13 MaxFrank13 left a comment

Choose a reason for hiding this comment

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

Thanks for addressing all of the documentation nit picks! Approving from my end

Copy link
Contributor

@arbrandes arbrandes left a comment

Choose a reason for hiding this comment

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

I cannot find anything to object to: thanks for this, and apologies for the long delay in reviewing it!

))}
</MenuContent>
</Menu>
);
Copy link
Contributor

Choose a reason for hiding this comment

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

For the record, I could not find any MFEs that use this, either.

@syedsajjadkazmii syedsajjadkazmii merged commit 6cab3f3 into master Apr 19, 2024
7 checks passed
@syedsajjadkazmii syedsajjadkazmii deleted the sajjad/VAN-1823-custom-header branch April 19, 2024 06:36
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.

4 participants