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

SX props not working with UserMenu Component #437

Closed
ektasawant opened this issue May 18, 2022 · 3 comments · Fixed by #719 or #724
Closed

SX props not working with UserMenu Component #437

ektasawant opened this issue May 18, 2022 · 3 comments · Fixed by #719 or #724
Assignees
Labels
brightlayer-ui Used to identify Brightlayer UI platform issues for easy filtering enhancement Request for improvement or new feature user-menu Affects User-Menu Component
Milestone

Comments

@ektasawant
Copy link
Contributor

ektasawant commented May 18, 2022

Describe the desired behavior

SX props should work with UserMenu component similar to other components.

Describe the current behavior

Currently if we try to use below classes it will not reflect changes

  • .BluiUserMenu-header
  • .BluiUserMenu-headerRoot
  • .BluiUserMenu-menuTitle
  • .BluiUserMenu-navigation
  • .BluiUserMenu-navGroups
  • .BluiUserMenu-noCursor
  • .BluiUserMenu-bottomSheet
  • .BluiUserMenu-headerTitle
  • .BluiUserMenu-headerSubtitle

The reason behind this is above classes are part of present MuiPaper-root instead of component's root dom.

Is this request related to a current issue?

No

Additional Context

Screenshot
image

@daileytj daileytj added the needs-review Issues that we would like to revisit/review label Jun 15, 2022
@daileytj
Copy link
Contributor

marking this as 'needs-review' to make sure that this is still an issue

@daileytj
Copy link
Contributor

Docs will need updated to expose all of these global CSS classes. We should also integrate all the new classes that were added in the SX/Mui5 migration so end-users can customize all of these styles via the classes prop.

@ektasawant ektasawant removed the needs-review Issues that we would like to revisit/review label Jul 6, 2022
@huayunh huayunh added the user-menu Affects User-Menu Component label Sep 14, 2022
@joebochill
Copy link
Collaborator

Just adding a note of clarity on this (expanding on Ekta's description)...the reason these classes do not work inside of the SX prop of the UserMenu is because the menu itself is rendered in a MUI portal...so it is removed from the part of the DOM where the Avatar exists and is put into the 'presentation' container where things like Modals, etc. get rendered. The SX prop implies a parent/child relationship between the classes, which is not present here because they are in two places in the dom. We could disable the portal behavior for the UserMenu (so the Menu appears as a child of the UserMenu root) (I think), but I'm not 100% sure what the consequences of that are (e.g., performance, etc.).

@daileytj daileytj added this to the 7.0.0 milestone Nov 7, 2022
@joebochill joebochill modified the milestones: 7.0.0, 6.3.0 Feb 20, 2023
@joebochill joebochill added enhancement Request for improvement or new feature brightlayer-ui Used to identify Brightlayer UI platform issues for easy filtering labels Feb 20, 2023
@surajeaton surajeaton self-assigned this Mar 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
brightlayer-ui Used to identify Brightlayer UI platform issues for easy filtering enhancement Request for improvement or new feature user-menu Affects User-Menu Component
5 participants