-
Notifications
You must be signed in to change notification settings - Fork 160
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(masthead-v2): Minimize CMApp on megamenu open #11085
feat(masthead-v2): Minimize CMApp on megamenu open #11085
Conversation
This has the potential to clobber the global app instance, preventing it from opening or closing altogether.
Note: This doesn't fully work yet. Calling the |
I wonder if the minimize method of the CM_APP is moving focus somewhere |
Deploy preview created for package Built with commit: 91ed85ca152d1b8b207e9a901d093ceed4a82a89 |
Deploy preview created for package Built with commit: 91ed85ca152d1b8b207e9a901d093ceed4a82a89 |
Deploy preview created for package Built with commit: 91ed85ca152d1b8b207e9a901d093ceed4a82a89 |
Deploy preview created for package Built with commit: 91ed85ca152d1b8b207e9a901d093ceed4a82a89 |
Deploy preview created for package Built with commit: 91ed85ca152d1b8b207e9a901d093ceed4a82a89 |
packages/web-components/src/components/masthead/masthead-contact.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can simplify the event handling by using the @HostListener
decorator with the document:
prefix for the event name. See comment for details.
DCO Assistant Lite bot All Contributors have signed the CLA. |
a142cdf
to
21177e5
Compare
Deploy preview created for package Built with commit: 91ed85ca152d1b8b207e9a901d093ceed4a82a89 |
c4a06f3
into
carbon-design-system:feat/masthead-v2-dev
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Glad the arrow function approach worked.
…tem#11085) * feat(masthead-v2): contact link should not affect CM_APP This has the potential to clobber the global app instance, preventing it from opening or closing altogether. * feat(masthead-v2): minimize CMApp on megamenu open * feat(masthead-v2): close chat module on L1 dropdown open * feat(masthead-v2): toggle masthead-contact label on cm-app state change * feat(masthead-contact): update cm-app event listeners * fix(masthead-contact): revert to hostlistener usage * fix(masthead-contact): remove console logs --------- Co-authored-by: Andy Blum <[email protected]>
### Related Ticket(s) none ### Description We made some enhancements to the alpha v2 masthead after we'd integrated its branch into the main C4IBM v2 branch. This PR ports those enhancements over. - **fix(masthead-v2): use more explicit selector in dropdown toggle** (911f802) ([Original PR](#11084)) - **feat(masthead-v2): add masthead to document flow** (e1debd8) ([Original PR](#10998)) - **feat(masthead-v2): Minimize CMApp on megamenu open** (c4a06f3) ([Original PR](#11085)) - **fix(masthead-v2): do not fail if object data does not exist** (c9609f7) ([Original PR](#11205)) - **fix(masthead-v2): ensure L1 dropdown targets exist** (fc65086) ([Original PR](#11254)) - **fix(masthead-v2): provide accessible nav label** (f183d25) ([Original PR](#11269)) - **fix(sticky-header): prevent negative overscroll from hiding stuck elements** (51015ed) ([Original PR](#11266)) <!-- React and Web Component deploy previews are enabled by default. --> <!-- To enable additional available deploy previews, apply the following --> <!-- labels for the corresponding package: --> <!-- *** "test: e2e": Codesandbox examples and e2e integration tests --> <!-- *** "package: services": Services --> <!-- *** "package: utilities": Utilities --> <!-- *** "RTL": React / Web Components (RTL) --> <!-- *** "feature flag": React / Web Components (experimental) -->
…ign-system#11183) none We made some enhancements to the alpha v2 masthead after we'd integrated its branch into the main C4IBM v2 branch. This PR ports those enhancements over. - **fix(masthead-v2): use more explicit selector in dropdown toggle** (911f802) ([Original PR](carbon-design-system#11084)) - **feat(masthead-v2): add masthead to document flow** (e1debd8) ([Original PR](carbon-design-system#10998)) - **feat(masthead-v2): Minimize CMApp on megamenu open** (c4a06f3) ([Original PR](carbon-design-system#11085)) - **fix(masthead-v2): do not fail if object data does not exist** (c9609f7) ([Original PR](carbon-design-system#11205)) - **fix(masthead-v2): ensure L1 dropdown targets exist** (fc65086) ([Original PR](carbon-design-system#11254)) - **fix(masthead-v2): provide accessible nav label** (f183d25) ([Original PR](carbon-design-system#11269)) - **fix(sticky-header): prevent negative overscroll from hiding stuck elements** (51015ed) ([Original PR](carbon-design-system#11266)) <!-- React and Web Component deploy previews are enabled by default. --> <!-- To enable additional available deploy previews, apply the following --> <!-- labels for the corresponding package: --> <!-- *** "test: e2e": Codesandbox examples and e2e integration tests --> <!-- *** "package: services": Services --> <!-- *** "package: utilities": Utilities --> <!-- *** "RTL": React / Web Components (RTL) --> <!-- *** "feature flag": React / Web Components (experimental) -->
Related Ticket(s)
Jira
Description
Using the Contact Module's
init
method as a workaround to minimize it has the potential to completely break its opening & closing. In a discussion with folks from that team, we've agreed to call theminimize
method, which is new since our workaround was put in place.Changelog
New
Removed