cgkineo / adapt-pageNav

Navigation bar component (quicknav clone)
GNU General Public License v3.0
6 stars 4 forks source link

Framework: _loopStyle must be explicitly set #62

Closed swashbuck closed 5 months ago

swashbuck commented 5 months ago

Subject of the issue

The README.md states that _loopStyle defaults to 'none'. In fact, if it's not set, it does not default to anything and the next/previous buttons are not shown at all. I would suggest that we default _loopStyle to 'none' if not set in the JSON.

https://github.com/cgkineo/adapt-pageNav/blob/62dab8c6c8070f15012c964bc0b5257410cca153/js/PageNavModel.js#L145

Also, the siblings option has recently been removed from the plugin. This should be removed from example.json and README.md for _loopStyleComment.

Your environment

Steps to reproduce

In a framework project (not AAT):

  1. In the standard p101 that has a co-100 and co-200, add a Page Nav component to the first (co-100) topic.
  2. Enable the _root and _next buttons.
  3. Set _loopStyle to 'none' which should be the default.
  4. Observe that the Next button is visible
  5. Now, remove the _loopStyle line entirely from the Page Nav component config.
  6. Observe that only the Main Menu button remains.
oliverfoster commented 5 months ago

These lines should not have been removed:

https://github.com/cgkineo/adapt-pageNav/commit/7c8d86364f91816147a1fe3825a728e1b5204d94#diff-6c2ae9233aadf60cb19e106cb2fdffa44f13ef7e5d14e95b1ff2e666f791ae78L179-L181

Siblings buttons and siblings looping are different behaviours with the same subject.

github-actions[bot] commented 5 months ago

:tada: This issue has been resolved in version 3.1.2 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: