Skip to content
This repository has been archived by the owner on Dec 5, 2022. It is now read-only.

The navigator closes unexpectedly #116

Closed
walkccc opened this issue Feb 3, 2018 · 1 comment · Fixed by #122
Closed

The navigator closes unexpectedly #116

walkccc opened this issue Feb 3, 2018 · 1 comment · Fixed by #122
Assignees
Labels
Projects
Milestone

Comments

@walkccc
Copy link

walkccc commented Feb 3, 2018

Expected Behavior

The navigator should expand when I click to a children of children .html page. For example, when I click to "Problem 2-1", the navigator should highlight "Problem 2-1" to orange, and keeps expanding the content in the navigator.

expand

Actual Behavior

The navigator closes when I click to a children of children .html page.
After clicking "Problem 2-1", the navigator will close, which is not so convenient.
close

Steps to Reproduce the Problem

The codes:

- text: 2 Getting Started
  type: link
  path: Chap02/2.0.html
  children:
  - text: 2.1 Insertion sort
    type: link
    path: Chap02/2.1.html
  - text: 2.2 Analyzing algorithms
    type: link
    path: Chap02/2.2.html
  - text: 2.3 Designing algorithms
    type: link
    path: Chap02/2.3.html
  - text: Chap 2. Problems
    type: link
    path: Chap02/2-0.html
    children:
    - text: Problem 2-1
      type: link
      path: Chap02/2-1.html
    - text: Problem 2-2
      type: link
      path: Chap02/2-2.html
    - text: Problem 2-3
      type: link
      path: Chap02/2-3.html
    - text: Problem 2-4
      type: link
      path: Chap02/2-4.html

Specifications

  • NodeJS Version: 8.9.4
  • NPM Version: 5.6.0
  • OS: macOS High Sierra version 10.13.3
  • Hexo Version: 3.5.0

Btw, is it possible to change the default color orange to other colors(like lightblue or green)?
I've modified the directory you mentioned in the documentation Hexo Doc Theme | SASS styles, but it seems it's not so easy to change this?

Thanks a lot!

@rbarilani rbarilani added the bug label Feb 15, 2018
@rbarilani rbarilani added this to the 1.2.0 milestone Feb 15, 2018
@rbarilani rbarilani self-assigned this Feb 15, 2018
@rbarilani
Copy link
Contributor

rbarilani commented Mar 14, 2018

@walkccc I will check out this issue, the problem can be related to the fact that you are using the same path for two entries in the tree on different levels: "Chap02/2-0.html" it's a children of "Chap02/2-0.html"... this is why the "navigator closes" because the React code cannot distinguish them so it selects as active the first one that is found in the tree with the path equal to "Chap02/2-0.html".... my bad they aren't the same entry...

For the SASS customisation, what exactly is not clear to you?

@rbarilani rbarilani added this to In progress in Backlog Mar 14, 2018
rbarilani added a commit that referenced this issue Mar 16, 2018
All ancestor lists also when current navigation item it's
deep down in the tree

close #116
rbarilani added a commit that referenced this issue Mar 19, 2018
All ancestor lists also when current navigation item it's
deep down in the tree

close #116
@rbarilani rbarilani moved this from In progress to Done in Backlog Mar 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
Backlog
  
Done
Development

Successfully merging a pull request may close this issue.

2 participants