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

Fix dropdown #1787

Merged
merged 11 commits into from
Nov 22, 2023
Merged

Fix dropdown #1787

merged 11 commits into from
Nov 22, 2023

Conversation

mkz212
Copy link
Contributor

@mkz212 mkz212 commented Nov 21, 2023

No description provided.

@donavanbecker donavanbecker added the alpha Related to Alpha Branch label Nov 21, 2023
@donavanbecker
Copy link
Contributor

@mkz212 Can you resolve the conflict

@mkz212
Copy link
Contributor Author

mkz212 commented Nov 22, 2023

@donavanbecker @bwp91 I need your help with this. The function at the bottom works great. But. The point is to exclude from this function click on dropdown.

@bwp91
Copy link
Contributor

bwp91 commented Nov 22, 2023

There is a conflict here again, please can you fix this, and what is it you need help with?

ui/src/app/app.component.ts Outdated Show resolved Hide resolved
@mkz212
Copy link
Contributor Author

mkz212 commented Nov 22, 2023

// ensure the menu closes when we navigate
    router.events.subscribe((event) => {
      if (event instanceof NavigationEnd) {
        const dropdownMenu = window.document.querySelector('#navbarSupportedContent');
        const hamburgerMenuButton = window.document.querySelector('.navbar-toggler');
        if (dropdownMenu) {
          dropdownMenu.classList.remove('show');
          hamburgerMenuButton.classList.add('collapsed');
        }
      }
    });

this function works great. ( I added hamburgerMenuButton.classList.add('collapsed'); because it is nessesery to animate hamburger icon to X icon) But... I want to exclude click on dropdown in menu (class="toggle-dropdown") because now instead of open dropdown it close menu.

Co-authored-by: Ben <43026681+bwp91@users.noreply.github.com>
@bwp91
Copy link
Contributor

bwp91 commented Nov 22, 2023

I think im confusing menus - can you take a video of the current issue?

@mkz212
Copy link
Contributor Author

mkz212 commented Nov 22, 2023

const dropdownMenu should be const navbar - I don't know why it was a dropdown because it refers to the main menu

IMG_4480

@bwp91
Copy link
Contributor

bwp91 commented Nov 22, 2023

In the code this is still a link

          <a class="nav-link dropdown-toggle" href="#" role="button">
            <i class="fa fa-cog pr-2"></i>Homebridge Settings<i class="fa fa-caret-down pl-2"></i>
          </a>

maybe it should be a button?

@mkz212
Copy link
Contributor Author

mkz212 commented Nov 22, 2023

@bwp91 Ok done! I changed to button. Can you merge?

@bwp91
Copy link
Contributor

bwp91 commented Nov 22, 2023

is it working now?

@mkz212
Copy link
Contributor Author

mkz212 commented Nov 22, 2023

is it working now?

It should. Can you merge? And release next alpha?

@bwp91 bwp91 merged commit a0114a0 into homebridge:alpha-4.53.0 Nov 22, 2023
20 checks passed
@mkz212 mkz212 deleted the patch-29 branch December 10, 2023 01:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
alpha Related to Alpha Branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants