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

Plugin doesn't work properly with mkdocs-material 8.1.3 #10

Closed
lyz-code opened this issue Dec 29, 2021 · 4 comments
Closed

Plugin doesn't work properly with mkdocs-material 8.1.3 #10

lyz-code opened this issue Dec 29, 2021 · 4 comments

Comments

@lyz-code
Copy link

lyz-code commented Dec 29, 2021

Hi, thanks for the awesome project :)

It looks like they changed how they manage the nav items and it broke the nav menu. The arrow is expanded down, but no elements are shown

lyz-code added a commit to lyz-code/blue-book that referenced this issue Dec 29, 2021
…he logging level of a library

```python
sh_logger = logging.getLogger("sh")
sh_logger.setLevel(logging.WARN)
```

feat(python_snippets#Get all subdirectories of a directory): Get all subdirectories of a directory

```python
[x[0] for x in os.walk(directory)]
```

feat(python_snippets#Move a file): Move a file

```python
import os

os.rename("path/to/current/file.foo", "path/to/new/destination/for/file.foo")
```

feat(python_snippets#Copy a file): Copy a file

```python
import shutil

shutil.copyfile(src_file, dest_file)
```

feat(sh#testing): Test programs that use `sh`

`sh` can be patched in your tests the typical way, with `unittest.mock.patch()`:

```python
from unittest.mock import patch
import sh

def get_something():
    return sh.pwd()

@patch("sh.pwd", create=True)
def test_something(pwd):
    pwd.return_value = "/"
    assert get_something() == "/"
```

feat(questionary#Conditionally skip questions): Conditionally skip questions

Sometimes it is helpful to be able to skip a question based on a condition. To
avoid the need for an if around the question, you can pass the condition when
you create the question:

```python
import questionary

DISABLED = True
response = questionary.confirm("Are you amazed?").skip_if(DISABLED, default=True).ask()
```

feat(questionary#Don't highlight the selected option by default): Don't highlight the selected option by default

If you don't want to highlight the default choice in the `select` question use
the next style:

```python
from questionary import Style

choice = select(
    "Question title: ",
    choices=['a', 'b', 'c'],
    default='a',
    style=Style([("selected", "noreverse")]),
).ask()
```

feat(sqlite#Get the columns of a database): Get the columns of a database

```sqlite
PRAGMA table_info(table_name);
```

ci: fix material theme to 8.1.2 until nav issue is solved

oprypin/mkdocs-section-index#10
@oprypin
Copy link
Owner

oprypin commented Dec 29, 2021

Thanks for the report. I confirm the bug and I have so far written a unittest that would've caught it.

@lyz-code
Copy link
Author

Damn, so fast! thank you

@oprypin
Copy link
Owner

oprypin commented Dec 30, 2021

Hmm the fix is quite something...
f43f397

squidfunk/mkdocs-material@f3926bf#diff-fa37d36fb2ba3d0b185c0a8a05606472170b05c2bb97a2829bd8f3682c865252R113

nav_item was a completely different item from indexes | first but somehow != was returning False


The fix is released now.

@lyz-code
Copy link
Author

Lol, looks like it was funny to catch xD.

Thanks again for the quick fix, I can confirm that it works now (~‾▿‾)~ ~(‾▿‾)~ ~(‾▿‾~)

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

No branches or pull requests

2 participants